aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralyx <alyx@aleteoryx.me>2023-08-10 03:31:44 -0400
committeralyx <alyx@aleteoryx.me>2023-08-10 03:31:44 -0400
commit0216a2a99ff28b1f5f102f52b7d980bbc4afc729 (patch)
treed04f94cf83482140b415be7853c48c14977b3189
parentf6cae9645df992ce80faea944369bc196aec3025 (diff)
downloadlfm_embed-0216a2a99ff28b1f5f102f52b7d980bbc4afc729.tar.gz
lfm_embed-0216a2a99ff28b1f5f102f52b7d980bbc4afc729.tar.bz2
lfm_embed-0216a2a99ff28b1f5f102f52b7d980bbc4afc729.zip
reorganize readme
-rw-r--r--README.md38
1 files changed, 23 insertions, 15 deletions
diff --git a/README.md b/README.md
index 9893116..d1cbc57 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@ A simple webserver for rendering a last.fm embed.
More specifically, this displays a simple webpage with info about your current or most recent last.fm scrobble.
Its intended use is to be put on a personal site or whatever.
-## Usage
+# Usage
`lfm_embed` is, as it stands, designed to use a reverse proxy.
A future release may include HTTPS support, but currently, it will only listen on `localhost`, prohibiting it from public access.
Once configured, a request of the form `http://localhost:9999/<last.fm username>` will render out an embed with the default theme.
@@ -13,16 +13,35 @@ As it stands, there are no plans to support displaying users with private listen
***
-## Configuration
+# Configuration
Configuration should be done via the environment.
`lfm_embed` also supports reading from a standard `.env` file.
The following are the environment variables which `lfm_embed` understands.
***
+## Core Config
+
### `LMFE_API_KEY` (Required)
Your last.fm API key. You'll need to create one [here](https://www.last.fm/api/account/create) for self-hosting.
+### `LFME_PORT` (Default: `9999`)
+The port to serve on locally.
+
+### `LFME_NO_REFRESH` (Default: `0`)
+If set to `1`, disable outputting of the HTML `meta http-eqiv="refresh"` tag, used for live status updates.
+
+## Logging
+
+### `LFME_LOG_LEVEL` (Default: `"warn"`)
+The loglevel. This is actually parsed as an [`env_logger`](https://docs.rs/env_logger/latest/env_logger) filter string.
+Read the docs for more info.
+
+### `LFME_LOG_FILE`
+If set, logs will be written to the specified file. Otherwise, logs are written to `stderr`.
+
+## User Perms
+
### `LFME_WHITELIST_MODE` (Default: `"open"`)
The following(case-insensitive) values are supported:
@@ -48,8 +67,7 @@ Parsing is delegated to the [`duration_str`](https://docs.rs/duration-str/latest
The amount of time to cache non-whitelisted user info for.
See `LFME_WHITELIST_REFRESH` for more info.
-### `LFME_PORT` (Default: `9999`)
-The port to serve on locally.
+## Themes
### `LFME_THEME_DIR`
If set, must be a valid path to a directory containing [Handlebars](https://handlebarsjs.com/guide/#language-features) files, ending in LFME_THEME_EXT.
@@ -88,16 +106,6 @@ Themes are only enumerated once, at startup. (This is a limitation of the [`hand
### `LFME_THEME_DEFAULT` (Default: `"plain"`)
The theme to use when no query string is present.
-### `LFME_LOG_LEVEL` (Default: `"warn"`)
-The loglevel. This is actually parsed as an [`env_logger`](https://docs.rs/env_logger/latest/env_logger) filter string.
-Read the docs for more info.
-
-### `LFME_LOG_FILE`
-If set, logs will be written to the specified file. Otherwise, logs are written to `stderr`.
-
-### `LFME_NO_REFRESH` (Default: `0`)
-If set to `1`, disable outputting of the HTML `meta http-eqiv="refresh"` tag, used for live status updates.
-
## Example Configuration
```ini
LFME_API_KEY=0123456789abcdef0123456789abcdef
@@ -110,5 +118,5 @@ LFME_WHITELIST=a_precious_basket_case, realRiversCuomo, Pixiesfan12345
```
***
-## Theming
+# Theming