Skip to content

Instantly share code, notes, and snippets.

@makimoto
Created April 25, 2010 00:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save makimoto/378062 to your computer and use it in GitHub Desktop.
Save makimoto/378062 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# vim:fileencoding=utf-8
# lv_presentation_gen.py - lv presentation generator
from optparse import OptionParser
op = OptionParser()
op.add_option('-s','--separator',dest='sep',help='set page separator',default='----')
op.add_option('-o','--output',dest='output',help='set output directory',default='.')
(opt,args) = op.parse_args()
sep = opt.sep
cnt = 0
for i in open(args[0]).read().split(sep):
o = open('%s/%03d.txt' % (opt.output,cnt),'w').write(i)
cnt += 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment