Python SSG for tracking online TCG collection
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 409d6c4893 misc fixes 3 days ago
build Track coupons 2 weeks ago
.gitignore Add space for miscellaneous files 1 week ago
COPYING MVP 2 months ago
README.org Make it possible to include single cards in mass collects 4 days ago
build.sh Add some more classes for CSS 4 days ago
collectinggen.py Add thresholds for medium and high priority 1 month ago
download.py Add page for masteries, get deck types from a file, some refactoring 2 months ago
generate.py Make owned cards page optional 2 weeks ago
indexgen.py misc fixes 3 days ago
levelsgen.py Lazy load card images 2 months ago
log-template.py Track coupons 2 weeks ago
loggen.py Track coupons 2 weeks ago
massgen.py misc fixes 3 days ago
masteredgen.py Add page for masteries, get deck types from a file, some refactoring 2 months ago
ownedgen.py Add page for masteries, get deck types from a file, some refactoring 2 months ago
portfoliosgen.py Move portfolios to log 2 months ago
searchgen.py Make it possible to include single cards in mass collects 4 days ago
setup.py misc fixes 3 days ago
skel.py Make owned cards page optional 2 weeks ago
tcgcore.py Make it possible to include single cards in mass collects 4 days ago
thetypes.py Add page for masteries, get deck types from a file, some refactoring 2 months ago
tradegen.py Make it possible to include single cards in mass collects 4 days ago
variables-template.py Make it possible to include single cards in mass collects 4 days ago
wantedgen.py Attempt some refactoring 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 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
    • 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
    • mediumthreshold: minimum number of owned cards for marking a deck as medium priority
    • highthreshold: minimum number of owned cards for marking a deck as high priority
    • 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
    • firstmasteries: a list of decks you mastered first
    • masscollect: list (python dict) of series/themes being mass collected, each containing a dict which contains at least one of "decks" specifying a list of decks, or "singles" specifying a list of individual cards
  • 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/, as 00.gif, 01.gif, etc.
  • Save coupons to build/assets/coupons/, with filenames that match the codes youve given them in log.py.
  • 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", "decks", "coupons"> that arent relevant).
  • Run ./build.sh in this directory to download the relevant card images and then upload everything to the server.