Skip to content
A collection of useful scripts that don't fit anywhere else
Python JavaScript HTML Other
Latest commit 0bfb92a May 26, 2016 @akkana Add
Failed to load latest commit information.
jsjupiter Update copyright year Mar 12, 2013
kobo Add Writing to the default shelves Dec 26, 2015
mailtests Test files for testing viewmailattachments, viewhtmlmail Sep 18, 2015
mapping Analyze list of biomes in WWF Terrestrial Ecoregions shapefile Feb 20, 2015
motioncam Add a trivial (but helpful) debug print Jan 9, 2015
pycamera Print date and time on each (verbose) iteration. May 24, 2014
rpi Remove a misleading comment Dec 23, 2014
weather Accept -d argument for debugging Nov 26, 2013
.gitignore Initial commit Aug 14, 2012
COPYING Add GPLv2 COPYING file Jun 25, 2013
README Add May 26, 2016 Only create the gc once Feb 6, 2013 Allow copying of podcasts to a post-KitKat Android device, May 26, 2016
animate.js Simple Javascript image animations Sep 29, 2015
aptver Print usage when called with no arguments Jun 5, 2013 Very simple paren-counting program Jun 12, 2014
bdump Add a collection of old scripts I hadn't gotten around to adding Dec 29, 2012 New set of bird codes, from a different source. Sep 10, 2015 Comment explaining what cgitb is for Jan 28, 2016 Add code to parse ICS files, and to output HTML-formatted event lists. Jan 5, 2016 Merge branch 'master' of May 1, 2013 Update print statements to python3, which hexchat is now using May 1, 2016
colormatch.php Add colormatch PHP script Feb 26, 2015 Different Mars image Sep 30, 2014
countsyl Count syllables in a word Nov 16, 2013
courseratext Be smarter about adding paragraph breaks: Jul 15, 2013 Rearrange the code logic. How did that ever work? Feb 29, 2016
delaytest.cgi Allow floating-point and subsecond delays Feb 3, 2016
diff2rss Diff two files and output RSS of the differences. A possible solution… Sep 21, 2015 Find files that differ between two directories -- Mar 22, 2013
doc2html Give an error if wvHtml isn't installed Jan 30, 2016
eggtimer Add a collection of old scripts I hadn't gotten around to adding Dec 30, 2012 Don't add a second copy of tags that are already there Dec 26, 2015 Typo fix Sep 19, 2012 Guard against bad ticker symbols Mar 19, 2016
fixbookcover Remove space as an option in key handler: it already triggers the def… Nov 14, 2015
fontasia Add a collection of old scripts I hadn't gotten around to adding Dec 30, 2012
fotogr Some tags weren't being found when searching directory trees instead … Jun 13, 2015 Somewhat minimal (but still hugeexample of a gtk image viewer Apr 19, 2014 Wrapper to call gphoto to capture images from a camera May 14, 2014 Temporarily remove the subtraction from allocation that we were using… Nov 14, 2015
langgrep Remove prints Nov 2, 2014
linkedinify Fix broken LinkedIn URLs Sep 10, 2014
louder Turn on debug output -- it's actually useful to see it in .xsession-e… Sep 26, 2012
masq Switch to using 192.168.2 for compatibility with the PiDoorbell tutorial Apr 8, 2014
moonpos If no date specified, start from a week ago. May 22, 2016 Read mouse events, even if not in X. Linux only. Dec 1, 2013 Improve skipping Jun 13, 2015
noblank Disable screen blanking Jun 23, 2014
pathmatch Add a collection of old scripts I hadn't gotten around to adding Dec 30, 2012
podcopy Allow copying of podcasts to a post-KitKat Android device, May 27, 2016
preso Update titlebar to page title. Add ctrl-R for reload Apr 26, 2015
pyclip Fix broken LinkedIn URLs Sep 10, 2014
pykey Add a collection of old scripts I hadn't gotten around to adding Dec 30, 2012 Remove an extraneous comment, and don't forget the sys module for tes… Dec 29, 2012
pyruler Add a collection of old scripts I hadn't gotten around to adding Dec 30, 2012
pysync Add a collection of old scripts I hadn't gotten around to adding Dec 30, 2012 Cheat sheet for useful Python idioms and constructs. Oct 8, 2015
qhtmlprint Reorder some lines and add an attempt to crop now that QPrinter no lo… Jan 16, 2016
quickbrowse Update license, TODO and default page May 16, 2016
randombg Don't use Tags.anything as an image name Nov 3, 2014
randomline randomline: choose a random line from the input. Useful for things Sep 22, 2012 Read input without waiting for newlines Dec 29, 2012
repo-pullpush Rename repo-pullpush and add a README entry for it Apr 5, 2016
serio Braindead simple serial communication program in Python May 19, 2013
shorturl Don't need urlparse any more Jun 4, 2015 Don't mark the prime divisors as composites; Nov 10, 2014
sinkto Add a de-personalized version of the sinkto script Jul 26, 2015 Add a title May 14, 2014
speedtestserver A mini http server useful for testing download clients Jan 28, 2016
termcolors Add a collection of old scripts I hadn't gotten around to adding Dec 30, 2012
termsize Format a long line better May 25, 2013
tweet Match only one bird at a time, and match ALL patterns given. Sep 30, 2014 Add a separator between filename and cgi args Feb 3, 2016
viewhtmlmail fix some spelling mistakes May 2, 2016
viewmailattachments Add a remote protocol to quickbrowse, Apr 29, 2016
vol Use python alsaaudio instead of shell aumix Sep 24, 2012
waymaker Google seems to have shut off access Sep 19, 2013
weborphans Add some common filenames that aren't really orphans Jun 4, 2015 Remove my test URL May 13, 2016
wordview Guess extension if it isn't available in the filename Sep 16, 2015
xbright Pin brightness at 0 and 1 when using + and 0. Might not actually want… Mar 13, 2016
xlsrd Print rows encoded with getdefaultencoding() May 1, 2016


