I often like to read and edit documents, articles, and papers on my Palm device (using the excellent QED), and then continue back at home on the Mac. This requires quick and easy inter-conversion from .txt to .pdb. In addition, for reading PDFs as text, the conversion must respect the column flow in multi-column PDF fliles (or else you end up reading across, rather than down, the columns in your text file).
This is how to create AppleScript droplets to convert text, PDF, and Word documents to .pdb and then back to text.
The Scripts:
This is how to create AppleScript droplets to convert text, PDF, and Word documents to .pdb and then back to text.
- Read and follow this excellent hint for converting text to pdb for Palm OS. Make sure during this you pay attention to:
- Installing xCode tools first (to compile unix make/install files)
- The tips about using sudo to avoid "permission denied" errors
- Use the following scripts to do your conversions...
The Scripts:
- Convert PDB to text ... When saved as an application in Script Editor, this will convert any pdb files to txt, then delete the original pdb file. The folder path used is:
So replace tangawk with your username, and Desktop/pending_junk/boks with whatever you want to use as your conversion ground. I basically leave my applet in the boks folder, and drop all files I'm working with in there, so I can drag and drop easily onto the applet. I am no AppleScript expert, but it works to a tee on multiple files as well./Users/tangawk/Desktop/pending_junk/boks
Practial Points:- Remember, the script will delete the original pdb file -- it's easy to memo this out in the script if you don't want that behavior.
- Keep the folder window as the front active window in the Finder, or else the rename part of the script won't work (you will just get .pdb.txt rather than .txt as your file suffix, they will still get converted).
- I find that if you do want to continue editing the converted text file (from .pdb), Word or BBEdit preserve line spacing better than Apple's TextEdit.
Users/tangawk/Desktop/pending_junk/boks
with your own in each script, then keep all the saved applets there so you can drag and drop to convert at will!
- Text to PDB
- PDF to text
- PDF to PDB -- this is a droplet version of the script linked in the hint at the start of this hint. Again, it's great for batch conversion of scientific papers for reading on your Palm on the train. Edit in QED, then drop the PDB back on the pdb-text applet above, and continue at home!
- RTF/DOC/HTML to text via Word -- this was written to batch convert .rtf or .doc to .txt for subsequent conversion to .pdb or other things. Useful if your eBook comes as .rtf, and you want it as .pdb. Make sure your version of Word is set to open without the welcome screen, or the script will founder. At a pinch, the script will also work with simple .html files, as Word will recognise and convert these (ie strip HTML code from text).
Change .rtf in the renaming part of the script to doc or html as appropriate (but as previously, conversion to text will still occur).
•
[55,615 views]

