Translations:
- Français
- English
Misc. scripts
I've written a few scripts to make my daily life easier. Yes, as any good computer engineer, I'm willing to spend 8 hours perfecting a script which will save me 30 seconds every month. Oh well, that's not the point.
Some of these scripts might be useful to others, so in the Free Software spirit I'm sharing them on this development workspace. All these scripts are under the GPL v3 license (or any later version).
Available scripts
Here's a small introduction.
backup-delicious.py
A simple script to save the bookmarks hosted on delicious.com in an XML file, in case Delicious has a problem (broken site, data loss, crazy business model change, Yahoo beeing sold off, etc.). Put that in a crontab if you really want to use the service without being locked in.
Source : backup-delicious.py
birthdaysfromvcard.py
This script creates an iCalendar file with the birthdays of the people in a vCard (vcf) file. Very useful to avoid forgetting a friend's (or relative's) birthday.
Source : birthdaysfromvcard.py
files2feed.py
This script creates an Atom XML (similar to RSS) file using the last modified or added files in a directory and its sub-directories.
Use case: I share my files through the web, and I'd like to offer an RSS feed for the updates and the new files (here it's an Atom file but the principle stays the same).
Source : files2feed.py
make-songs-list.py
Creates a PDF from the songs available to Performous, a great karaoke game.
It uses the album cover if it's available, and try to minimize the number of pages, so you just have to print it and distribute it to the players.
Source : make-songs-list.py
podcast-transcode.py
Use case: I have a portable video player that I use in the public transport system, but it's not fast enough to decode today's videos (high resolutions, greedy codecs, etc.). As a result, I have to convert the podcasts I'm subscribed to and resize them to my player's video screen.
Process: the scripts takes an RSS feed as input, and converts all the attached videos to AVI/DivX/MP3, resizing them to the required dimensions. Then, the attachment tag is updated to link to the converted video URL.
For the videos from TED, the script can even add subtitles if they're available, and if tedtalksubs.py is installed (which means, is in the PATH). That's another of my scripts, available from the same place (well, in that case, I can't really say it's one of my scripts, since I copied almost everything from another script).
The script tedtalksubs.py is independent. It can list, download and convert to SRT the subtitles of the TED videos.
Source : podcast-transcode.py
rss-mirror.py
Use case: when I stumble upon an interesting web page that I don't have time to read right at the moment, I save it to Instapaper. The service offers an RSS feed for the unread pages. To put the time I spend in public transportation to the best possible use, I'd like to read those pages there, but I don't have a mobile internet subscription (I'm too cheap for that). But I do have a portable player with a web browser.
Process: the scripts takes one or more RSS feeds as input, and make a local mirror with every entry, using wget or httrack. The link depth level can be configured, but by default it only downloads the specified page, not the links on this page. Then, it builds an index of the downloaded pages using the fabulous iUI.
The download directory can then be synchronized with a portable player, which only needs a web browser. In my case, I use the script with the Instapaper service, but any RSS feed can be used. For example, bookmarks on Delicious, starred items in Tiny Tiny RSS or Google Reader, etc.
It's a sort of poor man's offline feed reader :)
Source : rss-mirror.py
Reporting bugs
To create a new ticket on this tracker, you'll need to have an OpenID account. If you already have one, you're good to go, just use the "OpenID Login" link at the top right of this page. If you don't, just go to this page to choose your provider and setup an account. You may already have an OpenID without knowing it.
Afterwards, you'll have a new button labeled "New Ticket" in the menu bar, use it to report bugs or to suggest enhancements.
