Hein (fub) wrote,
Hein
fub

  • Mood:

Transitioning...

I'm busy with rewriting my FitOnCD application.

The original version is programmed in VB6, and calculates the optimal filling of CDs with fansubs, according to various heuristics -- I added a DVD setting later. It can use Nero to burn the episodes to a DVD+R, and then records the series & episodes in the CDIndex database for later retrieval.
Obviously, it only works under Windows -- so if I want to burn off a bunch of fansubs these days, I gotta boot back into WinXP to do it. Clearly, that won't do, as I remarked earlier. CDIndex has been (partly) rewritten as a series of PHP pages, and so it was time to tackle FitOnCD. As it needs extensive access to the filesystem, this had to be a proper application, and not some web-based progsel.

And so I dusted off my Python book, and dove back into Python and PyGTK.

The new FitOnCD already does a lot of stuff. It traverses the disc, looking for fansubs. It parses file names for episode numbers. It can rename a single file or automatically rename all episodes into a uniform pattern. It calculates an optimal filling for a disc. It can write that filling into a Brasero project file (which, sadly, seems to be lacking the capabilities to set a volume label).
Now I'm busy with writing the episode information into the CDIndex database. And then I find that low-level control over some things is fine and dandy, but it's a lot of hassle to get slightly non-standard things done. For instance, to run a modal dialog, I have to subclass GtkDialog, and add my own events in, chant the right magic runes, and only then will it work. In VB, I could simply create a new form, add my controls and code to it, and call it with something like 'MyForm.Show 1' to have it shown modal.

I'm sure it's architecturally so much better to do it the hard way, but I'm not in the business of making architecture. I'm trying to make a quick and easy application to solve one of my problems. So far the experience has been mixed: some things are easier, other things a lot harder. If there was a VB equivalent, I'd go (back) to it in an instant.
Tags: linux, programming, python
Subscribe

  • Rewriting URLs

    This weekend I have been busy with crafting some rewrite rules for the Apache webserver, for the webshop. I had to insert some queries that search…

  • Quick 'project'

    I found the schematic for an electronic die online, based on a PIC 16F628A. Basically, the program keeps counting from 1 to 6, and 'slows down' when…

  • Google Checkout

    Google Checkout has launched. It is the long-awaited 'PayPal Killer'(*) by the guys from Google. While this is certainly an interesting development…

  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 2 comments