Scripts ======================================================= “Spending 2 hours to accomplish in 2 seconds what could otherwise be done in 2 minutes.” [Readability simple](http://git.njw.me.uk/cgit/cgit.cgi/readability-simple/) and [remove links](remove-links.js) -------------------------------------------------------------------------------------------------------------------- “The ever-present awareness of possibility to either make or refuse choice, was to preempt my creating any meditative space for myself” — *Sean Birketts, The Gutenberg Elegies*. [Readability](http://code.google.com/p/arc90labs-readability/) is a program which decides which parts of a web page make up the core text, and rewrites the page to remove anything else. Unfortunately it was designed as a 'bookmarklet,' meaning that one must rely on external servers for its operation, with the speed, connectivity and privacy implications which that entails. I lightly reworked the code to remove some unnecessary functionality and ensure it can be easily used locally. I also created a simple companion script which removes all links from a page. I currently use these in [uzbl](http://www.uzbl.org), with the command: `chain 'script @scripts_dir/readability/js/readability.js' 'script @scripts_dir/remove-links.js'` [Democracy Now! fetcher](fetchdnow.sh) ------------------------------------------------------- The wonderful news programme [Democracy Now!](http://www.democracynow.org) provide FLAC, Ogg Vorbis and MP3 files of all of their episodes, but only a RSS feed for the MP3s. This script downloads the latest episode, in FLAC, Ogg Vorbis or MP3 format. I use this from a cron job to automatically fetch new episodes in my prefered format. [LWN fetcher](getlwn.py) ------------------------------------------------------- The online publication [LWN](http://lwn.net/) provides excellent news on free software each week. However to access the latest issue one needs to log in to a subscriber account. This script just automates the login and download of the latest issue. [Encrypt email if possible](encrypt-if-possible.sh) ------------------------------------------------------- One feature I really wanted with the [mutt](http://www.mutt.org/) mail reader was to automatically encrypt email to anyone I have an OpenPGP public key for. This simple script accomplishes just that, and can be easily included in any mutt configuration. [Gather flagged email](gatherflaggedmail.sh) ------------------------------------------------------- I store my email in Maildir format, in a variety of folders, and read it using the mutt mail reader. This setup worked well for me, except that there was no way for me to easily see all flagged messages in any folder. This script enables this, by creating a dynamic folder with links to all flagged email. [File non-personal email](filenonpersonalmail.rc) ------------------------------------------------------- I find it useful to keep personal email separate from everything else I receive. This is a simple procmail rule which moves email from anyone not in my personal [alias](http://www.mutt.org/doc/manual/manual-3.html#ss3.2) file into a different folder. This could be done more neatly with awk, but it has always worked perfectly so I'm leaving it be. [osCommerce Easy SEO URLs](http://addons.oscommerce.com/info/5901) -------------------------------------------------------------------- osCommerce doesn't have a robust plugin system, so it's particularly important to me that any modifications I make to osCommerce installations are as simple and maintainable as possible. I found this contribution to rewrite urls, which nearly did what I needed. I fixed some serious bugs, added a few little features, and generally made it a little more robust. I am currently maintaining the releases, and (time-permitting) handling bug and feature requests.