baron
clone your own copy | download snapshot

Snapshots | iceberg

No images in this repository’s iceberg at this time

Inside this repository

insertpages.py
text/x-python

Download raw (692 bytes)

try:
    import scribus
except ImportError:
    print "Unable to import the 'scribus' module. This script will only run within"
    print "the Python interpreter embedded in Scribus. Try Script->Execute Script."
    sys.exit(1)

lastName=""
for p in range(1, scribus.pageCount()):
	if(p % 2 == 0):
		scribus.gotoPage(p)
		top,left,right,bottom = scribus.getPageNMargins(p)
		pw, ph = scribus.getPageSize()
#		print top, left, right, bottom
		newName = scribus.createText(left, top, pw - (right + left), ph - (bottom + top))
		if(len(lastName) > 0):
			try:
				scribus.linkTextFrames(lastName, newName)
			except ScribusException:
				print "CANT LINK", lastName, newName
		lastName = newName