View Single Post
Old 09-23-2016, 03:07 PM   #313
AlPe
Digital Amanuensis
AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.AlPe ought to be getting tired of karma fortunes by now.
 
AlPe's Avatar
 
Posts: 727
Karma: 1446357
Join Date: Dec 2011
Location: Turin, Italy
Device: Several eReaders and tablets
In attachment the input parser (the .py file), a simple .csv input file, and the resulting output files (I used XML so you can easily inspect them), but of course you can then use the input parser on your real input file and with Kobo output. You might want to use the sort/merge switches as well.

Code:
$ python -m penelope -i input.csv -j csv --csv-fs "\\t" -f en -t en -p xml -o output_no_input_parser.xml

$ python -m penelope -i input.csv -j csv --csv-fs "\\t" -f en -t en -p xml -o output_with_input_parser.xml --input-parser multiple_index_words.py
Attached Files
File Type: zip example_input_parser.zip (1.9 KB, 360 views)
AlPe is offline   Reply With Quote