diff --git a/.gitignore b/.gitignore index 0793b3c..b09ed1f 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ gamebuild/* !gamebuild/*.png placebuild/* !placebuild/.gitkeep +recordbuild/index.html variables.py \ No newline at end of file diff --git a/README.org b/README.org index 3b49572..a920785 100644 --- a/README.org +++ b/README.org @@ -1,17 +1,21 @@ #+TITLE: Trackers * 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. +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 -- =geopy= if you are tracking places visited (install via pip) - =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 ** Structure of the .org files See =demo.org= for an example. ** Setting the variables -Rename =variables-template.py= to =variables.py= and edit: +Copy =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 @@ -43,6 +47,19 @@ In =variables.py=, edit: ** Testing - Run =python3 generateplaces.py local= to build in =placebuild=. (This may take some time.) - Check whether places are displayed accurately in the output file. If not, add regions/countries to disambiguate any incorrectly displayed places to the =disambig= dictionary in =variables.py= (see examples). +* 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 [[https://www.discogs.com/settings/developers][here]]. +*** Setting the variables +In =variables.py=, edit: +- =trackrecords=: set to =True= +- =recordserverpath=: path to directory on the server where files will be uploaded, including trailing slash +- =recordcss=: location of the CSS file you wish to apply, relative to the site root +- =discogstoken=: the API token you generated +- =discogsuser=: your Discogs username +** Testing +- Run =python3 generaterecords.py local= to build in =recordbuild=. * First run (or if adding any new trackers) - Run =python3 init.py= and then =chmod +x build.sh=. - Create directories on the server corresponding to any =*serverpath= variables you have set. diff --git a/generateplaces.py b/generateplaces.py index 89ce26c..d35d3e0 100644 --- a/generateplaces.py +++ b/generateplaces.py @@ -93,7 +93,7 @@ if variables.trackplaces == True: writefile.write("\n\n \n \n \n \n Map\n \n \n \n \n \n \n
\n \n \n \n \n
\n