Series 5 text file conversion


[ Site Index] [ Attic Index] [ Psion Index] [ Feedback ]


The Psion Series 5 is more than a palmtop; it's a fairly serious piece of computing hardware that just happens to be small enough to fit in a pocket. To put it in perspective, it has rather more storage, memory, and processor performance than my first PC -- or even the high-end 386 I had in 1990. It's quite adequate as a tool for writing a book with; indeed, when all the necessary software has come out it will be a formidable productivity tool.

The sad fact is, though, that the Series 5 came out before the built-in software suite was finished. There are rough edges, bugs, and some misfeatures that make it less than a joy to use.

For me, perhaps the worst problem is the lack of interoperability with any system other than Windows 95 or Windows NT. The Series 5 ships with a kit called PsiWin, that permits it to talk to a Windows system and exchange and translate files. If you have access to a machine running Windows PsiWin fits the bill perfectly. Unfortunately, if you don't have access to a Windows machine, it becomes a pain in the nether regions.

The thing is, Psion's new operating system, EPOC/32, uses a fairly radical mechanism for storing file information. EPOC/32 is object-oriented, and data files for the Series 5 applications use an engine called the 'stream store'. Basically, as with Microsoft's OLE/DCOM technology, what is saved in a file is not a stream of data which the application can use as hints about how to reconstruct its internal state; rather, a Series 5 file is a snapshot of the internal state of the objects making up a current Word or Sheet or Agenda application. These objects are stored as 'streams', and multiple streams may coexist in one file. This has certain advantages, in that it makes writing programs that can handle embeddable objects easy, which lets you put a Sketch object inside a Word document, for example. But it's a real bugger to pull the data out of a stream store file and into some other application.

Psion's PsiWin product manages the translation by virtue of including an entire (sans user interface) copy of the EPOC/32 operating system, with hooks into a file format translation library provided by a third party. You guessed it right: the Psion translation kit requires a Windows 32 bit system in order to run. The on-board applications can just about import and export to ASCII files -- but anything more complex (such as RTF for Word, or CSV for Sheet) is out.

Hopefully Psion will ship some native translators in the near future (possibly in the 1998 1.1 ROM upgrade). In the meantime, what options are available for those of us who need to coerce a Series 5 into coexisting with UNIX or Linux workstations?

For starters, a Series 5 can exchange files with a UNIX box using the built-in Comms application and a suitable Xmodem or Ymodem capable client. (I use the common Linux package minicom, at 19200 baud, which seems to be the fastest reliable speed for piping data through rz/sz.) Ymodem protocol lets me read and write text files and other files fairly effectively, and I've managed to install third- party Series 5 applications that way.

A text editor is under development, and a port of Elvis (a vi clone) has been promised. In the meantime, it is possible to use Series 5 Word as a text editor. However, Word has some annoying characteristics. There is no option to set the line-end character in the text files it exports. It exports each paragraph as a single unwrapped line. And when importing text files, it assumes each line is a single paragraph.

To make it easier to work with text files on a UNIX box and a Series 5, I've written two Perl scripts.

The kit contains two tiny perl scripts to make it easier to move text files between a unix box and a Psion Series 5. To run these programs you must be working on a UNIX or Linux system with a properly installed Perl 5 kit (Perl 5.002 or higher, plus standard libraries).
The programs are:
s5-to-txt Take text files exported from Series 5 Word; remove trailing carriage returns, wrap paragraphs to 72 columns, and space them out nicely for editing using vi or emacs.
(Takes one option ... -c ... which tells it to strip a couple of characters of trailing crud that appears in at the end of paragraphs in some exported text files.)
ux-to-s5 Take a text file containing paragraphs (blocks of lines separated by blank lines)and reformat it as one-line paragraphs, suitable for import into S5 Word.
Both programs accept lists of files to work on. Both of them preserve the old versions by adding the suffix .bak to them.

Argument handling is currently rudimentary but I suppose someday I'll get round to adding getopts support in s5-to-txt to control the formatting parameters more precisely.


[ Site Index] [ Attic Index] [ Psion Index] [ Feedback ]