pythonaro.com

Pythonaro blog

18 December 2007

KDelicious 3.0 (+ roadmap)

After a few days of obsessive bugfixing, I've finally released KDelicious 3.0.

This is a big step forward from pykeylicious: it now uses PyKDE components to save preferences and interact with the network, which means transparent support for proxies and KWallet.

On the usability side, I've moved the option "Tag this post on del.icio.us" to its natural place, out of the submenu. There's now a GUI to manage options, which means that you can now switch del.icio.us username or choose how to rearrange your locally-synchronized bookmarks, all from a nice and simple interface.

Unfortunately, the resulting proliferation of files forced me to adopt a "proper" installer mechanism, and for now I settled on distutils. This has one major drawback: non-root installs are much harder than they used to be, if you don't know your way around python.

Mainly for this reason, I (foolishly) decided to maintain two codelines. Pykeylicious 2.x will still be available for people who can't be root or don't have/want the KDE bindings for python, in bugfixing mode. It will not have support for proxies, unless somebody else hacks it in. I hope this doesn't come back to bite me; I'm actually tempted to "downgrade" pykeylicious to 1.0, which got better feedback than 2.0.

In the short time (3.1) I'd like to get rid of all calls to kdialog. I resisted up to now because they work and are fairly low-maintenance, whereas using the proper bindings need a little bit more infrastructure, but they are really ugly and slow and I hate when dialogs stick around after the program crashes. I am also tempted to use the python-dcop bindings, but they look complicated and dcop is going away in KDE4 anyway, so I don't know if it's worth it.

One thing that didn't make it in KDelicious 3.0 is support for Ma.gnolia.
I personally don't use the service, but they (very cunningly) expose a mirror of the del.icio.us API to allow for an easy switch, so adding the new backend shouldn't be too time-consuming. Unfortunately they don't support bundles, which in KDelicious are very useful for sorting the locally-synchronized bookmarks. I'm thinking to add this "multi-backend" option in 3.5.

For 3.2 I might package it for debian. The only reason for the effort is to have an "uninstall" option, that distutil hasn't. It's a boring job, but probably necessary. I'll also try out other del.icio.us plugins to steal featu--- ahem, get "inspiration" for new features.

By the time all this is done, KDE4 will have been around for a while (see my previous post)... KDelicious 4 might be a very nice app by that time ;)

Labels: , , , , , ,

posted by GiacomoL @ 1:19 PM   0 comments links to this post

17 December 2007

Things I learnt last week on Python, PyKDE and KDE

  • if PyKDE segfaults on you, don't despair: you are probably just using the wrong arguments for a method call. Get the right invocation and you'll be fine, no need for recompilation or other drastic measures.
  • KCmdLineArgs is cool!
  • how to use KConfig from python (saves so much time):
    conf = KConfig("your_rc_file") # ends up in $KDEHOME/share/config/
    conf.setGroup("yourgroup")
    conf.writeEntry("your_option","your_string")
    # non-string values DON'T work
    conf.sync() # this will actually write out the stuff
  • KIO.NetAccess can save a lot of trouble storing passwords etc., seamlessly integrating with konqueror and kwallet
  • distutils is cool, in its own way. PyPi integration looks terrific, can't wait to upload my stuff there...
  • dependency checking in distutils still sucks. Either you go with setuptools, or you have to litter your setup.py with ugly import tests.
  • kdedistutils (from pykdeextensions) looks useful enough
  • the KDE TechBase is very good for KDE4. For KDE3, better to get the kdelibs-apidoc packages in your distro. Don't understand why (on Debian Etch) it doesn't register with QtAssistant.
  • Google Translations can be weird.

I'm very close to releasing "KDelicious 3.0", which is a big improvement on pykeylicious. While adding a few "simple" options to manage how del.icio.us bookmarks are imported into Konqueror, I tried to refactor out nontrivial code from the main script into modules, and added a GUI to manage these options. I also pushed the integration with KDE in order to do things like transparent proxy support and kwallet integration, which spared me from maintain connection code, passwords, etc... I ended up with several files to distribute, which required a "proper" installer.

This release will still use the kdialog hacks. I'll get rid of them in 3.1, because I really want to put this out before the end of the week and get some feedback.

On bookmark synchronization: in an ideal world, synchronization would be done in the background, if we are online, every couple of hours, and by just pulling the more recent posts. But this is a bad world, and I'm a bad coder... KDelicious will only synchronize manually, will download all your bookmarks each time it runs, and will just try to stop you from getting banned by del.icio.us if you launch it too often. The only way around this would be to write a KService or a systray applet (which would also allow me to support other "minor" browsers like Opera), but this stuff is changing in KDE4 so I don't want to spend time on it before march.

After Christmas I'll think about putting the code on sourceforge (or savannah, or something) and have a proper homepage for it. But first, let's release ;)

Labels: , , , , , , , , ,

posted by GiacomoL @ 2:46 PM   0 comments links to this post

04 December 2007

pykeylicious 2.0

Why stop when you're having fun? :)

pykeylicious 2.0 is out, with a brand new feature: local synchronisation of your del.icio.us bookmarks! I hope people will like that one (and the few bug fixes here and there).

Now I'll probably take a break; further features (heck, even the current ones) will require a configuration screen, and there is only so much you can do by leveraging kdialog. The logical step would be to implement a "proper" PyQt application, which will require a bit of time and effort; in the short term, I'll probably just release a 2.5 version to support system-wide installs (the only feature from konqil.icio.us that I didn't replicate).

Labels: , , , , ,

posted by GiacomoL @ 10:35 PM   0 comments links to this post