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

  • Friday Five

    What’s your favorite color this week? Judging by the colour of the T-shirts I wore, black. Same as any other week! 🙂 What job would be…

  • Friday Five & GenX

    What toys were popular when you were a kid? This was the height of the 80’s, the time of cartoons on TV pushing toys. They were expensive…

  • Small update

    Wow, I haven’t posted in over a month here. And yet I still don’t feel like I have much to say. Let’s see… – The…

  • 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