Python Scripts¶
Here are some small Python scripts I have written over time. Usually they are tested on a recent version of Ubuntu Linux
This scripts are distributed in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. You are free to do with them what ever you want.
nautilus-print¶
A very simple extension for Nautilus, the standard file manager for the GNOME desktop, to print files from the context menu.
It’s not very sophisticated and doesn’t give any error messages if something goes wrong. It doesn’t do any file type conversion but relies on what your print system can do - so don’t expect too much.
Requirements¶
nautilus-print needs:
libautilus-extension Python bindings
Tested with version 0.6.1 as distributed with Ubuntu 10.04 “Lucid Lynx”.
For Ubuntu that’s the package python-nautilus
-
Tested with version 1.2.7 as distributed with Ubuntu 10.04 “Lucid Lynx”.
For Ubuntu that’s the package gtklp
Download¶
Last modified: |
2010-06-15 05:10:00 |
Size: |
1,3K |
MD5: |
4c0612900d5511bc291d9175c6457e22 |
SHA256: |
7738ba3236da1799d7db25372f0a7af7105599bcfb672a808fea193d6c41ff93 |
GPG signature: |
Installation¶
Save the file as
$HOME/.nautilus/python-extensions/nautilus-print.py
and restart
Nautilus (e.g. log out and log in or run nautilus --quit
from the
command line).
Usage¶
Right click on a local file in Nautilus. You should see a menu that
somewhere has a Print
item. Click on that to start GtkLP with the
selected file(s).
—
addtorecent¶
A simple script to put documents on GNOME’s recently used document list
Requirements¶
addtorecent needs:
Download¶
Last modified: |
2010-07-20 19:27:00 |
Size: |
1,3K |
MD5: |
5030061ee42bf4006ef0e34d829a206a |
SHA256: |
f92f77c2af403ef8cfd525a5137575584c87e928a7c0fb3afdfdb99b0c4abe82 |
GPG signature: |
Usage¶
addtorecent URI [MIME-type] [app] [cmd]
URL
is the path or URI of the documentMIME-type
is its MIME-type and defaults totext/plain
app
is a name of an application you want to associate with this documentand defaults to
xdg-open
cmd
is the command line to startapp
and defaults to
xdg-open %F
With Emacs¶
See here for how to use this with Emacs
ppa-info¶
Get owner, URL and description for a given PPA
Requirements¶
ppa-info needs:
Python3
Download¶
Last modified: |
2015-10-02 04:58:00 |
Size: |
1,8K |
MD5: |
77234f75c5e7de3b28d3f106ae844bdb |
SHA256: |
a5dc1741a6a292766cf1d42f41fd97968ab5ccd79c7090b998224c4c7c8713b2 |
GPG signature: |
Usage¶
ppa-info.py PPA
PPA
is a PPA name, likeppa:diesch/testing
or justdiesch/testing