From ed4b79d2bf2a2404ed5c59c5eedd849a70064aa4 Mon Sep 17 00:00:00 2001 From: talwat <83217276+talwat@users.noreply.github.com> Date: Wed, 26 Feb 2025 14:45:02 +0100 Subject: [PATCH] chore: redo help menu descriptions --- Cargo.lock | 2 +- Cargo.toml | 2 +- README.md | 23 ++++++++++++----------- src/main.rs | 16 ++++++++-------- src/player.rs | 2 +- 5 files changed, 23 insertions(+), 22 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 45f0a4d..41a9df4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1453,7 +1453,7 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lowfi" -version = "1.6.1-dev" +version = "1.6.2-dev" dependencies = [ "Inflector", "arc-swap", diff --git a/Cargo.toml b/Cargo.toml index c88291e..12218da 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lowfi" -version = "1.6.1-dev" +version = "1.6.2-dev" edition = "2021" description = "An extremely simple lofi player." license = "MIT" diff --git a/README.md b/README.md index 0e4001c..96cddf2 100644 --- a/README.md +++ b/README.md @@ -16,11 +16,10 @@ follow their rules. ## Why? I really hate modern music platforms, and I wanted a small, "suckless" -app that would literally just play lofi without video so I could use it -whenever. +app that would just play random lofi without video. -I also wanted it to be fairly resiliant to inconsistent networks, -so it buffers 5 whole songs at a time instead of parts of the same song. +It was also designed to be fairly resiliant to inconsistent networks, +and as such it buffers 5 whole songs at a time instead of parts of the same song. Although, lowfi is yet to be properly tested in difficult conditions, so don't rely on it too much until I do that. See [Scraping](#scraping) if @@ -156,19 +155,21 @@ or it could also be the name of a file (without the `.txt` extension) in the dat directory, so on Linux it's `~/.local/share/lowfi`. For example, `lowfi --tracks minipop` would load `~/.local/share/lowfi/minipop.txt`. -Whereas if you did `lowfi --tracks /home/user/Music/minipop.txt` it would load from that +Whereas if you did `lowfi --tracks ~/Music/minipop.txt` it would load from that specified directory. #### The Format -In Lists, the first line should be the base URL, followed by the rest of the tracks. +In lists, the first line should be the base URL, followed by the rest of the tracks.ç +This is also known as the "header", because it comes first. Each track will be first appended to the base URL, and then the result use to download -the track. All tracks should end in `.mp3` and as such must be in the MP3 format. +the track. All tracks must be in the MP3 format, as lowfi doesn't support any others currently. -lowfi won't put a `/` between the base & track for added flexibility, so for most cases you -should have a trailing `/` in your base url. The exception to this is if the track name begins -with something like `https://`, where in that case the base will not be prepended to it. +Additionally, lowfi *won't* put a `/` between the base & track for added flexibility, +so for most cases you should have a trailing `/` in your base url. +The exception to this is if the track name begins with something like `https://`, +where in that case the base will not be prepended to it. For example, in this list: @@ -192,4 +193,4 @@ For example, if you had an entry like this: 2023/04/2-In-Front-Of-Me.mp3!custom name ``` -Then lowfi would download from the first section, and display the second. +Then lowfi would download from the first section, and display the second as the track name. diff --git a/src/main.rs b/src/main.rs index a598e90..68b1942 100644 --- a/src/main.rs +++ b/src/main.rs @@ -19,33 +19,33 @@ mod scrape; reason = "señor clippy, i assure you this is not a state machine" )] struct Args { - /// Whether to use an alternate terminal screen. + /// Use an alternate terminal screen. #[clap(long, short)] alternate: bool, - /// Whether to hide the bottom control bar. + /// Hide the bottom control bar. #[clap(long, short)] minimalist: bool, - /// Whether to not include borders in the UI. + /// Exclude borders in UI. #[clap(long, short)] borderless: bool, - /// Whether to start lowfi paused. + /// Start lowfi paused. #[clap(long, short)] paused: bool, - /// Whether to include ALSA & other logs. + /// Include ALSA & other logs. #[clap(long, short)] debug: bool, - /// The width of the player, from 0 to 32. + /// Width of the player, from 0 to 32. #[clap(long, short, default_value_t = 3)] width: usize, - /// This is either a path, or a name of a file in the data directory (eg. ~/.local/share/lowfi). + /// Use a custom track list #[clap(long, short, alias = "list", short_alias = 'l')] - tracks: Option, + tracklist: Option, /// The command that was ran. /// This is [None] if no command was specified. diff --git a/src/player.rs b/src/player.rs index fe111a0..408fc89 100644 --- a/src/player.rs +++ b/src/player.rs @@ -178,7 +178,7 @@ impl Player { let volume = PersistentVolume::load().await?; // Load the track list. - let list = List::load(args.tracks.as_ref()).await?; + let list = List::load(args.tracklist.as_ref()).await?; // We should only shut up alsa forcefully on Linux if we really have to. #[cfg(target_os = "linux")]