fix missing spaces in card extras

(wasn't inserting space in place of line break)
This commit is contained in:
Paul Molodowitch 2013-12-16 07:33:21 -08:00
parent 605368c8ed
commit 3b3d9ff128

View File

@ -320,7 +320,7 @@ class DominionTabs:
if not self.options.expansions and currentCard and (currentCard not in (c.name for c in cards)): if not self.options.expansions and currentCard and (currentCard not in (c.name for c in cards)):
print currentCard + ' has extra description, but is not in cards' print currentCard + ' has extra description, but is not in cards'
else: else:
extra += line.strip() extra += ' ' + line.strip()
if currentCard and extra: if currentCard and extra:
extras[currentCard] = extra.strip() extras[currentCard] = extra.strip()
for c in cards: for c in cards:
@ -659,10 +659,10 @@ class DominionTabs:
open('cards.yaml','w').write(out) open('cards.yaml','w').write(out)
if options.order == "global": if options.order == "global":
sf = lambda x,y: cmp(x.name,y.name) sortKey = lambda x: x.name
else: else:
sf = lambda x,y: cmp((x.cardset,x.name),(y.cardset,y.name)) sortKey = lambda x: (x.cardset,x.name)
cards.sort(cmp=sf) cards.sort(key=sortKey)
if not f: if not f:
f = "dominion_tabs.pdf" f = "dominion_tabs.pdf"