A collection of useful scripts and snippets, in various languges.


    My Jupiter's Moons Javascript web app: show the Galilean moons and
    their shadows, and predict transits, shadow transits and eclipses.

    Module of utilities useful with Kobo ebook readers.

    Scripts related to mapping / GIS.

    Messages with attachments for testing viewmailattachments.

    An automated motion-sensitive camera driver, for Raspberry Pi or
    other machines. Requires pycamera module.

    A wrapper that can drive a Pi camera module, a USB webcam or an
    external gphoto2-compatible camera using similar APIs.

    Scripts for the Raspberry Pi. Mostly wrappers to talk to sensors.

    Some attempts at accessing various weather APIs and plotting

Scripts in this directory:
    Plot the analemma from the selected location, using PyEphem and PyGTK.
    A tiny Python module to make it easier to list files on an
    Android device using adb, and copy individual files to the device.
    Used by podcopy.

    Simple code for animating a series of images in javascript.

    Search for Debian packages, installed or uninstalled, matching
    a pattern, and print out versions and descriptions.
    A very simple parenthesis (and brace and bracket) counter.
    Why isn't there a better one already on Linux?
    Give common name for those obscure 4-letter bird codes.

    Ascii/hex/decimal dumps of any file. Like od but much more readable.
    An xchat Python script to handle nick (and other special-case) sounds.
    Also a rare example of an xchat Python script.
    Simple cellular automata simulation in Python. Slow.

    Find the nearest matching color name.
    Predict planetary visibility and conjunctions for a specified
    date range.

    Count likely syllables in words, giving best guess and likely max.
    Decode email lines encoded in RFC 2047 format, printing only lines
    that match a specific header (Subject:, From:, etc.).

    A CGI script in Python that spits out some text slowly, with delays.
    Use it on your webserver (or localhost) to test things like parallel
    downloads to make sure they work with slow servers.

    Diff two files and output RSS of the differences.
    A possible (though poor) solution for web pages that don't offer RSS feeds.
    Find files that differ between two directories -- even if 
    they've been moved to different places in the directory structure.

    Run wvHtml on a .doc file, but then use BeautifulSoup to clean
    up at least some of the mess wvHtml makes.

    Pop up a reminder window in a specified number of minutes.
    Display author, title and tag information for ebooks in epub format;
    or add or modify an ebook's topic tags, title or cover.
    Can be imported as a module (there are examples in the kobo/ directory
    and in fixbookcover).
    given a day of the week ("tue") or a day of the month (15),
    did it occur between two given dates?
    Download financial data from Yahoo finance and plot lots of
    different funds on the same scale.
    Can also take data from a local spreadsheet or other source.

    Fix books whose cover doesn't include the title, like many
    Project Gutenberg books.

    A Linux font chooser and categorizer.

    Find tagged photos: search for strings in files named Keyword or Tags
    beneath the current directory.
    A generic image viewer widget and image viewer window that can
    be imported into other python programs.

    Search (grep) for patterns only within scripts written in a
    specified language (e.g. in all python scripts).

    Increase alsa system volume by a small increment. Symlink it to
    another name like "quieter" and it will decrease instead.
    Bind those to volume increase/decrease keys on your laptop.
    and set it as the system wallpaper.

    Set up IP masquerading to talk to another computer, such as a
    Raspberry Pi, over eth0 while using wlan0 for the internet.
    Read mouse events from /dev/input even if not running X,
    using the python evdev module. Linux only.
    A little toy music player in Python, illustrating how to play audio.

    Turn off screen blanking. Run this when you're giving a presentation.

    Find directories beneath the present one that don't contain a
    Keywords or Tags file -- i.e. image directories that need to be tagged
    with metapho.

    Search your executable path to find programs matching a string.
    Like str<tab> except you can match patterns anywhere in the
    string, not just at the beginning.

    Play sound samples (e.g. soothing white or pink noise samples)
    in a loop, reacting to key events for volume control or to skip
    to the next sample.

    Copy podcasts (fetched with podget) to a mounted mp3 player or directory,
    or to an Android device via adb.
    Remove characters in filenames that would cause problems on vfat
    filesystems, and ensure filenames are unique and files aren't dups.

    A lightweight presentation program for displaying HTML slides.

    Read the X clipboard.

    Simulate keypresses under X. A simpler, Python version of
    A class to play sounds asynchronously by calling aplay (or an app
    of your choice). Don't repeat a sound that's already playing.
    Used in the xchat script

    An X pixel ruler. Useful for measuring things like icon sizes.

    Call rsync, but check first what would be changed, and save the
    password between the two calls.
    Cheatsheet and syntax reminders for useful Python features.

    Choose a random background (wallpaper) from a directory named based on
    current X resolution. So you can have different sets of backgrounds
    sized for laptop screen, external monitor etc.

    Print a random line from a file. Useful for things like choosing
    a random wallpaper or random system beep tone.
    Read a key press from the keyboard without waiting for a newline.
    For CLI programs: doesn't need X, tkintr, pygame or similar libs.

    Modify a git repository, taking the existing URL, making that
    the pushurl and adding a passwordless pull URL alongside it.

    A proof-of-concept serial terminal app in Python.
    Don't take this seriously; it's not meant as a real app (yet?)

    Use a URL shortening service to get a shorter URL.
    Can take input from the current X selection, and automatically
    select its output for pasting into a browser or Twitter window.
    Visualization of the Sieve of Eratosthenes, using Python curses.
    (Not very useful, but makes a good curses example.)

    Synchronize files in a list between two machines.
    Good for syncing updated scripts, dot files, documents,
    email folders etc. to a laptop when preparing for or returning
    from a trip, or just for keeping several machines in sync.

    A mini http server that can introduce delays or other glitches
    that are useful for testing http download clients.
    Unfortunately, it's only single-threaded which makes it
    not very useful except as an illustration of how to make
    a mini server in Python. Use delaytest.cgi for actual testing.

    Display ANSI colors for the current terminal.

    Set stty size to the size of the current terminal window
    (e.g. when logged in to an embedded Posix device over a serial line).

    Play birdsong from a specific bird. Requires ripped tracks from a
    bird song CD: for example, the Stokes, Cornell or Peterson collections.

    Convert a set of HTML slides (e.g. in navigate.js) into PDF.
    For turning an HTML presentation into a PDF slide deck.

    A very minimal browser in pygtk. If you don't pass an argument but
    there's anything in the X selection when you run it, it will
    browse to that URL first. I use it to check URLs that don't
    work in my regular Firefox profile, either because of noscript/cookie
    issues or because of Firefox compatibility issues.
    Maintain a queue of URLs to download asynchronously to local files.

     Take an mbox HTML message (e.g. from mutt), split it using munpack,
     and rewrite it so it can be viewed in an external browser.

     Show all attachments to an HTML message in a Firefox window,
     first running them through unoconv or other conversion programs
     as needed to convert MS Office formats to HTML or PDF.

    A simple python-gtk volume slider. Much simpler and smaller than

    Take a file and of descriptions, multi-line and separated by blank lines,
    and turn it into a collection of GPX waypoints suitable for import into
    any mapping program (e.g. Osmand or PyTopo).

    Download and parse readings from Citizen Weather Observation Program

    Display and plot weather means for a set of stations,
    by downloading NOAA data files.

    Display a window showing temperature and today's forecast
    for several cities at once.

    Check a web site (perhaps localhost) against a local mirror,
    checking for broken links and orphaned files.
    Parse a data table from a wikipedia page, outputting CSV.

    Convert a doc or docx file to html, and call a new firefox window on it.
    Predecessor to (and simpler than) viewmailattachments.

    Adjust brightness of an X11 display up or down using xrandr.

    Display an .xls spreadsheet as a formatted ASCII table, using
    the xlrd package to parse the spreadsheet.

Something went wrong with that request. Please try again.