Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kliment/Printrun.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Seguin <guillaume@segu.in>2012-08-08 11:38:48 +0400
committerGuillaume Seguin <guillaume@segu.in>2012-08-08 11:38:48 +0400
commit77eb2440e39277ff0a3c7f96bf2d1b52e7a57808 (patch)
tree50afb96a1bb57a04341b4f2e44fa39fabb7fcc32 /README.cleanup
parentcbd8cc0636e5d688253a55a4cad6286a8f0a77a3 (diff)
Semi-automated coding style cleanup
Diffstat (limited to 'README.cleanup')
-rw-r--r--README.cleanup18
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.