Make owned cards page optional

master
trémeur 2 weeks ago
parent c5984b53d2
commit 12d3357dbd

@ -30,6 +30,7 @@ Python scripts to generate a mobile-friendly static site for tracking tcg cards
- =keepsig=: =True= if you always want to keep one copy of your signature, =False= if you want to make them all available for trading
- =tradestatement=: statement to place on your trading page
- =maxmastered=: maximum number of most recently mastered decks to show on the index page
- =ownedpage=: =True= if you want a page displaying your entire collection, =False= otherwise
- =masscollect=: list (python dict) of series/themes being mass collected and which decks to include in each one
- Run the following:
#+BEGIN_SRC bash

@ -1,5 +1,5 @@
import sys
import download,indexgen,collectinggen,ownedgen,wantedgen,loggen,levelsgen,tradegen,masteredgen,portfoliosgen,searchgen,massgen
import download,indexgen,collectinggen,ownedgen,wantedgen,loggen,levelsgen,tradegen,masteredgen,portfoliosgen,searchgen,massgen,variables
print("Checking for new decks … ",end="")
sys.stdout.flush()
@ -13,9 +13,10 @@ massgen.massall()
print(" done\nBuilding mass decks pages …",end="")
sys.stdout.flush()
collectinggen.collectingall()
print(" done\nBuilding owned page …",end="")
sys.stdout.flush()
ownedgen.ownedall()
if variables.ownedpage:
print(" done\nBuilding owned page …",end="")
sys.stdout.flush()
ownedgen.ownedall()
print(" done\nBuilding wanted page …",end="")
sys.stdout.flush()
wantedgen.wantedgen()

@ -22,12 +22,15 @@ def headerwrite(thefile,pagename):
header.write("mastered")
else:
header.write("<a href=\"/mastered\">mastered</a>")
header.write("</li>\n <li>")
header.write("</li>\n")
if variables.ownedpage:
header.write(" <li>")
if pagename == "owned":
header.write("owned")
else:
header.write("<a href=\"/owned\">owned</a>")
header.write("</li>\n <li>")
header.write("</li>\n")
header.write(" <li>")
if pagename == "trade":
header.write("trading")
else:

@ -12,4 +12,5 @@ highthreshold = 10
keepsig = False
tradestatement = ""
maxmastered = 20
ownedpage = False
masscollect = {"series":["firstdeck","seconddeck"]}

Loading…
Cancel
Save