AndydeCleyre / lastfeeder

Generate RSS feeds for users' recent Last.fm scrobbles.
4 stars 0 forks source link

Usage #2

Open bonelifer opened 9 months ago

bonelifer commented 9 months ago

How is this used?

AndydeCleyre commented 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:

The Action to update the feeds runs on a schedule.

Setting the LASTFM_API_KEY is a little involved:

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.