diff options
author | Guillaume Seguin <guillaume@segu.in> | 2012-08-08 11:38:48 +0400 |
---|---|---|
committer | Guillaume Seguin <guillaume@segu.in> | 2012-08-08 11:38:48 +0400 |
commit | 77eb2440e39277ff0a3c7f96bf2d1b52e7a57808 (patch) | |
tree | 50afb96a1bb57a04341b4f2e44fa39fabb7fcc32 /README.cleanup | |
parent | cbd8cc0636e5d688253a55a4cad6286a8f0a77a3 (diff) |
Semi-automated coding style cleanup
Diffstat (limited to 'README.cleanup')
-rw-r--r-- | README.cleanup | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/README.cleanup b/README.cleanup new file mode 100644 index 0000000..55a4a8a --- /dev/null +++ b/README.cleanup @@ -0,0 +1,18 @@ +Some cleanup commands : + +To add a space after each comma : +sed -e "s/\(\w\),\(\w\)/\1, \2/g" -i *.py printrun/*.py printrun/svg/*.py + +To add spaces around each = : +sed -e "s/\(\w\)=\(\w\)/\1 = \2/g" -i *.py printrun/*.py printrun/svg/*.py +sed -e "s/\(\w\)=\(\"\)/\1 = \2/g" -i *.py printrun/*.py printrun/svg/*.py +sed -e "s/\(\w\)=\((\)/\1 = \2/g" -i *.py printrun/*.py printrun/svg/*.py + +To add spaces around each == : +sed -e "s/\(\w\)==\(\w\)/\1 == \2/g" -i *.py printrun/*.py printrun/svg/*.py +sed -e "s/\(\w\)==\(\"\)/\1 == \2/g" -i *.py printrun/*.py printrun/svg/*.py +sed -e "s/\(\w\)==\((\)/\1 == \2/g" -i *.py printrun/*.py printrun/svg/*.py +sed -e "s/\()\)==\(\w\)/\1 == \2/g" -i *.py printrun/*.py printrun/svg/*.py +sed -e "s/\()\)==\((\)/\1 == \2/g" -i *.py printrun/*.py printrun/svg/*.py + +Obviously this is not a perfect solution, it WILL break the code. Juste check the diff and fix what's wrong before commiting. |