JmakeZtxt konvertiert Textdateien in das Format, das die Anwendung Weasel Reader auf einem PalmOS PDA darstellen kann. JmakeZtxt ist in Java geschrieben und sollte auf jeder Maschine laufen, die eine JRE zur Verfügung stellt. JmakeZtxt wurde auf Linux und verschiedenen Win's getestet.
Einige Features sind:
automatisches Entpacken der Project Gutenberg Zip Dateien
Mehrsprachigkeit (z.Z. Englisch und Deutsch)
Graphische Oberfläche und Kommandozeilenunterstützung
Textvorschau
offen für weitere Formatierungen (noch nicht vollständig umgesetzt)
Unterstützung beider Weasel Reader Kompressionsformate
Die ersten Java Versionen von JmakeZtxt wurden von
Martin H. Smith geschrieben.
Ich kümmere mich seit Version 1.42 um JmakeZtxt. Vorschläge oder Anmerkungen zu JmakeZtxt sind willkommen unter
khoho@users.sourceforge.net.
Wer eine weitere Sprache zur Verfügung stellen möchte, wende sich bitte auch an
khoho@users.sourceforge.net.
khoho@users.sourceforge.net
Quellcode und Binärdateien unterliegen der GPL Version 2. Ich stelle dieses Programm kostenfrei zur Verfügung und garantiere nichts. Verwendung auf eigene Gefahr.
JmakeZtxt verwendet die Java Version von GNU regexp, die unter http://www.cacas.org/java/gnu/regexp erhältlich ist. Eine Binärversion liegt dem Jar im Download bei.
JZlib ist unter http://www.jcraft.com/jzlib erhältlich. JZlib ist ebenfalls im Download enthalten.
upUm JmakeZtxt zu verwenden wird folgende Software benötigt:
Empfohlen ist Version 1.4. Java JREs sind hier erhältlich: http://java.sun.com.
upSie sollten eine Version des aktuellen Jars vorliegen haben.
upDieses Kommando sollte aus dem Verzeichnis, in dem sich das Jar-File befindet, ausgeführt werden:
java -jar ./jmakeztxt.jar
On MS Windows machines a double click on the jar file might suffice and you won't need to enter the above command line in order to start JmakeZtxt. JmakeZtxt will start using the language closest to the one your machine is working with. When you want to choose the language yourself use one of the following command lines. Currently only English (default) and German are supported.
java -Duser.language=default -jar ./jmakeztxt-1-43.jar
java -Duser.language=de -jar ./jmakeztxt-1-43.jar
The double click or the command should display the main screen of the GUI. From here you specify the files and document title, set up the formatting preferences and then generate the output document ready to be downloaded to your Palm. This screen should look like the one below. It may look slightly different on your system as it uses the native look and feel for the platform if there is one available but all the same things should be there.

The usage is quite simple. The main screen has three text fields. Set them to the input and output files and the desired title of the new document. The preview and process buttons then become active.
If you want the new format then select the checkbox. This setting is saved with the other options. The advantage of using the new format is that there is no need to decompress the whole document before it can be displayed. The disadvantage is that the files are 10-15% bigger than the old format.
To see a preview of the text press the preview button. This will unpack the zip file if necessary and run the text through the formatter. It will then display a dialog like the one below containing the text:

The options menu on the preview window allows you to switch word wrapping on or off. This has no effect on the text or the document compression process but may make it easier for you to read.
To compress a document ready for download to the Palm press the Process button. There will be a delay of 5-15 seconds or so depending on the size of the document and you should then see this message:

If you see the message above then a .PDB file has been created and you can download this to your Palm ready to read with Weasel. The details of this process depend on your platform and are no different to installing any other Palm application. Refer to your documentation for details.
If something went wrong then an error message will be displayed instead. In either case you can press the Show Details button to see what happened. This will produce a window showing the messages that were produced during the run. If processing was successful the bookmarks that were created are also displayed. This screen will look like the one below:

The program maintains a list of regular expressions used to generate bookmarks. The ones supplied by default will work in many cases but you can change them or add new ones. Selecting this option brings up the following screen:

To delete a bookmark expression highlight it in the list and press Delete. To add one type the full text of the expression into the text field and press Add. If what you have entered is not a duplicate of one already there then it gets added to the list.
These bookmark expressions are not automatically saved for future selections. When you save the options the bookmark expression list is saved at the same time. If you really screw up the list exit the program, delete the file makeztxt.properties from your home directory and run it again. All options will be reset to the default and the default bookmark expressions will be back.
To change options use the preferences menu choice. This leads to a tabbed dialog containing the following screens:


This is where you tell the program what formatting options you want and where the unzip program is. In the first dialog you need to set up the path to unzip.exe (or equivalent on your platform).
The format options allow you to select a formatter (not implemented yet but coming soon) and the line length and adjustment mode to pass to the formatter. These are not usually needed and you should refer to the C makeztxt documentation for their effects.
The options only last for the current session unless you use the Save Options menu choice. They will then be used in future sessions. The preferences and bookmark expression list are saved together.
upThe following only works when the machine is connected to the web.
You can set your preferred Gutenberg choosing "Project Gutenberg Mirror Site" from the Options menu. Once you have chosen a site the index can be downloaded via "Download Gutenberg Index File" in the Online menu. After that choosing "Browse index ..." will give you a table listing the files on your preferred Gutenberg site. It'll look like the following screen shot.
A double click on a line will trigger the download of the corresponding document.
The jar file includes a command line version of the program that works in a similar way to the original C version of makeztxt. To use this use the following command from the directory where you installed the makeztxt jar file:
java -cp ./jmakeztxt.jar makeztxtcmd [options] input_file
This will process the given file and product an output file with a .PDB extension. The input file may be either a text file or zip file, as with the GUI version.
The available options are:
|
Option |
Purpose |
Default |
|---|---|---|
|
-a N |
Sets format adjust mode to N. For now there is only one formatter available and it accepts values of 0 to 2. |
The default is zero which should be fine for most purposes. |
|
-b N |
Sets the format line length to N. |
The default value is to compute the best line length from the text. |
|
-r String |
Adds the given string to the list of regular expressions used to generate bookmarks. |
This option works exactly as for the C version and can be repeated many times. |
|
-t String |
Sets the title of the output document to the given string. |
The default is up to 31 characters of the input filename (minus the extension) |
|
-z N |
Sets the compression mode. A value of one selects the new format compression mode. A value of 2 selects the previous format which is smaller but must be decompressed all at once before reading the document. |
The default is for new format (1). |
Example usage:
java -cp ./jmakeztxt.jar makeztxtcmd -t "Return Of Holmes" holm11b.zipup
You should be able to use any Java 2 development environment to rebuild this program. I used emacs and Java 1.4.1 on Linux.
I recommend when using an IDE of any kind and if you intend to contribute to the project that you make sure no IDE dependant code is added to the JmakeZtxt sources. Otherwise I might probably not be able to easily merge any changes. If you just want to build and play with it then go ahead and use whatever you like.
All the code contains JavaDoc comments and you can find this in the doc directory of the source distribution.
upThanks to John Gruenenfelder johng@as.arizona.edu, who wrote
Weasel Reader and the C application makeztxt on which JmakeZtxt is
based.
and thanks to Martin H. Smith martin@spamcop.net, who wrote
the first versions of JmakeZtxt.
Thanks to ymnk@jcraft.com for rapidly fixing JZlib to make it work with our application.
up