MakeDocJ/ReadDocJ
 
Things necessary to run my Java programs
 
E-mail: Jeffrey A. Krzysztow
 
Join the PilotDocJ Announcement Group here!
 
PilotDocJ Summary on SourceForge.net
 
SourceForge.net Logo

MakeDocJ v3.14.0, MakeDocGUI v1.5.2, ReadDocJ v2.0.0

The MakeDocJ and MakeDocGUI programs were created to make it easier to create PilotDOCs for use on the Palmtm. The biggest features this program offers over the other text file to PilotDOC programs is the ability to create preset bookmarks and the fact it runs on multiple platforms. I found MakeDocJ originally written by Pat Beirne, fixed the bugs, and added the ability to generate bookmarks directly into the PilotDOC.

The ReadDocJ program was created to allow viewing of PilotDOCs on any platform that has a Java Runtime Environment. It supports bookmarks that are embedded in the PilotDOC as well as allowing new ones to be added. The PilotDOC is NOT modified.

The regular expression text search routines are provided by the package gnu.regexp. The full package can be found at http://www.cacas.org/java/gnu/regexp/.

It is possible to process more than one file by using a file to indicate the options. To indicate the file containing the options, precede the file with '@'. MakeDocJ will read this and each line is considered a complete command line. See Example\options.BSA_Advancement for more information.

Terms of Use The MakeDocJ/MakeDocGUI/MakeDocG is distributed under the terms of the GNU Lesser General Public License. The COPYING.txt file included in the distribution contains the details. This program is free software. You are encouraged to adapt it to your own needs, and contribute to the program's ongoing development.

NOTE: The default build requires Java Runtime Environment or Java Development Kit 1.2.2 or higher. NOTE: The sources for MakeDocJ can be recompiled for Java Development Kit 1.1.8. See JDK 1.1.x comments in Sources for the necessary stuff.

Hosted on SourceForge.net
InstallAnywhere NOW! Editions: Windows 95/98/NT/2000/XP
This is intended for use with a Java 2 Runtime.
  Windows 95/98/NT/2000/XP with Java Runtime included
This is intended for use with a Java 2 Runtime and has one included, just in case you need one (version 1.4.2 to be exact).
  Windows 95/98/NT/2000/XP for Microsoft VM
