trémeur ff76322a82 | 6 months ago | |
---|---|---|
gamebuild | 6 months ago | |
placebuild | 6 months ago | |
.gitignore | 6 months ago | |
README.org | 6 months ago | |
UNLICENSE | 9 months ago | |
backlog.py | 6 months ago | |
cardstring.py | 6 months ago | |
demo.org | 6 months ago | |
gameskel.py | 6 months ago | |
gamesort.py | 6 months ago | |
generategames.py | 6 months ago | |
generateplaces.py | 6 months ago | |
history.py | 6 months ago | |
init.py | 6 months ago | |
library.py | 6 months ago | |
sublibrary.py | 6 months ago | |
variables-template.py | 6 months ago |
README.org
Trackers
- About
- Dependencies
- General setup
- Tracking games with a backloggery clone
- Tracking places visited using Leaflet
- First run (or if adding any new trackers)
- Building
About
The scripts in this repository take information from a structured set of .org
files and use them to build static webpages that track various activities (so far, gaming and travelling). These pages can be used as a replacement for third-party services e.g. Backloggery.
Dependencies
python3
orgparse
(install via pip)rclone
(for syncing to the server)
General setup
Structure of the .org files
See demo.org
for an example.
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 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)
Testing
- Run
python3 generategames.py local
to build ingamebuild
.
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
Testing
- Run
python3 generateplaces.py local
to build inplacebuild
. - If new places have been added since the last build, they will be added to
places.py
and the terminal will signal this. Add the latitude and longitude for these places inplaces.py
before building again.
First run (or if adding any new trackers)
- Run
python3 init.py
and thenchmod +x build.sh
. - Create directories on the server corresponding to any
*serverpath
variables you have set.
Building
- Run
./build.sh
to build and upload to the server.