Mercurial > hg > kdocs
view ols/split.py @ 80:fa8bf02e7cfa
Script to search Linux kernel for mentions of ietf RFC documents and make a
page linking to the files and the appropriate RFC.
author | Rob Landley <rob@landley.net> |
---|---|
date | Tue, 23 Oct 2007 04:33:46 -0500 |
parents | 624421f445f0 |
children |
line wrap: on
line source
#!/usr/bin/python import os, sys infile=sys.argv[1] credits=sys.argv[2] numbers=sys.argv[3:] for i in xrange(len(numbers)): if i == len(numbers)-1: next = "" else: next = int(numbers[i+1])-1 command="pdftk %s.pdf cat %s-%s 1-1 %s-%s output %s-pages-%s-%s.pdf" % (infile,numbers[i],next,credits,credits,infile,numbers[i],next) print command os.system(command)