memo2html
28th May 2003
(last updated: 5th July 2003)
What is it?
memo2html is a perl script for users of a
Palm Pilot. You add a few
simple tags (like
@file index.html) to some memopad files, hotsync, double-click the script and the
tagged files are converted to interlinked html pages, which the script can (optionally) FTP to your
website.
Here are
my pages, as generated by memo2html.
Why?
I made a lot of notes on my Palm, and decided I needed something to convert some of them for the web.
First I tried to use Eric Anderson's
pilot2html,
but after playing with it for a while, I decided to roll my own. A lot of credit is due to Eric, however,
as he has provided the MemoPad.pm perl module that allows memo2html to read the memos - without that, none of this
would be possible.
What could memo2html be used for?
- Publishing random notes
- Lecture notes
- Blogging
- ... and anything else you like.
More details
Non-tagged memo files will be ignored by memo2html.
Missing index files will be generated automatically.
memo2html generates the collection of html files from the memopad database file, stored on the desktop
PC as memopad.dat when you hotsync. This means that any changes you make to the html files are
overwritten each time you run memo2html. Work only from the Palm Pilot if you want to change your pages.
If you use the FTP option, directories are created as necessary, but old files and directories are not
removed prior to upload. This means that old 'dead' files may sometimes linger - just empty the relevant
FTP directories occasionally and you should be fine.
Download
Requirements:
- Palm Pilot, newish HotSync software that already works
- A perl interpreter. Download a free one from ActiveWare (approx 11MB), and install.
- An FTP account (if you wish to use the FTP feature)
Required files:
- The Pilot::Memopad perl module. Download from Eric Anderson's website. Go to wherever you installed the perl interpreter, and put this file in lib/pilot (you may have to create this directory yourself)
- The Net::FTP perl module. Again, go to wherever you installed the perl interpreter and extract the zip into lib/net (you should end up with lib/Net/FTP.pm and five files in lib/Net/FTP/)
- The memo2html.pl perl script. Put this wherever you like (I have mine in C:\program files\memo2html).
- The memo2html.css file. This controls the formatting of the web pages produced by the script. Put this next to memo2html.pl, and upload it to your website if using FTP).
Here is a handy ZIP archive of all the files above (except the perl interpreter) and a README.
Note: Some configuration of memo2html is
absolutely necessary before use. Read on...
How to use memo2html
Now, assuming you have met all the requirements above, and that I haven't forgotten anything, this is what should
happen next:
- Create some memos on your palm pilot. On the first line, write @file your-filename.html.
On the second line, specify a category with @cat your-category-name (note: these do not have to match any memopad categories)
Whatever you write on the third line will become the page title.
- Edit the memo2html.pl file in a normal text editor. In the 'Settings' section, ensure that the
path to your Palm Pilot data directory is set. If you wish to use the FTP option, enter the details of your
FTP account in the appropriate places. You will be prompted for your password when the script is run.
- Double-click the memo2html.pl script
- You should see some text output, describing the number of files converted. HTML files will appear in
the directory specified as $output_dir in the script (relative to the script). You can specify "." as the output directory if you wish the new html files to appear in the same place as the script.
Layout of files on the Palm Pilot
Firstly, it doesn't matter what memopad category your files are in. It is the @cat line that defines which category the resulting
html pages will be placed in. Memopad categories are entirely ignored.
A typical memopad file would look like:
After creating this file, memo2html will automatically create an index for the 'notes' category. However, if you create a file called 'index.html' in a category, then your index.html file will override this feature, and you'll have to manually update your index file whenever you create new files. If you don't do this, then noone will be able to find links to these pages.
You might want to see the section 'Further Notes' to find out how to create hyperlinks.
Further notes
- You can specify your own index.html files - memo2html will not overwrite these.
- Lines starting with @h1 or @h2 (etc) will become headings.
- The presence of a line starting with @private will cause the FTP feature to ignore that file. The html will still be generated on your PC, but not uploaded.
- You can make hyperlinks using lines starting with @link followed by the name of the link, then the address (e.g. @link Interesting Stuff mynotescategory/interesting.html)
Useful hint: to insert the current date into a memo, draw a cursive 'l' with your stylus (like

), then the letters
d s (
more info).
Contact details
If you have any problems with the above, send an email to

with the subject line 'memo2html'.
Author's website
http://www.duncanjauncey.com
Credits
A big thanks to Eric Anderson for writing the MemoPad.pm perl module, and to Debbie Peckenpaugh for contributing the zip file and associated README.