Tracking things using static site generators
Find a file
2024-06-19 15:52:15 +01:00
gamebuild Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
.gitignore Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
backlog.py Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
cardstring.py Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
demo.org Add demo org file 2024-02-18 22:48:26 +00:00
gameskel.py Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
gamesort.py Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
generategames.py Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
history.py Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
init.py Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
library.py Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
README.org Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
sublibrary.py Prepare for adding other trackers 2024-06-19 15:52:15 +01:00
UNLICENSE Standing on the shoulders of giants 2024-03-24 21:15:39 +00:00
variables-template.py Prepare for adding other trackers 2024-06-19 15:52:15 +01:00

Trackers

Dependencies

  • python3
  • orgparse (install via pip)
  • rclone (for syncing to the server)

General setup

Setting the variables

Rename variables-template.py to variables.py and edit:

  • orgpath: absolute path to the root directory in which .org files are stored, including trailing slash
  • localpath: absolute path to this directory, including trailing slash
  • domain: https://yourdomain.tld without trailing slash
  • rclonesiteroot: path rclone uses to access your webserver

Tracking games with a backloggery clone

Setup

Fonts

Upload the fonts Lato, Titillium Web, and Material Icons to the directory /fonts on your server (I recommend google-webfonts-helper). Check the filenames are consistent with those in build/backloggery.css. Alternatively, you can load the fonts remotely and adjust the page head HTML generated by skeleton.py.

Setting the variables

In variables.py, edit:

  • trackgames: set to True
  • gameserverpath: path to directory on the server where files will be uploaded, including trailing slash
  • endlessgames: a list of “endless” games in the format title (console)
  • description: content for the “about” section (can include HTML tags)
  • startyear: year from which to begin tracking (an integer)
  • hue: theme colour expressed as a hue from 0 to 360
  • consoles: add or remove consoles following the format provided (.png images must be added to the build directory with a filename corresponding with the value of "img" for each console)

First run

  • Run python3 init.py and then chmod +x build.sh.
  • Create directories on the server corresponding to any *serverpath variables you have set..

Generating the files

  • Run python3 generate.py local to build in local directories.
  • Run ./build.sh to build and upload to the server.