diff --git a/README b/README index 6eeea17..f989163 100644 --- a/README +++ b/README @@ -8,4 +8,33 @@ This does not (currently) have a proper Python ``setup.py`` script for installat since this is such a random mixture of components. It's probably best to include a ``.pth`` file in your ``lib/site-packages`` -that references this working directory. \ No newline at end of file +that references this working directory. + +Installation +============ + +First, set up your path. Put the path to this directory in a tigershark.pth file +in your site-packages directory. Eg: + + cd /home/me/envs/my_project_virtual_env/lib/python2.7/site-packages + echo "/home/me/envs/my_project_virtual_env/src/tigershark" > tigershark.pth + +In order to process X12 files you first need to generate a parser from the xml +or cf that describes the file format. The PyX12 package includes xml files for +several common file formats, which is included in the Download directory: + + cd Downloads/ + unzip pyx12-1.5.0.zip + cd .. + +After extracting the xml files, you can create the related parser objects +using the utlities: + + mkdir parsers + touch parsers/__init__.py + cd parsers + python ../web/make837.py -p M835_4010_X091_A1.py -b Downloads/pys12-1.5.0/map name=835.4010.X091.A1.xml + +This will generate a M835_4010_X091_A1.py file in your parsers directory. + +TODO: Still need a Factory?