forked from sumpfork/dominiontabs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- start using argparse instead of optionparser
- make all code conform to pep8 once more - add a unit test to check for pep8 compliance - delete old ez_setup
- Loading branch information
Showing
11 changed files
with
860 additions
and
980 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,35 @@ | ||
import domdiv | ||
from __init__ import __version__ | ||
from zipfile import ZipFile,ZIP_DEFLATED | ||
from zipfile import ZipFile, ZIP_DEFLATED | ||
|
||
prefix = 'generated/sumpfork_dominion_tabs_' | ||
postfix = 'v' + __version__ + '.pdf' | ||
|
||
def doit(args,main): | ||
args = args + ' ' + prefix+main+postfix | ||
|
||
def doit(args, main): | ||
args = args + ' ' + prefix + main + postfix | ||
args = args.split() | ||
fname = args[-1] | ||
print ':::Generating ' + fname | ||
domdiv.main(args, '.') | ||
return fname | ||
|
||
|
||
argsets = [ | ||
('',''), | ||
('--orientation=vertical','vertical_'), | ||
('--papersize=A4','A4_'), | ||
('--papersize=A4 --orientation=vertical','vertical_A4_'), | ||
('--size=sleeved','sleeved_'), | ||
('--size=sleeved --orientation=vertical','vertical_sleeved_') | ||
('', ''), ('--orientation=vertical', 'vertical_'), | ||
('--papersize=A4', 'A4_'), | ||
('--papersize=A4 --orientation=vertical', 'vertical_A4_'), | ||
('--size=sleeved', 'sleeved_'), | ||
('--size=sleeved --orientation=vertical', 'vertical_sleeved_') | ||
] | ||
additional = ['--expansion_dividers'] | ||
|
||
fnames = [doit(args[0] + ' ' + ' '.join(additional),args[1]) for args in argsets] | ||
fnames = [doit(args[0] + ' ' + ' '.join(additional), args[1]) | ||
for args in argsets] | ||
print fnames | ||
|
||
zip = ZipFile('generated/sumpfork_dominion_tabs_v' + __version__ + '.zip','w',ZIP_DEFLATED) | ||
zip = ZipFile('generated/sumpfork_dominion_tabs_v' + __version__ + '.zip', 'w', | ||
ZIP_DEFLATED) | ||
for f in fnames: | ||
zip.write(f) | ||
zip.close() | ||
|
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.