Add script for displaying record collection
This commit is contained in:
parent
2886ca7192
commit
94ce340e8f
8 changed files with 127 additions and 4 deletions
23
README.org
23
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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue