Merge remote-tracking branch 'pjmikkol/master'
Fix hovel banner, add option to specify cards to include.
This commit is contained in:
commit
d3656b82cf
@ -790,6 +790,8 @@ class DominionTabs:
|
||||
help="include a few dividers with extra text")
|
||||
parser.add_option("--exclude_events", action="store_true",
|
||||
default=False, help="exclude individual dividers for events")
|
||||
parser.add_option("--cardlist", type="string", dest="cardlist", default=None,
|
||||
help="Path to file that enumerates each card to be printed on its own line.")
|
||||
|
||||
options, args = parser.parse_args(argstring)
|
||||
if not options.cost:
|
||||
@ -851,6 +853,15 @@ class DominionTabs:
|
||||
self.paperwidth, self.paperheight = self.parseDimensions(papersize)
|
||||
print 'Using custom paper size, %.2fcm x %.2fcm' % (self.paperwidth / cm, self.paperheight / cm)
|
||||
|
||||
self.cardlist = None
|
||||
if self.options.cardlist:
|
||||
print self.options.cardlist
|
||||
self.cardlist = set()
|
||||
with open(self.options.cardlist) as cardfile:
|
||||
for line in cardfile:
|
||||
self.cardlist.add(line.strip())
|
||||
|
||||
|
||||
if self.options.orientation == "vertical":
|
||||
self.tabWidth, self.tabBaseHeight = dominionCardHeight, dominionCardWidth
|
||||
else:
|
||||
@ -1006,6 +1017,9 @@ class DominionTabs:
|
||||
if self.options.exclude_events:
|
||||
cards = [card for card in cards if not card.isEvent() or card.name == 'Events']
|
||||
|
||||
if self.cardlist:
|
||||
cards = [card for card in cards if card.name in self.cardlist]
|
||||
|
||||
if options.expansion_dividers:
|
||||
cardnamesByExpansion = {}
|
||||
for c in cards:
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 62 KiB After Width: | Height: | Size: 47 KiB |
Loading…
x
Reference in New Issue
Block a user