DiddleBug Extractor 2.1

Drawing pictures on your Palm

I use an excellent free Open Source program called DiddleBug on my Palm Treo 700p for doing small black and white drawings. The latest version of DiddleBug creates 320×320 pixel size drawings. These are referred to on their site as “high-res” pictures instead of the 160×160 pixel size drawings that older versions of the software created.

Getting DiddleBug pictures off your Palm

I used to use a nice converter on my Windows laptop called WindleBug but wanted to be able to just use my Mac laptop by itself instead.

The DiddleBug FAQ mentions using a Perl script called Didcon on Windows, Linux and OS X which hadn’t been updated yet to extract the new 320×320 pixel sized images. When I ran the Didcon script for the first time, it saved out a 160×160 graphic that had weird lines running throughout it, due to the fact that it wasn’t reading out the data for a 320×320 pixel sized graphic.

After hacking at it for a little while, including researching how to correctly indicate the pixel size of an image in a Windows bitmap in the header of the file, I managed to get a working script that correctly outputs a 320×320 .bmp file.

This is the modified script, and I’m also including a second script that you can double-click in the Finder to run the extraction process.

Assumptions

These instructions are written for using Mac OS X and were tested using a Treo 700p, the latest version of DiddleBug (v.2.90.d.5), OS X 10.4.9 running on a PowerBook. This should probably work for most Mac users. Windows and Linux users, see the note below.

These instructions assume that you have already downloaded the DiddleBug program and have used it on your Palm or Treo and have also synced your Palm with your computer.

To verify that you have taken the correct preliminary steps, look in your Palm backup folder: ~/Documents/Palm/Users/YOUR_PALM_USERNAME/Backups/

You should see files named DiddleBug.prc, DiddleBugDB.pdb, and DiddleBugHRDB.pdb in this directory.

If you don’t see those files, then probably you haven’t installed DiddleBug yet and this script won’t do anything for you. If you do see the files, then proceed with these instructions.

Instructions for using DiddleBug_Extractor_2.1 with Mac OS X

Create a new folder in your ~/Pictures folder called “DiddleBug”.

Download the DiddleBug_Extractor_2.1 ZIP file package.

Unzip the package (DiddleBug_Extractor_2.1.zip). It contains 5 files:

README_2.0.html

README_2.1.html

didcon.pl (the original, use this if you still have 160×160 pixel sized images)

Open extract_320.command in a text editor (like TextWrangler, SubEthaEdit, vi, TextEdit, etc…) and put in your Palm username in the field where it says “INSERT_PALM_USERNAME_HERE”. Save and quit.

Double click on extract_320.command. You should see a Terminal window open and a message stating that each file has been extracted. They will be named diddle1.bmp, diddle2.bmp, diddle3.bmp, etc…

Open the DiddleBug folder you created (~/Pictures/DiddleBug/)

You should see the files that were extracted. You can now import them into iPhoto, upload them to Flickr, view them using Preview, whatever you want.

NOTE: The extract.command script will DELETE all the files in ~/Pictures/DiddleBug/ before it extracts them each time you run the script. This will make sure that you always get the latest version of the drawings. At some point in the future I might enhance the script to be a little bit more smart about updating individual pictures only if they had changed, but for now this is the behavior that makes the most sense to me.

How it works

The extract_320.command file contains a bash shell script that first deletes the old extracted files and then runs the didcon_320.pl Perl script using the -w flag and diddle as the file naming prefix. If you want to edit or change this file you can simply make a change then save.

Using Windows or Linux?

If you are using Windows or Linux, you can run the Perl script directly instead of using the extract_320.command file. To do this you should use the following syntax:

The extract_320.command file is the exact same thing as a bash shell script, so to use it in a Windows or Linux environment, you should be able to rename it to extract_320.sh. Make sure your paths are correctly adjusted to the right locations for your operating system and that the file is chmodded to be executable.