Skip to content

Instantly share code, notes, and snippets.

@paveljasek
Last active August 29, 2016 20:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save paveljasek/c7572edf95e8cb73aaac33ef21c13e60 to your computer and use it in GitHub Desktop.
Save paveljasek/c7572edf95e8cb73aaac33ef21c13e60 to your computer and use it in GitHub Desktop.
Itemize shopping XML feed into CSV tabular format
# xmlutils are required: https://github.com/knadh/xmlutils.py
# basically you need to install it on unix via pip command
pip install xmlutils
# xml2csv takes an xml file, reads tags that correspond to the desired element and output a csv file delimited by the parameter
# delimiter is changes from comma to semicolon as some items can have titles including commas
xml2csv --input sample.xml --output sample.csv --tag "item" --delimiter ";"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment