Tuesday, 8 February 2011
Saturday, 1 January 2011
Right-click, view movie's IMDB page
This is coded for chromium but just the bit at the top for any other. Use it with nautilus-actions, or thunar's custom actions etc. It'll try and make sense of release names by cropping before the year.. obviously this will fail for films like 2012 ;)
Grab the script here
Grab the script here
Thursday, 25 November 2010
Pager and menu button using dzen2
This is what they look like. They go nicely with tint2.
There are three scripts. One is combined, and the other two are just the menu and just the workspaces, so you can have them at different corners. They use xdotool to simulate the menu and change workspace button presses and should work under most environments (except probably compiz, because it's funny about virtual desktops).
There are three scripts. One is combined, and the other two are just the menu and just the workspaces, so you can have them at different corners. They use xdotool to simulate the menu and change workspace button presses and should work under most environments (except probably compiz, because it's funny about virtual desktops).
Scripts here
You'll want to change the coordinates, the xdotool shortcuts and probably the colours. These are all at the top of the scripts.
Tuesday, 9 November 2010
Quickly search several PDFs at once
Takes PDFs as arguments, and can be used with nautilus-actions or thunar's custom actions. The script uses grep and thus grep regex, but i've added easy conditional searching at the expense of some limitations regarding normal grep conditionals. You're presented with this when you run it, which just about covers things:
The script can be downloaded here. You'll need pdftotext for this to work.
The search ignores case. Conditionals cannot be joined. Let me know if this is a problem.
Wildcards:
A single . represents any character, and an asterisk represents zero or more occurances of the preceeding character eg:
'c...h' will find catch, clash, cloth, coach etc.
'c.*h' will find caliph, cash, catch, cheesecloth etc.
Conditionals:
OR : '(this|that|the)' will show lines containing 'this', 'that', or 'the'.
AND : '(this&&that&&the)' will search for lines that contain 'this', 'that' and 'the'.
NOT : '(this!that)' will search for lines that contain 'this' but don't contain 'that'
The script can be downloaded here. You'll need pdftotext for this to work.
Saturday, 10 July 2010
Short term 'back in time' snapshots
If files stand a chance of getting corrupted (such as openoffice documents), or you run the risk of hacking away and accidentally breaking one part of your code, it can be nice to have a 'back in time' feature. This script is intended for short term snapshots. Add it to your nautilus-actions or whatever, and select the files or folders you want snapshots of and the time in minutes between each snapshot.
It uses rsync to create a backup folder every x minutes containing your selected file(s), and 'cp -al' to create hardlinks to prior versions to keep disk space low. This means it'll only save new copies of the bits that change, but give you all available data for any given snapshot)
Perhaps ill create a GUI for it at some point, but for now its CLI only, so if you add it to nautilus-actions, make sure you specify that it's to be launched with a terminal, eg:
gnome-terminal -x python ~/scripts/short_term_sync.py
Click here to grab it, and don't forget to edit the 'dest', around line 27.
Merge and burst PDFs with nautilus-actions
Two scripts, one for merging and one for bursting (splitting up into single pages). Grab them here.
They output to the directory the PDFs are in. The merge script collates the PDFs in alphabetical order and outputs to 'merged.pdf', the burst script numbers the pages.
Add it to nautilus-actions the normal way, with %M as the parameter and to only show when *.pdf is displayed, obviously.
These scripts rely on pdftk to do the work.
Friday, 7 May 2010
Update to Deluge scheduling script
This is a little update. The original post has been updated too.
So the syntax has changed for versions of deluge including and above 1.2.0. There's also a handy scheduler plugin again, finally, but i also use my deluge_sched.py for toggling between 3 sets of bandwidth limits, so its still sitting in my gnome menu next to deluge client.
The only difference is the syntax used for deluge-client. Since you may have changed your bandwidth limits to ones different from mine, you may want to just do a find-and-replace on the script instead of downloading it afresh.
Change all instances of: 'deluge -u console -a'
To: 'deluge-console'
Simple as that. The updated script can be found here and the original one can now be found here
So the syntax has changed for versions of deluge including and above 1.2.0. There's also a handy scheduler plugin again, finally, but i also use my deluge_sched.py for toggling between 3 sets of bandwidth limits, so its still sitting in my gnome menu next to deluge client.
The only difference is the syntax used for deluge-client. Since you may have changed your bandwidth limits to ones different from mine, you may want to just do a find-and-replace on the script instead of downloading it afresh.
Change all instances of: 'deluge -u console -a'
To: 'deluge-console'
Simple as that. The updated script can be found here and the original one can now be found here
Subscribe to:
Posts (Atom)