Tracking things using static site generators
gamebuild | ||
placebuild | ||
recordbuild | ||
.gitignore | ||
backlog.py | ||
cardstring.py | ||
demo.org | ||
gameskel.py | ||
gamesort.py | ||
generategames.py | ||
generateplaces.py | ||
generaterecords.py | ||
history.py | ||
init.py | ||
library.py | ||
README.org | ||
sublibrary.py | ||
UNLICENSE | ||
variables-template.py |
Trackers
- About
- Dependencies
- General setup
- Tracking games with a backloggery clone
- Tracking places visited using Leaflet
- Displaying a record collection (taking data from Discogs)
- First run (or if adding any new trackers)
- Building
About
The scripts in this repository build static webpages based on information from two sources:
- a structured set of
.org
files; - APIs of selected third-party websites (so far: Discogs).
These pages can be used as a replacement for third-party services e.g. Backloggery.
Dependencies
orgparse
(install via pip)python3
rclone
(for syncing to the server)geopy
if you are tracking places visited (install via pip)python3-discogs-client
if you are displaying a record collection (install via pip)
General setup
Setting the variables
Copy variables-template.py
to variables.py
and edit:
orgpath
: absolute path to the root directory in which.org
files are stored, including trailing slashlocalpath
: absolute path to this directory, including trailing slashdomain
:https://yourdomain.tld
without trailing slashrclonesiteroot
: pathrclone
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 gamebuild/backloggery.css
. Alternatively, you can load the fonts remotely and adjust the page head HTML generated by gameskel.py
.
Setting the variables
In variables.py
, edit:
trackgames
: set toTrue
gameserverpath
: path to directory on the server where files will be uploaded, including trailing slashendlessgames
: a list of “endless” games in the formattitle (console)
description
: content for the “about” section (can include HTML tags)gamestartyear
: year from which to begin tracking (an integer)gamehue
: theme colour expressed as a hue from 0 to 360consoles
: 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)
Tracking places visited using Leaflet
Setup
Upload a CSS file to the server if necessary. Most CSS is set by Leaflet.
Setting the variables
In variables.py
, edit:
trackplaces
: set toTrue
placeserverpath
: path to directory on the server where files will be uploaded, including trailing slashplacestartyear
: year from which to begin tracking (an integer)placecss
: location of the CSS file you wish to apply, relative to the site root
Displaying a record collection (taking data from Discogs)
Setup
- Upload a CSS file to the server for styling fonts etc; most CSS is set inline.
- Get a Discogs API token here.
Setting the variables
In variables.py
, edit:
trackrecords
: set toTrue
recordserverpath
: path to directory on the server where files will be uploaded, including trailing slashrecordcss
: location of the CSS file you wish to apply, relative to the site rootdiscogstoken
: the API token you generateddiscogsuser
: your Discogs username