summaryrefslogtreecommitdiff
path: root/doc/manual/pptex.py
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2012-07-31 16:59:41 +0100
committerCarl Hetherington <cth@carlh.net>2012-07-31 16:59:41 +0100
commit75be8cbd1d3307ea62fe8e79543ca518f4ee7bc2 (patch)
tree39d9c7ac5dd06e30e0263c2f8ab5b264480b5ad8 /doc/manual/pptex.py
parent5f45aee1f16e736a9bae710d5343dcd381f71091 (diff)
Update for newer libdcp; add start of manual.
Diffstat (limited to 'doc/manual/pptex.py')
-rwxr-xr-xdoc/manual/pptex.py35
1 files changed, 35 insertions, 0 deletions
diff --git a/doc/manual/pptex.py b/doc/manual/pptex.py
new file mode 100755
index 000000000..85653e5a5
--- /dev/null
+++ b/doc/manual/pptex.py
@@ -0,0 +1,35 @@
+#!/usr/bin/python
+
+# Farcical script to remove newlines after
+# \begin{sidebar} in dblatex' .tex output;
+#
+# farcical because I'm sure this can be done
+# in 1 line of sed, and also because I'm sure
+# the whole need for this script could be fixed
+# in the ardour.sty (but I don't know how).
+
+import sys
+import os
+import tempfile
+import shutil
+
+f = open(sys.argv[1])
+t = tempfile.NamedTemporaryFile(delete = False)
+remove_next = False
+while 1:
+ l = f.readline()
+ if l == '':
+ break
+
+ if not remove_next:
+ print>>t,l,
+
+ remove_next = False
+
+ if l.strip() == '\\begin{sidebar}':
+ remove_next = True
+
+f.close()
+t.close()
+shutil.move(t.name, sys.argv[1])
+