Some Minor Software Projects

14:37 Sun 27 Jan 2008. Updated: 23:14 28 Jul 2009
[, , , , , ]

I already have a buch of plans for larger projects, including finishing the sfmagic.org rewrite, but I think it makes sense to have some smaller projects to work on as well, things that I can switch to and make significant progress on in a relatively short amount of time.

The following list is what I’ve come up with so far. I haven’t chosen a language for each of them, but I would prefer to do most of them in Python or JavaScript (or both). Some may require shell scripting and/or other languages.

Implementation of Discordian date converter: ddate is already out there, and the source code is available. The objective here would be to have a program that takes a YYYY-MM-DD string and outputs the appropriate Discordian date. The first pass would probably be nothing more than a wrapper around the ddate binary, but ultimately I would like to write a version in Python (and possibly JavaScript). I suspect that this may not be such a ‘minor’ project, but it depends on how complicated the conversion really is.

Parser to go from my book files to JSON objects: I keep lists of books i’ve read, and they’re loosely structured. It would be useful to have a parser that could go from that loose structure to a set of JSON objects containing all the data, especially for when I get around to my book-tracking project and might need to mode the data into the new system. It might well take longer to write the parser than to enter all the data by hand, but that’s okay.

Parser from individual card pages in Gatherer to JSON objects: I don’t have a strong use for this at the moment, but I suspect that at some point in the future it’ll be useful to be able to grab an individual card from Gatherer and put its data into structured form.

Card price grabber that goes to see what set(s) a card is in, and then prints prices for each set: This would piggy-back off the previous program, look up each set on magictraders.com, and parse the prices for the card in each set it’s in. This might eventually be useful if I want to check prices easily from sfmagic.org, but I suspect that if I start doing a lot of price lookups I’ll end up pulling in the entire datasets from Gatherer and the price lists and combining them in my own database, which would make a parser for individual prices unnecessary.

Script to check for modified/added files from svn stat and then allow for checkin of all/some of those: I often find myself wanting a quicker way to check in some of the files that I’ve modified. This would be an attempt to write a small UI for doing that, as suited to my work practices. It’s possible that Subversion’s implementation of changelists will take care of this problem.

“Copy link with text and title” functionality for Firefox: I often find myself wanting to copy not just a link’s location or it’s text, but both, plus its title (if it has one). This project would be the creation of a Firefox plugin that would add that functionality to the right-click menu. I have no idea how to write a Firefox plugin, but hope that it won’t be that tricky.

List of ‘tricks’ for list comprehension/generation/manipulation in Python and JavaScript: This one isn’t a real application per se, but I would like to make a list of the various ways in which I learn how to manipulate lists and dicts (and their JavaScript equivalents), because doing this kind of thing is extremely common, and I swear I forget some of the cool ways to do some of these things just after I’ve used them on a particular project—although I could be wrong, and it could be that a difference use case presents a subtly different problem that the previous approach just doesn’t work for. In any case, documenting each one of these, with examples and notes, would be rather worthwhile for me, and might be useful to others.

HTML-link-syntax to reST-link-syntax conversion step: I’ve commented before on my liking for reStructured Text, and in that article mentioned that I couldn’t stand its link syntax and that perhaps I should write a converter for that. At the time it struck me as an annoying extra step, but at the moment it doesn’t seem that annoying, as it could just be used as a pipe, allowing me to use most of reST and all of its various conversion packages. I’m not sure how difficult this would be, but it doesn’t strike me as too tough. This on would be Python, but I might consider trying to write a jEdit plugin for it. I might want the converter to go the other way, from reST links to HTML links, and I’m not sure if that would be trickier.

Going from some arbitrary list of JSON objects to a list of data points that Flot would expect: I experimented with Flot, a jQuery graphing plugin, over the holidays, and was annoyed by how much work it took me to get my data, which was relatively structured at that point, into the form that Flot likes (arrays of coordinates, essentially). So a converter seems like a reasonable thing to have, if I’m going to use it further. This is something that I would probably put into sfmagic.org at some point.

Rewriting my autocomplete dropdown, first for efficiency and then as a jQuery plugin: When I wrote the first incarnation of sfmagic.org, I added a JavaScript dropdown widget to the text inputs for entering card names. This was one of my first experiments with AJAX, and it worked rather well for my purposes. I extended code from http://blog.liip.ch/archive/2004/07/05/spotlight_like_livesearch_added.html and made some significant improvements, as well as tweaking it to match my own use cases. I always meant to contribute my changes back to the project, but never got around to it. At this point, JavaScript has come on quite a bit, and I should refactor it and then refactor it again as a jQuery plugin. Again, I would end up using this on the new sfmagic.org.

One Response to “Some Minor Software Projects”

  1. JC Says:

    Thank you for that WTF moment of the day, because a Discordian date converter would be so useful….. Wait! Did I just say that out loud?

    I’ve never tried modifying jQuery plugins, but once you figure out how to reference the plugin class itself, you should be able to just overload the main method using the proxy pattern. Invocation would then become:

    var plot = $.plot(div, listOfMyObjects, options);

    If it doesn’t work, well I’ll blame it on ignorance on my part.

Leave a Reply