Open bonelifer opened 9 months ago
Hi!
You can either fork this repo and have GitHub Actions keep your own GitHub Pages site updated, or get some usernames added to the list already used here.
If you do the latter, that's all there is to it, your feeds will be accessible on the existing site linked in the readme. If it's just one or a few I'm happy to add them, so list them here or submit a PR adding them to users.prod.txt
.
If you're forking, you'll have to do a little configuration to:
/docs
) and Actions in the repo settingsusers.prod.txt
)mk/feeds.sh
LASTFM_API_KEY
environment variable)The Action to update the feeds runs on a schedule.
Setting the LASTFM_API_KEY
is a little involved:
SOPS_SECRET
contains an AGE private key to be used with sops. Whatever the value is will, during the Action, be the content of the runner's ~/.config/sops/age/keys.txt
.age
value in the repo's .sops.yaml
sops/lastfm.prod.yml
, which keeps an encrypted value for LASTFM_API_KEY
.If you don't want to use the action as-is, or if you want to avoid sops, take a look at the included Python package's help output:
$ lastfeeder --help
lastfeeder 0.2.0
Generate RSS feed files for users' recent Last.fm scrobbles.
Note:
LASTFM_API_KEY should be set as an environment variable.
Usage:
lastfeeder [SWITCHES]
Meta-switches:
-h, --help Prints this help message and quits
-v, --version Prints the program's version and quits
Switches:
-U, --users-file FILEPATH:ExistingFile path to a newline-delimited list of Last.fm usernames; may be given multiple times
-d, --domain DOMAIN:str leading URL of the feed address (https://<domain>/<user>.rss); the default is localhost
-o, --output-dir PATH:path destination folder for the RSS files; the default is /home/andy/Code/lastfeeder
-u, --user USERNAME:str Last.fm username; may be given multiple times
The Action ultimately boils down to that last line of mk/feeds.sh
:
sops exec-env "sops/lastfm.${deployment}.yml" \
"lastfeeder -o docs/feeds -U users.${deployment}.txt -d andydecleyre.github.io/lastfeeder/feeds"
I realize this all may be over the top, but let me know if you have any questions.
How is this used?