Next to PCGen the best thing that can happen to your data is prettylst.pl. Not only will it sort the data in a LST file in a way that makes it better readable, but you get an error report that will show you mistakes that you wouldn't catch otherwise. Only a fool would commit a file to CVS without running prettylst over it first. Don't be a fool!
- You can get the latest stable version of prettylst here. Unpack it wherever you will.
- Open a command line (i.e. if you are using WinXP a DOS Window). In that change to the directory where you unpacked prettylst.pl and run it on your data:
- Perl prettylst.pl -i=<INPATH> -o=<OUTPATH> -e=<~ERROR_FILE>
- Example: Perl prettylst.pl -i="c:\pcgen\data" -o="c:\sort" -e="c:\sort\Rpt.txt"
The INPATH argument tells prettylst the directory and subdirectories to parse. For example, -i="c:\pcgen\data\d20ogl\SRD" would cause prettylst to parse the files in folder "c:\pcgen\data\d20ogl\SRD" and its subdirectories. The given directory must be one that contains a usable dataset for prettylst to work. INPATH is a valid path name to an input directory containing lst files in current PCGen format. If this path contains special characters, you may need to enclose it in double quotes. For example, "C:\My Documents\bar". In addition, the pathname should be valid for the version of Perl that you are using on the platform that you are using. Some perl installations on Windows will expect UNIX paths, such as "/cygdrive/c/My Documents/". Directory names may be case sensitive.
The OUTPATH argument tells prettylst the output directory. For example, providing the -o="c:\sort" would then output files that needed to be sorted in folder "c:\sort". This needs to point to a pre-existing directory. It will not create the given directory, so if in the example the folder "c:\sort" didn't exist, prettylst would fail. See other comments above under INPATH.
The ~ERROR_FILE argument provides the name of the file that will contain all error and warning messages generated by the process. For example, -e="c:\sort\Rpt.txt" would cause a file "Rpt.txt" put in the "c:\sort" folder, that holds all the error and warning messages generated by the process. Please notice that the -e switch is pointing to a file, unlike the -i and -o switches that point to a directory. If you use the name of an existing directory as your ~ERROR_FILE, as you did with INPATH and OUTPATH, this will prevent the file to be created and prettylst will not finish its run. The filename must not be a directory name or the name of an existing file that you do not have write permissions for. If the filename includes a directory name, the directory must exist and you must have write permissions to that directory.
- To get a more comprehensive information on prettylst, you can type:
- Perl prettylst.pl -htmlhelp
That will generate and display a HTML file that holds all the necessary information you need.