Python SSG for tracking online TCG collection
Find a file
2024-11-01 22:22:00 +00:00
build CSS updates, elucidate readme 2024-11-01 22:22:00 +00:00
.gitignore CSS updates, elucidate readme 2024-11-01 22:22:00 +00:00
build.sh MVP 2024-10-28 21:54:15 +00:00
collectinggen.py CSS updates, elucidate readme 2024-11-01 22:22:00 +00:00
COPYING MVP 2024-10-28 21:54:15 +00:00
download.py CSS updates, elucidate readme 2024-11-01 22:22:00 +00:00
generate.py CSS updates, elucidate readme 2024-11-01 22:22:00 +00:00
indexgen.py Account for card losses, add more tooltips, add player name 2024-11-01 08:29:52 +00:00
levelsgen.py Account for card losses, add more tooltips, add player name 2024-11-01 08:29:52 +00:00
log-template.py CSS updates, elucidate readme 2024-11-01 22:22:00 +00:00
loggen.py Account for card losses, add more tooltips, add player name 2024-11-01 08:29:52 +00:00
ownedgen.py Add signatures 2024-10-31 23:51:10 +00:00
README.org CSS updates, elucidate readme 2024-11-01 22:22:00 +00:00
skel.py CSS updates, elucidate readme 2024-11-01 22:22:00 +00:00
tcgcore.py Add trading page 2024-11-01 13:53:54 +00:00
tradegen.py CSS updates, elucidate readme 2024-11-01 22:22:00 +00:00
variables-template.py CSS updates, elucidate readme 2024-11-01 22:22:00 +00:00
wantedgen.py Add trading page 2024-11-01 13:53:54 +00:00

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 in rclone
    • serverpath: path to the site root on the server (with leading slash, without trailing slash)
    • name: the name you use in the game
    • highpriority: a list of high priority decks youre collecting
    • mediumpriority: a list of other decks youre collecting
    • tradepost: URL of your trade post on Dreamwidth
    • faves: a list of cards to showcase on the index page
    • headerbackground: an HTML colour to display behind your header image and set as a theme colour
    • british: 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” category
    • keepsig: True if you always want to keep one copy of your signature, False if you want to make them all available for trading
  • Run the following:

      python3 setup.py
      chmod +x build.sh
  • Save a header image to build/assets/header.png
  • 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 the log list like in the example (removing any of "received", "lost", "crayons" that arent relevant).
  • Run ./build.sh in this directory to download the relevant card images and then upload everything to the server.

Currently unaccounted for

  • Sketchpads
  • Portfolios
  • Duplicates
  • Masteries