[ me ]

Akkana's Software Page

Some software I've written which others might find useful. It's all free open source "software libre". My primary platform is Linux, but some programs also run on other platforms such as PalmOS or Mac OS X.

Jump to: GIMP plug-insAstronomy softwareScripts and tiny programsBookmarklets and browser stuffMiscellaneous fiddlingPatches

I also have a couple of online classes for beginning programmers: a Python course and a Javascript course.

You can browse my GitHub profile here.


Pho: An image viewer and annotator

[pho] pho is a nifty (well, I think so, anyway :-) lightweight image viewer, with some special features that make it useful for managing large numbers of images at once (for instance, after uploading several days' worth of images from a digital camera).

I also have a separate app, metapho, for tagging collections of images in complicated ways you wouldn't want to do in pho.

Crikey! Map Strings to Keys on Linux

Crikey! lets you bind your username or password, or any other string, to a single key in your window manager, like you can do with QuickKeys or other programs on other operating systems.

fontasia: View and categorize fonts

[fontasia: view and categorize fonts] Fontasia is a font viewer that lets you classify fonts into categories of your own choosing (e.g. script, cartoon, outline, western, gothic).

PyTopo: Python mapping scripts

[PyTopo] PyTopo allows Linux users to view and manipulate the USGS map data from the Topo! series of boxed Windows program (or other maps stored in similar formats). Scroll through maps, or save a map to a printable file.

Ellie plots elevation profiles uploaded from a GPS unit, so you can see how much you climbed on your hike or ride.

gpxmgr is a little script for splitting GPX track files. If your GPS produces a single .gpx file that includes multiple tracks, which confuses some software, or if you have tracks from multiple trips and just want to keep them separate, gpxmgr can do that.

Feedme: an RSS reader for offline devices

[feedme] Feedme is an RSS reader for offline devices. Give it a list of your favorite RSS feeds, and it will pick up new stories and translate them into a variety of formats, including Plucker, ePub, FBreader, or simplified HTML, suitable for reading on handheld devices like an Android tablet, ebook reader, Palm or Nokia.

FeedViewer for Android

FeedViewer is the Android viewer I currently use to view the feeds I gather with Feedme.

Geocenter: find the geographic center of a group of points

[Geocenter] Geocenter is a web application that finds the geographic center of a group of points -- such as a group of users trying to find a central meeting place.

Netscheme: switch among several different network schemes

[tux networking] netscheme is a fast comand-line way of switching among network schemes in places you visit a lot. I find it faster to type "netscheme home" or "netscheme work" than to fiddle with NetworkManager-type menus.

It's built around a useful Python networking library called netutils.py that offers Python wrappers for finding active network interfaces, bringing interfaces up and down, getting lists of ESSIDs, associating with an accesspoint, etc.

GIMP Plug-ins and Scripts

The Save/export clean Python plug-in

A quick-and-dirty solution for people who don't like the GIMP 2.8 Save vs. Export separation.

Pandora: GIMP Plugins for Making Panoramas

[Pandora] A set of plugins to assist in combining a set of images into a panorama in the GIMP.

GIMP arclayer, label and CD label plug-ins

[CD plugins] arclayer: Bending text (or graphics) into a circular arc.

The beginnings of a set of GIMP scripts for making pages of labels (business cards, envelopes, etc.) so that they can be printed at high quality with gimp-print/Gutenprint.

These grew out of my older GIMP plug-ins to make it easier to generate and print CD labels, though the newer gimplabels includes all the CD plugins as well. (That page also includes arclayer, a plug-in to bend text in an arc of a specified radius.)

autocropall.c: a C plug-in to crop an image paying attention to the contents of all layers, not just the current one (as discussed in Chapter 11 of my GIMP book).

Little GIMP Scripts

Arrow Designer: an interactive Python script that draws arrows. Surprisingly useful, and hard to do in GIMP any other way.

Selection to Wallpaper makes it easy to adapt one image to wallpaper for one or more different screen sizes: starting with a selection of appropriate aspect ratio, it copies the image, crops, scales and sets the image filename so you can save to the right place.

Blobipy gives a rounded shaded bevel to the current layer or selection. It's a little like Drop Shadow and Bevel, but the effect is somewhat more pronounced -- a good way of rounding text and making it more three-dimensional.

Save layers as patterns This is helpful for importing Photoshop pattern files. There's a GIMP plug-in available to load Photoshop pattern files, but what you get is an image with lots of layers, since Photoshop can store multiple patterns in a single file. My Save layers as patterns script can take this multi-layer file and save each layer to your GIMP pattern directory as a pattern usable by GIMP.

reverse-layers.scm reverses the order of the layers in the current image. Very useful if you're doing animation or stitching panoramas with Pandora. It's included in GIMP 2.4, but here's the script for 2.2 users.

stack.scm turns the layers in the current image into an averaged layer stack, where each layer's opacity is such that it contributes equally to the total.

allmodes.scm takes an image and combines it with a background color in each of the GIMP's layer modes. I used it to generate Figure 9-11 of my book, Beginning GIMP: From Novice to Professional..

paperproto.scm is a script which takes a set of strings and turns them into a set of draggable buttons, usable for "paper prototyping" or just magnetic fridge poetry. Inspired by Sven's blog entry and described in my post to the Gimp-developer list.

colorcircles.scm generates a set of overlapping RGB or CMY circles, with appropriate layer modes, to demonstrate color combinations (used for Figure 8-1 in my book).

fibonacci.scm generates a set of golden-ratio fibonacci boxes and a fibonacci spiral through them. It's a work in progress, neither flexible nor pretty yet.

mysphere.scm (from Chapter 11 of Beginning GIMP) is a slight modification of the normal Sphere script included with GIMP, which lets you draw your sphere on a transparent background for pasting into other images.

autocropall.c from Chapter 11 of Beginning GIMP. In GIMP 2.4 this is no longer needed: just use "Crop to selected" combined with "Sample merged" in the Crop tool options.

mode-dialog.py gives you two new entries in the Layer menu: Next mode sets the current layer to the next mode in the layer modes list (try binding it to a key or keeping it visible by tearing off the Layer menu), while Mode dialog... gives you a window with buttons for every mode, so you can try them in any order. Not that useful except as a demo; hitting down-arrow in the the Layers dialog is good enough.

Astronomy Software

Moonroot

[Moonroot] Moonroot (Linux, X11) brings up a window showing the moon at its current phase. It uses the X11 Shape extension, so you can put it on your desktop background without window borders and it looks like the moon hanging there on top of whatever background image you use.

Astronomy Mini-Apps in C, Javascript and Java, for browsers, PDAs and desktops)

