OGCMetOceanDWG / WorldWeatherSymbols

A complete set of WMO weather symbols in SVG with full metadata.
https://github.com/OGCMetOceanDWG/WorldWeatherSymbols
Other
84 stars 34 forks source link

pretty printing of svg files #8

Closed tomkralidis closed 11 years ago

tomkralidis commented 11 years ago

Currently, SVG files are not pretty printed in the codebase. We have discussed that this may be valuable.

I've added pretty print utility by running

$ ./scripts/wws_manage.sh pp # needs svgpp command, install with apt-get install libbatik-java

which will pretty print all .svg files in the codebase.

@chris-little, @iedwards: if we want this for all files in the codebase, I can run a one time process and commit/push. Subsequent workflows by committers would then include running this command before pushing changed files (even though the script pretty prints all files, git will only detect changed files as staged for commit).

Comments?

isedwards commented 11 years ago

@tomkralidis - Sound like a very desirable next step - the only issue for us is that it will take a bit of time for us to get the necessary libraries approved on our corporate network... But it makes sense that we don't hold this up.

@chris-little - do you have any updates you would like to make in the near future? We could always push your changes via a development machine if it looks like it will take time to get svgpp installed on your machine.

isedwards commented 11 years ago

@tomkralidis - I noticed that lxml.etree.tostring() gives us a pretty_print=True in the new set_uri.py https://github.com/OGCMetOceanDWG/WorldWeatherSymbols/pull/3/files#diff-5 Is this not doing a very good job of cleaning up the output?

tomkralidis commented 11 years ago

@iedwards it's not working as currently implemented (see http://lxml.de/FAQ.html#why-doesn-t-the-pretty-print-option-reformat-my-xml-output).

This fix as a result solves this issue -- good catch! I'll update the codebase, and hence remove the libbatik-java dependency -- thanks!

isedwards commented 11 years ago

Good work!