Converting massive e-book-collections with Calibre and GNU Parrallel

Calibre deals well with massive e-book collections, but it does not offer full text search (as far as I know). If you are on a Mac there is a decent search engine for your personal files built in, called Spotlight. However, Spotlight is not able to search the contents of EPUB or MOBI e-book files. This is why I decided to convert my collection to plain text.

Calibre offers the capability to bulk-convert a lot of books in parallel, but at least on my system it quite often froze after a couple of minutes. Calibre also lets you convert books from the command line with the ebook-convert command. Combined with a simple find and GNU Parallel it can be used to convert massive collections with a one liner:

find $your_library_location -type f -iname "*.mobi" | parallel --timeout 120 --progress "/Applications/calibre.app/Contents/console.app/Contents/MacOS/ebook-convert {} {.}.txt"

Parallel will try to saturate all the available CPUs on your system and can even scale out to other machines with a little more tweaking. The --timeout option will kill off any spawned sub-process that takes longer than the given ammount of seconds, which is nessecary, since sometimes the conversion seems to hang for no apparent reason. The option --progress will give you an idea how many jobs have been completed yet.

Parallel can be installed via the excellent homebrew project by running brew install parallel. The location of the ebook-convert command may vary on other systems, if I remember correctly Ubuntu sets it up correctly when installing Callibre via APT, so you can omit the path.

For me this works well enough and seems a little more robust than Calibres own job-scheduling mechanism. Hope this helps someone else.

Notes on rooting my Motorola Defy

Yesterday I got my new Motorola Defy. The main reason I decided to buy that model instead of another was the CyanogenMod-Support. The Guide in the CyanogenMod wiki provides an excellent resource on how to root your phone, install a bootmenu and finally flash the current Version of CM on the device.

My problem, however, was that the process described in the rooting section of the page did not work for me. I could log into my device via adb, copy the exploit files over, execute them, but they had no apparent effect (apart from outputting a “doing my thing”-message and disconnecting the adb session”). I had to search for another way to root the phone and stumbled upon SuperOneClick which, apart from being written for Windows, is an awesome tool and worked without a flaw.

So if you’ve got a Motorola Defy and the rooting-method described in the CyanogenMod-wiki does not fly, try this guide. Also consider donating to the author of SuperOneClick and CyanogenMod for putting in the effort that your phone manufacturer isn’t.

fixing force-close issues with android keyboard

I just spent the last couple of hours fixing my phone, maybe this saves you some time.

Out of the blue the (software) keyboard on my HTC G1 / Dream stopped working. Basically I got force-close messages as soon as I booted the device. Re-flashing Cyanogenmod (5.0.8) didn’t help. After running the log collector and sending myself the logs and spotted the following:
Continue reading

making gitk with Ubuntu 9.10 usable

If you happen to use gitk and Ubuntu 9.10 with desktop effects, you might notice that gitk and other tk-apps tend to look like crap (i.e. giant fonts, buttons, etc), rendering them useless.

gitk looking like crap

gitk looking like crap

I found the solution for this in a blog entry of the Navarra Group. All you have to do is sudo aptitude install tk8.5 and sudo update-alternatives –config wish (here you select wish 8.5 from the list).

gitk looking good again

Neat!

Tracker goodness in Ubuntu Karmic Koala

As I noticed today, the desktop-search Beagle seems broken (again) in Ubuntu Karmic Koala. The most annoying thing is that nothing tells you that it’s broken. Only the fact that Beagle doesn’t index a thing, no matter what you change in beagle-settings, gives you a hint.

For some reason I don’t even remember I’ve been a bigger fan of tracker anyway for a while. Installing on a fresh Karmic works like this: sudo apt-get install tracker tracker-search-tool tracker-utils.

If you, like me, frequently use Deskbar, you might also want to install the package libdeskbar-tracker. This enables you to get search results from tracker as you type. If the tracker daemon does not start automatically, you can start it by hand running /usr/lib/tracker/trackerd. To all I know the tracker applet also refuses to start, untill the daemon is up and running.

Duden Korrektor Openoffice-Plugin unter 64 Bit Linux betreiben – nicht.

Korrektur: Die unten angegebene Methode ist leider doch nicht das gelbe vom Ei. Zwar installiert das Plugin ohne Fehler, die Symbolleiste wird in OpenOffice angezeigt, jedoch ist die Rechtschreibprüfung immernoch die von Openoffice. Grammatikprüfung findet ebenfalls nicht statt. Wenn irgendjemand einen guten Tipp hat, immer her damit. Soweit ich sehe, ist die Software komplett in Java geschrieben und sollte laufen, tut es aber nicht. Zu schade.

Der Duden Korrektor für Openoffice und Staroffice läuft, auch in der aktuellen Version 6.0, nicht ohne weiters unter 64 Bit-Versionen von Linux.

Um der Openoffice-Erweiterung von Duden 64-Bit “beizubringen” muss, wie unter diesem Kommentar beschrieben, lediglich das Installationarchiv leicht angepasst werden. Mit einem ZIP-fähigem Archivmanager muss die Datei description.xml im Wurzelverzeichnis der Datei duden-korrektor-openoffice.oxt angepasst werden.

Das Attribut value des Elements platform muss angepasst werden. Aus dem dortigen <platform value="linux_x86" /> macht man einfach ein <platform value="all" />. Damit lässt sich die Erweiterung auch unter 64-Bit Systemen installieren.

Einen weiteres Problem hatte ich, als Openoffice bei der Installation der Erweiterung das fehlen einer Java-Bibliothek namens LuceneHelpWrapper.jar bemängelte. Unter Ubuntu Karmic hilft, so dieser Kommentar, das Installieren des Paketes openoffice-java-common.

Soweit ich sagen kann läuft der Duden Korrektor für Openoffice mit etwas Hilfe auch unter 64 Bit-Systemen fehlerfrei. Ob dies auch unter Windows ein Problem ist bzw. der Lösungsansatz dort auch funktioniert kann ich, mangels Testsystem, nicht sagen.

Echtzeitkollaboration mit Etherpad

Mit Etherpad, ein Echtzeit-Kollaborations-Notpad-Dingsi, wurde von Google unter einer OSS-Lizenz veröffentlicht. Dies könnte die Wartezeit auf einen eigenen Google-Wave Server etwas versüßen. Auf Piratepad.net kann man das ganze schonmal ausprobieren.

via Slashdot Technology Story | Google Open Sources Etherpad, Piratepad Launches.

Angewandter Aberglaube

Wegen gefährlicher Körperverletzung wurde ein 62-jähriger Heilpraktiker aus dem Ostallgäu zu einer Haftstrafe von zwei Jahren und sechs Monaten verurteilt. Das Kaufbeurer Schöffengericht hielt es für erwiesen, dass der Mann im Mai 2008 einem Urlauber-Ehepaar aus dem Raum Trier zum abrupten Absetzen der Epilepsie-Medikamente seines behinderten Sohnes (28) geraten hatte.

via Heilpraktische Lebensgefahr « Brights – Die Natur des Zweifels.

persönliche Freigaben unter Ubuntu

Habe soeben das Phänomen gehabt das die Nautilus/Gnome Freigabeansicht eines Ordners behauptet hat dieser wäre nicht freigegeben, der Ordner es aber eindeutig war. Solche Phantomfreigaben lassen sich durch löschen der jeweiligen Datei unter /var/lib/samba/usershares beseitigen.

Für persönliche Freigaben gibt es keinen Eintrag in der allgemeinen Konfigurationsdatei /etc/samba/smb.conf. Statt dessen wird für jede dieser Freigaben im Ordner /var/lib/samba/usershares/ eine eigene kleine Textdatei mit den nötigen Angaben angelegt. Diese ist Besitz des jeweiligen Benutzers; nur dieser kann sie verändern oder löschen.

via Samba Server GNOME › Wiki › ubuntuusers.de.

Kartierung mit dem T-Mobile G1

Mit der Android-Applikation My Tracks soll man wohl hauptsächlich seine Wander- und Laufrouten aufzeichnen können. Garnix für mich Antisportler. Aber das Programm exportiert die aufgezeichneten Strecken auch wunderbar nach KML oder GPX, letzteres eignet sich seine zurückgelegten Strecken zum OpenStreetMap Projekt hochzuladen. So kann im Prinzip jeder mit einem GPS-fähigen Andrid Handy mithelfen das freie Kartenmaterial zu verbessern.

Meinen ersten glorreichen Versuch könnt ihr hier bestaunen.