[akklets] Small apps to show the current state of Jupiter and its moons (including shadow transits), Saturn and its moons, our Moon, and Mars. They're intended to be small and light, with little UI, good for use on PDAs or other low-horsepower machines, or for running in a browser.

Tux Meteor: Count meteors

[tux meteor] Tux Meteor is a quickie xlib meteor counting program I hacked up because I wanted to be able to contribute to the meteor counts going on for the big Leonid storm, and I didn't want to have to boot into Windows to use the existing Windows meteor counters. Oh, yeah, and it occurred to me that having a hot laptop computing away on my lap would be nice on a cold November night.

Sky is a little planetarium program a la Java applet -- show bright stars and the planets. It has a difficult user interface, and I've trimmed down the star catalog because it took up too much space and took too long to download, so it's not likely to be very usable to anyone as is.

Just Moon: Identify features on the moon

[Just Moon] Just Moon is an application for Unix platforms including Linux, Zaurus, and OS X, for identifying features on the moon.
Old now -- it no longer compiles since it needs outdated libraries.

Lunar colongitude

I wrote a little lunar colong program: calculate colongitude at a given date, or predict when in a given month a particular colongitude will happen (e.g. when's the next time I can see the Hesiodus ray, or O'Neal's Bridge?) The web page predictor here (source tarball available on that page).

I also have a bunch of Javascript code on the Hitchhiker's Guide to the Moon to calculate the moon's phase and libration.

Scripts and small programs

Tweet: Play Bird Songs

[Tweet] How do you find out whether that bird you're hearing is a Cassin's finch or a Bushtit? I bought the Stokes Field Guide to Western Bird Songs, a 4-volume CD set. I ripped the four CDs to disk (you can't have mine -- they're copyrighted, and it's an excellent set so I heartily recommend buying a copy), getting filenames like Barn_Owl.ogg (of course, you can use mp3 or whatever format you like). Then wrote a Python script, tweet, to play them. Pass an argument containing some part of the bird name you want to match; for instance, "tweet mock" will play the mockingbird, while "tweet spar" will display a list of sparrows, from which you can either choose by number, or type another string, e.g. "hou" to play the house sparrow's song.

WebClient for Android

For years, it was ridiculously difficult to take a standalone web app (HTML, Javascript and CSS) and run it as a standalone app on Android. WebClient was a little app that lets you collect a bunch of local web files and run them on Android from a home screen icon. Now, in 2017, you can make a Progressive Web App to accomplish that purpose much more easily (though there doesn't seem to be any way to keep a progressive web app entirely offline, so you can use it without paying data charges, which is possible with WebClient).

"twit" Twitter clients

I didn't like the options on Linux so I wrote a couple of lightweight Twitter clients in Python. Completely unrelated to the "tweet" birdsong script (which was named long before Twitter existed).

Friendlier shell (bash) errors

A new project: shellerrs, a little bash script shell learners can add to .bashrc to get friendlier errors that give you a better idea what might be wrong. See the article I wrote explaining it in Linux Planet, Friendlier Shell Errors, or the earlier blog post, Friendlier error messages for shell newbies.

flashcard: Python flash card self-teaching program

I wrote flashcard to help myself learn vocabulary words for a Spanish class. It's a tiny little program but it's pretty useful. For the same Spanish class, since I don't know how to type accented characters, I wrote a little python script called escribo that provides buttons for all the common Spanish special characters and copies that character to the clipboard, so you can paste it anywhere. (But then someone took pity on me and showed me how to do it the right way.)

Arduino hacks

I have a few modest Arduino programs, including a generic Makefile you can use to build Arduino software from the command-line without needing the IDE.

Killtips: kill any errant tooltips that buggy programs have left visible

I had a problem with certain programs leaving tooltips on my display that wouldn't go away. So I wrote a Python-xlib script that can close any currently open tooltip (or similar override-redirect window) in X: killtips.

bdump

Long ago, before Linux even existed, Unix had a nifty program called od (Octal Dump) for viewing binary files. You could say, for instance, od -xc and it would dump the file as hexidecimal and characters, and it would line up the two lines so you could follow the file from printable characters to unprintable ones.

Unfortunately, the GNU folk got hold of od and, in their wisdom, changed it so that the bytes no longer line up. So you can follow the hex, or the characters, or the octal, or whatever, but heaven help you if you want to relate two or more of them.

There's a program called xxd (part of vim that does a slightly better job, but it isn't really as nice as I want either. And it's such an easy thing to write. So I did, in Python. bdump. -c, -x and -d indicate character, hex and decimal (does anyone ever want octal any more?) Default is all three.

Image processing scripts

I wrote a collection of Image Batch Processing scripts which do things like rotate, resize, make thumbnails, and collect images together into web pages. These work especially well when combined with pho.

HTML Slide Presentations

A javascript framework for HTML presentations, for using a browser, such as Firefox, as a powerpoint replacement for slide presentations.

A Javascript/HTML framework for Ignite talks.

Preso, a lightweight Python-Webkit script to display HTML presentations fullscreen without the overhead of a full browser.

PyBlosxom plug-ins and helper scripts

I use PyBlosxom for my blog, and I've written a few PyBlosxom plug-ins and helper scripts to make that easier.

akkjog: Control the jog dial on a Sony Vaio

This is more fully described on my Stupid Vaio Tricks page, but if you just want the tarball it's here: akkjog.tgz.

Other scripts

These days I keep my miscellaneous scripts in GitHub: Akkana's scripts. There's a README that I try to keep updated, describing what each script does.

For some older scripts, some of which might not be in github:

eggtimer (Python/TkIntr) is a little "egg-timer" countdown application. Run eggtimer 15 your cornbread is ready and 15 minutes later, it will pop up a huge red window showing your message. Any key, or a mouse click, will dismiss the window.

I also have a different version, eggtimer-gui, where you can set the time with a slider. Written for my Linux Planet article, GUI Programming in Python For Beginners: Create a Timer in 30 Minutes.

vol (python/gtk) is a fast and simple volume control app, written in PyGTK. The normal gtk volume control program changes its name seemingly monthly (is it gnome-volume-control, gtkmix, gtkmixer, gnome-mixer, or what?), and in any case it's slow to start up and creates a rather large window. All I need is a single slider for master volume, something which starts up quickly enough that I don't miss too much of the beginnings of audio or video clips; but that didn't seem to exist except as panel applets for specific window managers. vol calls the command-line program aumix under the hood (which means that you need the commandline version of aumix and not the program of the same name which actually has a gtk interface -- sigh). Maven I. Raphene has taken this script and extended and improved it in various useful ways: siv.

Or, if you don't even want anything as elaborate as vol, you can use louder (and make a link named "quieter" to the same script), then bind that to keys in your window manager to have volume control from the keyboard.

pyruler (python/gtk) is a quickie pixel ruler for measuring pixel distances on the screen, helpful when developing web pages or GUI apps. By default it's a horizontal ruler, but typing v will make it vertical; h will make it horizontal again. Uses pygtk.

langgrep (python) is a little hack that helps me figure out how to do things in various scripting languages by grepping in only files of a specified language. So if I can't remember how to use "find" to search within a string in python, I can say:

langgrep python -w find ~/bin/*
(or /usr/bin/* if I don't have a lot of python programs in my own bin). Trivial but very useful -- I'd wanted something like that for years.

twitref lets you search twitter for a pattern: for instance, @yourname to see any references or replies to you. For instance, you could run it from cron and mail yourself the output.

parsexml is a demo of how to use Python's xml.etree.ElementTree class to parse a large XML file without reading it all into memory. Use this if you need to process a large XML file -- for instance, splitting it contextually. I wrote it in order to extract geographically smaller regions from a huge USGS KML file of geologic data (I'll make that script available when it's finished).

wifi-picker (python/gtk) is a very simple wireless network chooser. It lets you define essid and/or key for your usual networks, or you can type in an essid and/or key if you're somewhere new. Comments at the beginning of the script explain how to set up your known networks. It calls iwconfig eth0, so run it as someone who has permission to do that. (Unfortunately iwconfig seems not to work very well for setting essid on Ubuntu, so I haven't actually used this very much.)

lsconfig (sh) is a shell script which lists services available in this runlevel -- essentially what chkconfig --list does on Redhat systems.

talksplit (sh) is a script in sh which takes a long mp3 file and splits it into a collection of 5-minute segments. Why? Because I like to listen to podcasts, and my mp3 player can remember which file it was playing but not where it was in the file. With talksplit, at least I end up within five minutes of where I left off listening last time. Talksplit tries to do sensible things with id3 tags. It uses splitmp3 to do the actual splitting, and id3tool to handle the id3 tags.

pathmatch (python) searches for patterns in your path. The "which" command can search for complete strings, but you need pathmatch if you've ever wondered, "What volume control programs do I have? It's probably called something-mix or something-volume-something"; just type pathmatch mix volume and see the answer.

boondoc (python) searches for documentation related to a particular program: it looks for man pages, info, READMEs and other /usr/share/doc files, and anything else it thinks might be documentation. Written at request of a friend.

eg (perl) is a little perl script I wrote to simplify figuring things out from man pages. Lots of man pages have hundreds of lines of theory and background, when really all you want is a simple example of how to run the program. So eg looks at man pages and gives you only the EXAMPLES section, if there is one.

maybeshutdown (sh/zenity) is a trivial little script to let you shut down the computer from gnome-panel or any other panel or menu that doesn't offer its own shutdown option. It's easy enough to call shutdown directly, but since it's easy to hit a panel button by mistake, the script gives you a confirmation dialog.
Put maybeshutdown somewhere in your path, adjust it for your own system (shutdown vs. halt vs. poweroff) and remove the sudo if you've made the shutdown program setuid, then make a new panel launcher which calls maybeshutdown and has an icon you won't mistake for anything else (I used the "Warning triangle" icon) and you're all set.

randomline (python) chooses and prints one random line from whatever it's given as input. You can use it for all sorts of things, like printing a random quote from a file, but I use it to set a random wallpaper on my desktop, like this:
xsetbg -fullscreen -border black `find $HOME/Backgrounds | randomline`

dotback backs up my important configuration files ("dotfiles") to a tar file, without getting lost in backing up voluminous crap like the Firefox cache. You do have to spend some time making a list of what files and directories you care about.

Miscellaneous Fiddling

Neighbor

The April 2002 Atlantic had an interesting article called
Seeing Around Corners describing population dynamics in terms of cellular automaton rules, trying to explain why neighborhoods tend to become segregated by race or other factors. It was a fascinating article, but I questioned it, and decided to whip up my own simulation. My results did not match those of the authors; in fact, I found much less tendency toward segregation than they did. My simple CA simulation (written in C, displaying in Xlib) is here: neighbor.tar.gz.

It's written as a framework that makes it easy to write new apps for other 2-dimensional CA rules, and as an example it includes a bare-bones implementation of Conway's Game of Life.

Animatch

I had a bunch of handheld photos which I wanted to stitch together into a short animation. Of course, the rotations and positions didn't all match. I looked for a program that could help, and couldn't find one. So I wrote one.

Run animatch on a list of files, from a terminal window (you'll need to save the output later). You need to choose two control points in the image which will be fixed from shot to shot. As animatch shows you each image, click on the left control point, then the right one. When you've chosen the right control point on the last image, animatch will spit out a long list of Image Magick commands for rotating and translating each image. Save these commands to a file, edit as necessary, back up all your images!, then run the script.

Animatch is very rough. It's a one-off I wrote in a day, and it lacks documentation and polish. It would be better done as a GIMP tool. Use at your own risk, but by all means let me know if you're using it and hit bugs or have a feature you'd really like. animatch.tgz.

Bookmarklets and other browser stuff

See my two Linux Planet articles:

Simple Bookmarklets: The Power of the Command Line in your Browser
and
Roll Your Own Custom Bookmarklets In Firefox, part 2: Javascript Bookmarklets.

For a description of how to use my Count Words bookmarklet, see the Linux Planet tip Quick Firefox Tip: Word Count Bookmarklet.

See also "Kitfox", in the next (Patches) section.

Patches to Other Software

xbrightness

I didn't write xbrightness, but I found it very useful for adjusting brightness on a monitor that doesn't have hardware brightness controls. Particularly with some updates Mikael Magnusson made, then some other changes I added later. They're all described in this blog posting: Software brightness control in X11.

I never heard back from the xbrightness author, so I'm making it available here: xbrightness-mika-akk.

By the way, if you grabbed an earlier version back when I first posted the blog entry, now it clips at the top and bottom of the range rather than wrapping around. I haven't updated the version.

KitFox

A collection of assorted patches I make to Mozilla Firefox locally to make it work more like the old, lamented Mozilla Suite. The patches are against a full firefox development tree, but might be useful to binary users who want to change specific javascript or menu files.

XChat: don't hard-wire key bindings

XChat drives me crazy: it has a key binding dialog, but a lot of its key bindings aren't settable through the dialog, and are compiled in and can't be un-done. In particular, for people who like to use Emacs/Readline bindings to edit text, you can't, even though xchat sees your gtk key theme, because Ctrl-F is hardwired in the C code to pop up a Find window whether you want one or not. There are several other hardwired key bindings I change, like the Ctrl-I I keep hitting accidentally that detaches the current tab, and then I have to reattach it and go hunting for the magic keybinding to move the tab back to its normal position.

Anyway, I've been building my own xchat for years, and here's the current patch I apply to it: xchat-2.8.6.diff.

exmap: make it build

I wanted to try exmap for showing memory use on my system, but it totally failed to build, and the patch in Ubuntu bug 284863 wasn't enough. I had to fix quite a few other things, and also install libpcre3-dev/libpcrecpp0 and libgtkmm-2.4-dev/libgtkmm-2.4-1c2a. Here's my patch: Exmap 0.10 patch for Ubuntu Jaunty and kernel 2.6.30.4.


Programming topics on my blog | Shallow Sky Home