This will use the Microsoft Java Runtime (if you've installed version 4.0 - 5.5 of IE, you probably have this).
  Mac OS 10
This is intended for use with the Java 2 Runtime that Apple has so nicely included in their OS.
  MacOS Classic
This version is for Mac OS 8 - 9. This installation does not have a Java Runtime includes, but should allow you to download and install one.
  MacOS Classic with Java Runtime included
This version is for Mac OS 8 - 9. This installation does not have a Java Runtime includes, but should allow you to download and install one.
  Linux
This is intended for use with a Java 2 Runtime.
  Solaris
This is intended for use with a Java 2 Runtime.
  Generic Unix (Other than Linux/Solaris)
This is intended for use with a Java 2 Runtime.
  Generic Java 2
This is intended for use with a Java 2 Runtime.
  Update for Mac OS 8.x, 9.x, or if you are using the Microsoft Java Runtime
  Update for Mac OS 10.x or higher, or if you are using a Java 2 runtime environment.

MakeDocJ
Encode a PilotDOC file:
  java -jar MakeDocJ.jar [-options] <text-file> <PilotDOC-file> <story-name> <bookmark-file>
-a auto-bookmark
These are processed after the bookmarks specified with the -B option and the <bookmark-file>.
To tag the text for auto-bookmarking: the very last line should have the charcter sequence you are using as a tag in the main text, surrounded by < and >. Each line that you wish bookmarked needs to start with the characters between < and >. See Examples\BSA_Advancement_embedded_bookmarks.txt for how to tag the text file "properly".
-c {number} category number of document
-i {database ID} four character database ID
Known IDs (will only decode these)
ReaderID 'REAd' default if none specified
TealDocID 'TlDc'
HandStoryID 'hsIB'
-n builds the PilotDOC file without compression
-m compress multi-linefeeds out of <text-file>
-q quiet (i.e. minimal reporting during encoding process)
-r remove binary
-s {number} sort bookmarks {number}: 1 = By location, 2 = Alphabetically
-u {number} unwrap text, single LF is removed
  If {number} is specified, line length must be greater than {number} to unwrap, default: 0
-w remove spaces at the beginning of the bookmark text
-B {bookmark} Used to specify a bookmark in addition to using <bookmark-file>
These are searched for before the <bookmark-file>.
  Multiple of these are allow to specify more that one bookmark

Decode a PilotDOC file:
  java -jar MakeDocJ.jar -d [-options] <PilotDOC-file> <text-file>
-d decodes the PilotDOC file into a text file
-0 end of line is based on OS
-1 end of line is CR/LF (i.e. DOS)
-2 end of line is CR (i.e. MAC)
-b generate a bookmark file (<text-file>.bm) if there are any bookmarks
-q quiet (i.e. minimal reporting during decoding process)

Format of <bookmark-file>: <bookmark>,<string-to-search>,<bookmark-name-string>,<starting-bookmark>,<ending-bookmark>
NOTE: do not surround the text with the "<" or ">" character unless they are to be searched for.
<bookmark>
= Text to be displayed as bookmark, can be up to 16 characters.
NOTE: do not surround the text with "<" or ">" unless you wish them in the bookmark text.
If bookmark is set to "-", then the text that matches <string-to-search> is used as the bookmark name. The search is done once.
If bookmark is set to "+", then the text that matches <string-to-search> is used as the bookmark name. The search is done until no more matches.
<string-to-search>
= optional (if not specified, <bookmark> is used), it is assumed to be a regular expression.
NOTE: Except as noted above, only the first occurrence of a given bookmark is recorded.
<bookmark-name-string>
= optional, if specified, will use this regular expression to generate the name of the bookmark. This is most useful when using subexpressions and backreferences regular expression in the regular expression. Substitute the results of this match to create a new string. This is patterned after PERL, so the tokens to watch out for are $0 through $9. $0 matches the full substring matched; $n matches subexpression number n. A string consisting of literals and $n tokens.
<starting-bookmark>
= optional, when the "+" feature is used, this is the first found bookmark to add. If the regular expression will match 50 different items, and you which to skip the first 9, set this to 10, and the first 9 matches will be ignored.
<ending-bookmark>
= optional, when the "+" feature is used, this is the last found bookmark to add. If the regular expression will match 50 different items, and you which to stop after the 20th, set this to 20, and the 21st on will not be added.

MakeDocGUI
To launch MakeDocGUI
  java -cp MakeDocJ.jar MakeDocGUI or if you used the InstallAnywhere installation, just use the shortcut.
Encode Tab
Button Description
Process Starts encoding the text file into a PilotDoc file
Reset If you have loaded a configuration, it will reset to those values, otherwise it will be reset to default values.
Configuration Allows the loading and saving of named preconfigured encoding options
Decode Tab
Button Description
Process Starts decoding the PilotDoc file into a text file
Reset If you have loaded a configuration, it will reset to those values, otherwise it will be reset to default values.
Configuration Allows the loading and saving of named preconfigured decoding options

ReadDocJ
To launch ReadDocJ
  java -cp MakeDocJ.jar ReadDocJ [<PilotDOC-file>] or if you used the InstallAnywhere installation, just use the shortcut.

Button Description
Open A file selector will be displayed allowing selection of a PilotDOC file to be open and displayed.
Load A dialog with a list of the last 10 PilotDoc file that you can choose to load.
Info Shows various information about the current PilotDoc file.
Search Allows you to search for text in the PilotDOC. Regular expressions are supported.
Bookmarks Allows you to go to, add, or delete bookmarks in the PilotDOC. NOTE: The PilotDOC file is not modified.
Top Go to the top of the PilotDOC file.
Bottom Go to the bottom of the PilotDOC file.

MakeDocG
To launch MakeDocG
  java -cp MakeDocJ.jar MakeDocG.

Command: This editable ComboBox is used to enter the command line that will be processed by the MakeDocJ engine. Type in the command line and press <ENTER> to process the command entered.
It remembers that last ten commands entered for a recallable history.
NOTE:Enter a blank line to get "help".
The area in the middle: The center area is were the output from processing the command line will be display after the processing has finished.
Directory: This editable ComboBox is used to enter the current working directory. Type in the directory and press <ENTER> to process the command entered.
It remembers that last ten directories entered.
The button labeled "..." is a graphical directory selector.

History of MakeDocJ/MakeDocGUI/MakeDocG


MakeDocJ v3.14.0/MakeDocGUI v1.5.2
  • It is now possible to create PilotDOCs from the clipboard by specifying clip: as the <text-file> or source path.

MakeDocJ v3.13.2
  • MakeDocJ changed how bookmarks work a little. The routine that looks for the next match will start after the end of the last match instead of 1 from the beginning of the last match.

MakeDocJ v3.13.1/MakeDocGUI v1.5.1/MakeDocG v1.2.1
  • MakeDocJ is slower but compresses better then 3.13.0 due to some bugs I introduced.
  • MakeDocJ changed the ratio message to how much is saved.
  • MakeDocJ auto-bookmark will now work if the first bookmark starts as the first character of the file.
  • MakeDocGUI and MakeDocG will display the MakeDocJ engine version number as well as their own.

MakeDocJ v3.13.0/MakeDocGUI v1.5.0/MakeDocG v1.2.0
  • MakeDocGUI and MakeDocG now uses the system property 'user.dir' to determine the location of MakeDocJ.ini.
  • MakeDocJ is about 30% faster in encoding and decoding.

MakeDocJ v3.12.0/MakeDocGUI v1.4.0
  • MakeDocJ Removed -t option database ID is TealDoc instead of generic reader. Use the -i option instead.
  • MakeDocJ is much more verbose when decoding. Use -q to quiet it down!
  • Can now encode/decode HandStory Doc files.

MakeDocJ v3.11.0/MakeDocGUI v1.3.0/MakeDocG v1.1.1
  • MakeDocGUI Drag and Drop support under a Java 2 (this mean Mac OS X, Windows and Linux using Sun or IBM's implementation of Java). For anyone using the Microsoft's version, this is definitely the time to switch. Not only is Java 2 faster, it looks better IMHO.
  • MakeDocGUI The behavoir of the Reset button has changed. If you have loaded a configuration, it will reset to those values, otherwise it will be reset to default values.
  • MakeDocGUI - Encode The title will be filled in automatically with the name of the source file if the source file was set via the ... or Drap and Drop. This only happens if the title is blank.
  • MakeDocGUI - Encode If the destination file is a folder/directory instead of an actual file, the title will be appended and an extention of ".pdb"
  • MakeDocGUI - Decode If the destination file is a folder/directory instead of an actual file, the name of the source file be appended and an extention of ".txt"
  • MakeDocJ All changes were to support new MakeDocGUI functionality.
  • Turns out the build for the Microsoft VM was bad last time. It is now corrected. NOTE: It is STRONGLY recommended to abondand Microsoft's VM and move to the Java 2 runtime. Over time, I will probably stop supporting this platform.
  • MakeDocG This is being depreciated. Basically, I will leave it, but stop showing it in this documentation.
  • Java 1 As noted in bold above, over time, I will stop supporting Java 1. Not sure exactly when. This means no more support for Microsoft's VM or Mac 8/9. Time to move on!

MakeDocJ v3.10.0/MakeDocGUI v1.2.0/MakeDocG v1.1.1
  • "Better" error messages when cannot find bookmarks.
  • When decoding PalmDOCs, it is now possible to let the end of line be determined by the native OS setting (ie Microsoft Windows => CR/LR, Mac OS => CR, Unix/Linux => LF).
  • MakeDocGUI Remembers tab user was on last time run.

MakeDocJ v3.9.1/MakeDocGUI v1.1.1/MakeDocG v1.1.1
  • This project is now hosted on SourceForge under pilotdocj. There are new mailing lists host on SourceForge. I will also maintain the mailing list on Yahoo!Groups, but I will stop posting the files there. It is much easier to post the files on SourceForge then Yahoo!Groups and I see no reason to have this in both places. If this is a major inconvience to anyone, please send me an email and explain why. If someone out there can convince me to keep posting the files on Yahoo!Groups, I will.
  • There is now a test to ensure that a title has been specified for encoding a PalmDoc file.

MakeDocJ v3.9.0/MakeDocGUI v1.1.0/MakeDocG v1.1.0
  • Changed the meaning of -q. It will only display error messages now.
  • Added -B {bookmark} Used to specify a bookmark instead of using <bookmark-file>
    Multiple of these are allow to specify more that one bookmark
  • Using jakarata's ant to build now. This allows me to much more easily build for Java 1 and Java 2 runtimes.
  • Fix regular expressions dealing with End Of Line (i.e. "^" and "$"). Now sets the End Of Line character to be the Line Feed (this is the End Of Line for PalmDoc files).
  • All regular expressions are assumed to be Perl 5 format.
  • Fixed a problem dealing with full paths.
  • MakeDocGUI and MakeDocG: Are now multithreaded! This mean the output is going to the textarea in "real-time".
  • MakeDocJ and MakeDocG: Command line options can ONLY start with the "-". Originally "/" and "\" were allowed, but these characters interfere with file paths (i.e. Unix/Linux/Mac OS X all use "/" as path separators, VAX uses "\". So these are no longer allowed as option start characters).
    Also, paths must be quoted, not escaped.
  • MakeDocGUI: When going from the Encode to Decode tab (or visa-versa), the output window will not resize so as to be too small as to be of no use.
  • MakeDocGUI: Added Reset button to reset all the values in the current tab to default values.
  • MakeDocGUI: Changed some of the keyboard mnemonics to allow the Reset button to have a mnemonic.
  • MakeDocGUI: Merged the three configuration buttons into one Configuration button that will display a dialog where configurations can be saved, loaded, or deleted. Single-clicking a configuration name will bring the name into the edit field on the top of the dialog. Then you can save, load, or delete that configuration. If you double-click a configuration name, it will be loaded.
  • Upgraded to InstallAnywhere 5.0 Now for the installers.

MakeDocJ v3.8.2/MakeDocGUI v1.0.1/MakeDocG v1.0.1
  • Fix packaging problem that caused the searching of bookmarks to fail.
  • The Encode tab, pressing the button "..." for Source had the Palm database extentions instead of the text file extentions.
  • The Encode tab, pressing the button "..." for Destination had the text file extention instead of the Palm database file extentions.
  • The history section for MakeDocJ v3.8.1/MakeDocGUI 1.0.0/MakeDocG 1.0.1 indicated that the short cut was for MakeDocJ. This is incorrect, the short cut is for MakeDocGUI.
  • MakeDocJ.ini is no longer part of the InstallAnywhere installation. This was done so the install will not over-write the current configuration.

MakeDocJ v3.8.1/MakeDocGUI v1.0.0/MakeDocG v1.0.1
  • The introduction of MakeDocGUI. A better wrapper for MakeDocJ.
  • The help for MakeDocG no longer has any references to MakeDocJ. It is hopefully a little clearer now.
  • Added the Examples directory to the installers.
  • Using 1.1.4 of the gnu.regexp package.
  • The InstallAnywhere installations will now install the short cut to MakeDocJ instead of MakeDocG.
  • All configuration for MakeDocGUI and MakeDocG is now stored in MakeDocJ.ini.
  • Builds for running under Java 1 and Java 2. This means the Windows 95/98/Me/NT/2000/XP can use the Microsoft Java Runtime. It means that Mac OS 8-9 are supported. And finally, any platform running Java 2 (i.e. Windows 95/98/Me/NT/2000/XP using the Sun or IBM Java Runtimes, Mac OS 10, Linux, Solaris, etc).
  • Discontinue "Native" Win32 builds.

MakeDocJ v3.8.0/MakeDocG v1.0.0
  • The introduction of MakeDocG, the GUI wrapper for MakeDocJ.
  • Using 1.1.3a of the gnu.regexp package.
  • Added the ability to use a regular expression to generate the bookmark name.
  • Added -w remove spaces at the beginning of the bookmark text
  • Added optional numeric value for unwrap (-u) option. You can now specify to minimum line length for unwrapping.
  • The InstallAnywhere installations will now install the short cut to MakeDocG instead of MakeDocJ.

MakeDocJ v3.7.1
  • Reworked unwrap again. I think I got it correct now? Unwrapping will NOT eat LFLF patterns anymore, use the -m option for that.

MakeDocJ v3.7.0
  • Added -a auto-bookmark, Automatic bookmarks are imbedded into many document files using markers defined at the end of the file and enclosed in "<>" symbols. For instance, placing "<(BM)>" at the bottom of a document file will cause all other instances of "(BM)" in the document to be found when the document is scanned for bookmarks. The rest of the line of text following the mark is used as the bookmark's name.
  • Added -s {number} sort bookmarks {number}: 1 = By location, 2 = Alphabetically
  • Reworked bookmarking system. See bookmarks above
  • Using 1.2 collections classes for speed.
  • Using 1.1.1 of the gnu.regexp package.

MakeDocJ v3.6.2
  • Tweak the unwrap code.

MakeDocJ v3.6.1
  • Blank lines in the bookmark file will no longer causes "java.lang.StringIndexOutOfBoundsException: String index out of range: 0".
  • Using InstallAnywhere NOW! Edition to provide installers for the following platforms: Windows 95/95/NT/2000/XP, MacOS Classic, Unix (not sure to complete list of unix, but at least Solaris and Linux are there).

MakeDocJ v3.6.0
  • compress multi-linefeeds out of <text-file> is now -m .
  • Added -c {number} to set category number of document
  • Added -u to unwrap text. Single LF is removed.
  • Removed the Native Win32 executable. If you would like this, please make a request.

MakeDocJ v3.5.1
  • If database name is longer than 31 character, last three characters are replaced with '...'
  • First release of Native Win32 executable. Contained in Win32 directory.
  • Moved MakeDocJ.jar under Java directory.

MakeDocJ v3.5
  • Replace javaregex package with gnu.regexp package. Since the source for MakeDocJ is available, I felt it was more appropriate to use a regular expression package that had the sources freely available also.
  • Internally had typeID and creatorID reversed. This had NO adverse affects on anything generated by MakeDocJ.

MakeDocJ v3.4
  • Really generates a correct modification date to store in the PilotDoc.
  • Doesn't add "extra" 2 bytes with encoding. These 2 bytes are found when the PilotDoc in downloaded from the Palm device. Can properly decode with or without these bytes.

MakeDocJ v3.3
  • Based on documentation at www.RoadCoders.com changed how the PilotDoc is being built.
  • Correctly generate creation and modification dates to be from January 1, 1904.
  • Added -p to set the private bit in the PilotDoc file.

MakeDocJ v3.2
  • Fixed a problem when specifying regular expressions for bookmarks. The regular expression was ignored.
  • If all bookmarks are not found, the PilotDoc file is deleted. This is because the internal indexes will be incorrect.
  • Renamed classes to be inline with "Java Coding Standards"
  • Compression is now fully inline with the original unixdoc/makedoc.

MakeDocJ v3.1
  • When specifying bookmarks, if only the name of the bookmark is specified, we will really search the text. Also, regular expressions are not used if only the name is specified.
  • Fixed another compression corruption error. i believe these have all been found and fixed. This was do to the fact the Java doesn't have unsigned data types. Will have to remember this when porting other C/C++ programs to Java.
  • Added the ability to add comments to the bookmark file. Any line beginning with a '!' will be ignored as a comment.
  • Split the code up more so it can be used in other stuff.

MakeDocJ v3.0
  • Added -c to compress multi-linefeeds out of the <text-file> when encoding.
  • Read the entire <text-file> into memory, then do processing. This speeds the entire encoding operation at the cost of consuming RAM. It is necessary to have about twice as much free RAM as the largest file to process for the various buffers used.
  • Fixed a couple of bugs in the textBuffer::compress. No longer seems to corrupt the compressed data.

MakeDocJ v2.1
  • Added the ability to specify a file of command lines. This allows for multiple files to be processed.
  • Never released to public

MakeDocJ v2.0
  • First version released by Jeffrey A. Krzysztow
  • Mostly bug fixes to original code and convert to my style of coding.
  • Added the ability to specify preset bookmarks.

History of ReadDocJ


ReadDocJ v2.0.0
  • Some mix up above version of ReadDocJ. Sorry for the confusion.
  • This version is about 30% faster loading PilotDoc files.
  • Drag and Drop support! Drap and Drop a PilotDoc file onto a ReadDocJ window and it will load.
  • "Better" error handling with non-PilotDoc files.
  • We now have menus! I know, big whoop!, but this lets ReadDocJ grow easier than buttons.
  • Added an option to have ReadDocJ use Native Look-n-Feel (means: on Windows, looks like a Windows program, on the Mac, looks like a Mac program, etc)
  • Added an option to have ReadDocJ use Native File Selector instead of the Java one. This will allow any of the extention that may be being use (I highly recommend FileEx http://www.cottonwoodsw.com/) to be used.
  • Can open additional ReadDocJ windows so you can view more than one PilotDoc file at a time without having to start multiple Java Runtime Environments. Each one is independant of the others.
  • Added the ability to display the database header.
  • The main window is resizable.
  • The bookmark windows is resizable.
  • Remembers main window size and position.
  • Remembers that last location you were at in the PilotDoc
  • The bookmarks are no longer kept in an external file. They are now kept in ReadDocJ.ini. If ReadDocJ finds an existing external bookmark file, it will be loaded and deleted. For then on the information will be stored in the ReadDocJ.ini
  • Remembers the last 10 PilotDocs read and allow you to quickly reload them via the Load... button.
  • Uses the system property 'user.dir' to determine the location of ReadDocJ.ini.

ReadDocJ v1.3.0
  • Can read HandStory doc files.
  • Will not show the screen until is has decided where the "middle" is and then show the screen
  • Using InstallAnyware NOW! Edtion to provide installers for the following platforms: Windows 95/95/NT/2000/XP, MacOS Classic, Unix (not sure to complete list of unix, but at least Solaris and Linux are there).

ReadDocJ v1.2
  • Replace javaregex package with gnu.regexp package. Since the source for ReadDocJ is available, I felt it was more appropriate to use a regular expression package that had the sources freely available also.
  • When selecting the Go button from the bookmark list, focus will be in the text area.
  • When selecting the Go button from the bookmark list, the bookmark will be at the top of the screen.
  • Internally had typeID and creatorID reversed. This had NOT adverse affects.

ReadDocJ v1.1
  • The external bookmark file created by ReadDocJ will not be loaded if the PilotDOC file is newer.
  • Cannot use the same name for two different bookmarks.
  • Renamed classes to be inline with "Java Coding Standards".
  • Added buttons to go to the top and bottom of the PilotDOC.
  • Coverted to use Java Foundation Classes 1.1.
  • Will scan for internal bookmarks.

ReadDocJ v1.0