You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trémeur 5a4de3d8cd | 2 weeks ago | |
---|---|---|
build | 4 weeks ago | |
.gitignore | 1 month ago | |
COPYING | 1 month ago | |
README.org | 3 weeks ago | |
build.sh | 1 month ago | |
collectinggen.py | 3 weeks ago | |
download.py | 4 weeks ago | |
generate.py | 2 weeks ago | |
indexgen.py | 2 weeks ago | |
levelsgen.py | 1 month ago | |
log-template.py | 4 weeks ago | |
loggen.py | 4 weeks ago | |
masteredgen.py | 4 weeks ago | |
ownedgen.py | 4 weeks ago | |
portfoliosgen.py | 4 weeks ago | |
searchgen.py | 3 weeks ago | |
setup.py | 1 month ago | |
skel.py | 4 weeks ago | |
tcgcore.py | 2 weeks ago | |
thetypes.py | 4 weeks ago | |
tradegen.py | 2 weeks ago | |
variables-template.py | 3 weeks ago | |
wantedgen.py | 2 weeks ago |
README.org
tcg
Python scripts to generate a mobile-friendly static site for tracking tcg cards (designed for colors).
Instructions
Requirements
python3
- server space
- subdomain pointing to your site root on the server
rclone
with your server set up as a remote
Setup
- Download and create the initial files by running:
git clone https://git.praze.net/tre/tcg.git
cd tcg
cp log-template.py log.py
cp variables-template.py variables.py
-
Edit
variables.py
to set the variables as follows:servername
: name set for your remote inrclone
serverpath
: path to the site root on the server (with leading slash, without trailing slash)name
: the name you use in the gamehighpriority
: a list of high priority decks you’re collectingmediumpriority
: a list of other decks you’re collectingtradepost
: URL of your trade post on Dreamwidthfaves
: a list of cards to showcase on the index pageheaderbackground
: an HTML colour to display behind your header image and set as a theme colourbritish
:True
if you want “grey” to display on the site,False
if you want “gray”collectthreshold
: minimum number of owned cards for putting a deck in the “collecting” categorymediumthreshold
: minimum number of owned cards for marking a deck as medium priorityhighthreshold
: minimum number of owned cards for marking a deck as high prioritykeepsig
:True
if you always want to keep one copy of your signature,False
if you want to make them all available for tradingtradestatement
: statement to place on your trading pagemaxmastered
: maximum number of most recently mastered decks to show on the index page
-
Run the following:
python3 setup.py chmod +x build.sh
- Save a header image to
build/assets/header.png
- Save each stage of a filled sketchpad to
build/assets/sketch/
, as00.gif
,01.gif
, etc. - Add level images manually to
build/assets/levels/
- Add custom CSS to
build/user.css
Updating and building
- For each transaction, add a dictionary
{}
to thelog
list like in the example (removing any of"received"
,"lost"
,"crayons"
,"decks"
that aren’t relevant). - Run
./build.sh
in this directory to download the relevant card images and then upload everything to the server.
Currently unaccounted for
- Duplicates (should be fine but not checked)
- Coupons
- Card search
- Date to level – needs redone