From 90f94529e414cafb75078010fdf9e4ec132dfc41 2006-01-11 22:39:00 From: vivainio Date: 2006-01-11 22:39:00 Subject: [PATCH] Added Jorgen Stenarson's update_manual.py to enable updating manuals in Windows too. --- diff --git a/doc/update_manual.py b/doc/update_manual.py new file mode 100644 index 0000000..9f5a885 --- /dev/null +++ b/doc/update_manual.py @@ -0,0 +1,26 @@ +""" Must be launched via ipython not normal python + +in ipython prompt do + +> %run update_manual.py +""" + +import sys,IPython,re + + +fil=open("magic.tex","w") +oldout=sys.stdout +sys.stdout=fil +ipmagic("magic -latex") +sys.stdout=oldout +fil.close() + +fil=open("manual_base.lyx") +txt=fil.read() +fil.close() + +manualtext=re.sub("__version__",IPython.__version__,txt) +fil=open("manual.lyx","w") +fil.write(manualtext) +fil.close() +print "Manual (magic.tex, manual.lyx) succesfully updated!"