Download Latest Version (3.0 MB) Get Updates
Name Modified Size InfoDownloads / Week 2010-12-24 3.0 MB
README 2010-12-09 4.1 kB
payparser-0.1.tar.gz 2010-12-09 55.6 kB
Totals: 3 Items   3.1 MB 0
************************************************** * PayParser * * A configurable program to parse and manage * * your csv files * ************************************************** PayParser (PP) is a program to read csv (comma separated value) files, manage their fields and write them back. == FEATURES == Some features of PayParser: * fully configurable ; * modular ; * allows the validation of the fields of the csv file with regex or a list of allowed values ; * erroneous values can be corrected through human intervention at runtime ; * pure Python (should be cross platform soon) ; * is free software (free as in freedom) ; == USAGE == usage: payparser [-h] [--version] [-q | -v VERBOSE [-l LOG | --no-log] [-i INPUT_CONFIG] [-e ENCODING] [-o OUTPUT_CONFIG] infile positional arguments: infile the csv file optional arguments: -h, --help show this help message and exit --version -q, --quiet -v VERBOSE, --verbose VERBOSE verbose output (accepts an integer value [from 1 to 3]) -l LOG, --log LOG logs on the specified file --no-log disable logging on a file -i INPUT_CONFIG, --input-config INPUT_CONFIG specify a different file for input configuration [defaults to: <infile>_input.cfg] -e ENCODING, --encoding ENCODING indicates the encoding of the configuration file -o OUTPUT_CONFIG, --output-config OUTPUT_CONFIG specify a different file for output configuration [defaults to: <infile>_output.cfg] As you can see from the signature above PP expects at least the name of the csv file to process: the <infile> [e.g. data.csv]. Then it searches for two files named, respectively: * <infile_basename>_input.cfg [e.g. data_input.cfg] ; * <infile_basename>_output.cfg [e.g. data_output.cfg] ; where <infile_basename> is the name of the <infile> without the extension. These two files describe the behaviour of payparser for reading input and writingoutput. The structure of the input and output configuration files are described in detail in the file help_input.txt and help_output.txt in the 'help/' directory. You can also find in the 'test/' directory some examples: * example.csv - the data file * example_input.cfg * example_output.cfg --- MODULARITY --- A couple of words are to be said about the modularity of PP. Since nobody but yourself can know can know in advance what kind of processing one is willing to perform on his/her data PP has been designed with the possibility to be expanded with functions defined and implemented (in Python) by the end user. This functions and their characteristics are fully described in the example config files listed above. In this way the user should be ideally able to perform arbitrary operations on the fields of the input csv file. == ACNOWLEDGEMENTS == The author want to thank the following people/projects which directely or indirectely helped him writing PP: * Pietro Battiston and his "Good vibrations" (gvb), which provided a good example from which the author of this project could <del>steal</del> copy and modify some code ;-) ; * All the people who are spending their time writing good free software (free as in freedom) ; == AUTHORS == See AUTHORS file for details. Copyright 2010 - Cristian Consonni. This program is free software; you may redistribute it under the terms of the GNU General Public License version 3 or (at your option) any later version. This program has absolutely no warranty. == CONTACTS == * Project site: - * Mailing lists: - - * Bugs/Feature requests: - == DEPENDENCIES == PP uses libraries to read/write highly readable config files, in particular the following package is required : * ConfigObj - == INSTALL == See INSTALL file for details
Source: README, updated 2010-12-09