diff --git a/LICENSE b/LICENSE index 2c2b048..25ae4e9 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2025 Brian M. Dennis + Copyright 2025 - 2026 Brian M. Dennis Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/README.md b/README.md index 1cd3127..b024a71 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,288 @@ [![QA](https://github.com/crossjam/scrobbledb/actions/workflows/qa.yml/badge.svg)](https://github.com/crossjam/scrobbledb/actions/workflows/qa.yml) -A modernization of [Jacob Kaplan-Moss’s](https://github.com/jacobian/) -project -[lastfm-to-sqlite](https://github.com/jacobian/lastfm-to-sqlite). +**Save your listening history from Last.fm or Libre.fm to a local SQLite database.** -Uses the [pylast](https://github.com/pylast/pylast) module underneath -the covers. +scrobbledb is a Python command-line tool that downloads your scrobble +data (listening history) from Last.fm or Libre.fm and stores it in a +SQLite database for local analysis, backup, and exploration. Built +with modern Python tooling, it offers rich terminal output, full-text +search, interactive browsing, and comprehensive data export +capabilities. -## Documentation +**Full disclosure, this project is primarily "auditionware".** The +main goal is to provide something for potential external collaborators +or employers to view and review. Yup, it’s a bit about me showing +off. If you have strong opinions feel free to fork this sucker and +take it where your heart desires. -See [docs/cli.md](docs/cli.md) for an overview of the -`scrobbledb` command line interface and links to per-command reference -pages in `docs/commands/`. +## About Last.fm and Scrobbling +[Last.fm](https://www.last.fm/) is a music discovery and tracking +service that records what you listen to across different platforms and +devices. This process of recording your listening history is called +"scrobbling." + +**Scrobbling** automatically logs each track you play—including the +artist, album, track name, and timestamp—creating a detailed history +of your music consumption over time. Last.fm aggregates this data to +generate statistics, recommendations, and insights about your +listening habits. + +The **Last.fm API** provides programmatic access to this scrobble +data, allowing applications like scrobbledb to retrieve and analyze +your complete listening history. [Libre.fm](https://libre.fm/) is an +open-source alternative that offers compatible scrobbling services. + +## Why scrobbledb? + +- **Local backup**: Keep your listening history in a local database you control +- **Advanced queries**: Use SQL to analyze your music habits in ways the web interface doesn't support +- **Data portability**: Export your data in multiple formats (JSON, CSV, TSV) +- **Full-text search**: Find tracks, albums, and artists instantly with SQLite FTS5 +- **Interactive browsing**: Explore your library with a terminal UI +- **Privacy**: Your data stays on your machine + +## Origin + +scrobbledb is a modernization of [Jacob +Kaplan-Moss's](https://github.com/jacobian/) +[lastfm-to-sqlite](https://github.com/jacobian/lastfm-to-sqlite) +project. This version has been significantly expanded with: + +- Modern Python tooling (uv, ruff, type hints) +- Domain-specific commands for exploring artists, albums, tracks, and plays +- Interactive terminal UI for browsing +- Full-text search capabilities +- Comprehensive data export options +- Enhanced statistics and filtering +- Rich terminal output with tables and progress bars + +Original concept and implementation by Jacob Kaplan-Moss. Current development by Brian M. Dennis. + +## Installation + +scrobbledb requires Python 3.11 or later and uses [uv](https://github.com/astral-sh/uv) for dependency management. + +```bash +# Clone the repository +git clone https://github.com/crossjam/scrobbledb.git +cd scrobbledb + +# Install dependencies +uv sync + +# Run scrobbledb +uv run scrobbledb --help +``` + +## Quick Start + +### 1. Save your Last.fm credentials + +```bash +uv run scrobbledb auth +``` + +This prompts for your Last.fm username, API key, shared secret, and +password, then saves them in `${APP_DIR}/auth.json`. + +**Getting API credentials**: Visit [Last.fm +API](https://www.last.fm/api/account/create) to create an API account +and obtain your API key and shared secret. + +### 2. Initialize the database + +```bash +uv run scrobbledb config init +``` + +This creates the SQLite database and sets up the full-text search index. + +### 3. Import your listening history + +```bash +uv run scrobbledb ingest +``` + +This fetches your complete scrobble history from Last.fm and stores it +locally. Depending on how many scrobbles you have, this may take +several minutes. + +### 4. Explore your data + +```bash +# Search for tracks +uv run scrobbledb search "pink floyd" + +# View recent plays +uv run scrobbledb plays list --limit 50 + +# Browse interactively +uv run scrobbledb browse + +# See your top artists +uv run scrobbledb artists top --limit 20 + +# View statistics +uv run scrobbledb stats overview +``` + +## Command Overview + +scrobbledb provides a comprehensive set of commands for managing and exploring your music data: + +### Data Management + +- **`auth`** - Configure Last.fm/Libre.fm API credentials ([docs](docs/commands/auth.md)) +- **`config`** - Initialize database, reset data, or show configuration paths ([docs](docs/commands/config.md)) +- **`ingest`** - Fetch listening history from Last.fm/Libre.fm ([docs](docs/commands/ingest.md)) +- **`import`** - Import scrobbles from JSONL, CSV, or TSV files ([docs](docs/commands/import.md)) +- **`index`** - Create or rebuild the full-text search index ([docs](docs/commands/index.md)) +- **`export`** - Export data in various formats with presets or custom SQL ([docs](docs/commands/export.md)) + +### Data Exploration + +- **`search`** - Full-text search across artists, albums, and tracks ([docs](docs/commands/search.md)) +- **`browse`** - Interactive terminal UI for browsing tracks ([docs](docs/commands/browse.md)) +- **`plays`** - View and filter listening history chronologically ([docs](docs/commands/plays.md)) +- **`artists`** - Browse artists, view top artists, see detailed statistics ([docs](docs/commands/artists.md)) +- **`albums`** - Search albums and view album details with tracks ([docs](docs/commands/albums.md)) +- **`tracks`** - Search tracks, view top tracks, see play history ([docs](docs/commands/tracks.md)) +- **`stats`** - Generate listening statistics (overview, monthly, yearly) ([docs](docs/commands/stats.md)) + +### Advanced + +- **`sql`** - Direct access to sqlite-utils commands for power users ([docs](docs/commands/sql.md)) +- **`version`** - Display the installed version ([docs](docs/commands/version.md)) + +See the [CLI overview](docs/cli.md) for a complete command reference and detailed documentation for each command. + +## Database Schema + +scrobbledb stores your data in a normalized SQLite database: + +- **`artists`** - Artist information (id, name) +- **`albums`** - Album information (id, title, artist_id) +- **`tracks`** - Track information (id, title, album_id) +- **`plays`** - Play events (track_id, timestamp) +- **`tracks_fts`** - FTS5 full-text search index + +This schema enables efficient queries, comprehensive searches, and detailed analysis of your listening history. + +## Example Workflows + +### Backup your data weekly + +```bash +# Update with new scrobbles +uv run scrobbledb ingest --since-date "7 days ago" + +# Export to JSON backup +uv run scrobbledb export plays --format json --output backup-$(date +%Y%m%d).json +``` + +### Find your most-played tracks from a specific year + +```bash +uv run scrobbledb tracks top --since 2023-01-01 --until 2023-12-31 --limit 50 +``` + +### Analyze your listening patterns + +```bash +# Monthly breakdown +uv run scrobbledb stats monthly --year 2024 + +# Top artists in the last 30 days +uv run scrobbledb artists top --since "30 days ago" + +# All plays for a specific artist +uv run scrobbledb plays list --artist "Radiohead" --limit 1000 +``` + +### Export data for external analysis + +```bash +# Export to CSV for Excel/pandas +uv run scrobbledb export plays --format csv --output plays.csv + +# Custom SQL query +uv run scrobbledb export --sql "SELECT artist_name, COUNT(*) as plays FROM plays GROUP BY artist_name" --format csv +``` + +## Configuration + +scrobbledb follows the XDG Base Directory specification. By default, data is stored in: + +- **Linux/Unix**: `~/.local/share/dev.pirateninja.scrobbledb/` +- **macOS**: `~/Library/Application Support/dev.pirateninja.scrobbledb/` +- **Windows**: `%LOCALAPPDATA%\dev.pirateninja.scrobbledb\` + +You can override the database and auth file locations using command-line options: + +```bash +uv run scrobbledb --database /path/to/custom.db ingest --auth /path/to/auth.json +``` + +## Development + +scrobbledb uses modern Python development tools: + +- **uv** - Fast Python package manager +- **ruff** - Fast Python linter and formatter +- **pytest** - Testing framework +- **poe** - Task runner for common development tasks + +```bash +# Run tests +poe test + +# Lint code +poe lint + +# Type check +poe type + +# Run all quality checks +poe qa +``` + +## Agentic Coding Disclosure + +Significant portions of this project were implemented through the use +of agentic coding tools such as Claude Code, GitHub Copilot Agent, +OpenAI Codex, and Gemini CLI. This was a specific goal intended to +explore and increase my proficiency with AI accelerated coding +practices. + +See [AGENTS.md](AGENTS.md) for detailed development guidelines. + +## Contributing + +**As mentioned above, this project is primarily "auditionware".** + +However, pull requests and issues are welcome, at least as criticism, +feedback, and inspiration! There might be a lag on responding or +acceptance though. You’re likely best off assuming that a PR will take +forever to be accepted if at all. Similarly for addressing issues. For +major changes, please open an issue first to discuss what you would +like to change. + +## License + +scrobbledb is licensed under the Apache License 2.0. See [LICENSE](LICENSE) for the full license text. + +Original lastfm-to-sqlite project by Jacob Kaplan-Moss, originally +under the [WTFPL][wtfpl] based upon his repository’s [`pyproject.toml`][jacobian-pyproject-toml] +file. + +## Links + +- **Repository**: https://github.com/crossjam/scrobbledb +- **Original Project**: https://github.com/jacobian/lastfm-to-sqlite +- **Last.fm API**: https://www.last.fm/api +- **Libre.fm**: https://libre.fm/ + +[wtfpl]: https://www.wtfpl.net +[jacobian-pyproject-toml]: https://github.com/jacobian/lastfm-to-sqlite/blob/8118b453b36142241618c484cf74c7916423f649/pyproject.toml diff --git a/docs/commands/albums.md b/docs/commands/albums.md index 128bfa6..c921140 100644 --- a/docs/commands/albums.md +++ b/docs/commands/albums.md @@ -8,11 +8,11 @@ Album investigation commands. Search for albums and view detailed information ab from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["albums", "--help"]) +result = runner.invoke(cli, ["albums", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli albums [OPTIONS] COMMAND [ARGS]... +Usage: scrobbledb albums [OPTIONS] COMMAND [ARGS]... Album investigation commands. @@ -34,11 +34,11 @@ Commands: Search for albums using fuzzy matching. Find albums by partial name when you don't remember exact titles. ``` -Usage: cli albums search [OPTIONS] QUERY +Usage: scrobbledb albums search [OPTIONS] QUERY Search for albums using fuzzy matching. @@ -72,11 +72,11 @@ Options: Display detailed information about a specific album and list its tracks with play statistics. ``` -Usage: cli albums show [OPTIONS] [ALBUM_TITLE] +Usage: scrobbledb albums show [OPTIONS] [ALBUM_TITLE] Display detailed information about a specific album and list its tracks. diff --git a/docs/commands/artists.md b/docs/commands/artists.md index 73af4b5..d6e43e8 100644 --- a/docs/commands/artists.md +++ b/docs/commands/artists.md @@ -8,11 +8,11 @@ Artist investigation commands. Browse all artists, view top artists over differe from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["artists", "--help"]) +result = runner.invoke(cli, ["artists", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli artists [OPTIONS] COMMAND [ARGS]... +Usage: scrobbledb artists [OPTIONS] COMMAND [ARGS]... Artist investigation commands. @@ -35,11 +35,11 @@ Commands: List all artists in the database with play statistics. Supports sorting by play count, name, or recent activity. ``` -Usage: cli artists list [OPTIONS] +Usage: scrobbledb artists list [OPTIONS] List all artists in the database with play statistics. @@ -78,11 +78,11 @@ Options: Show top artists with flexible time range support. Analyze listening patterns over different time periods with statistics including percentage of total plays and average plays per day. ``` -Usage: cli artists top [OPTIONS] +Usage: scrobbledb artists top [OPTIONS] Show top artists with flexible time range support. @@ -121,11 +121,11 @@ Options: Display detailed information about a specific artist including top tracks and albums. ``` -Usage: cli artists show [OPTIONS] [ARTIST_NAME] +Usage: scrobbledb artists show [OPTIONS] [ARTIST_NAME] Display detailed information about a specific artist. diff --git a/docs/commands/auth.md b/docs/commands/auth.md index 2bdc4d5..b0c8dee 100644 --- a/docs/commands/auth.md +++ b/docs/commands/auth.md @@ -8,11 +8,11 @@ Store credentials for Last.fm or Libre.fm. The command prompts for your username from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["auth", "--help"]) +result = runner.invoke(cli, ["auth", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli auth [OPTIONS] +Usage: scrobbledb auth [OPTIONS] Save authentication credentials to a JSON file diff --git a/docs/commands/browse.md b/docs/commands/browse.md index d31b113..525d430 100644 --- a/docs/commands/browse.md +++ b/docs/commands/browse.md @@ -8,11 +8,11 @@ Launch an interactive Textual TUI to explore your library without typing search from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["browse", "--help"]) +result = runner.invoke(cli, ["browse", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli browse [OPTIONS] [DATABASE] +Usage: scrobbledb browse [OPTIONS] [DATABASE] Browse tracks in an interactive TUI. diff --git a/docs/commands/config.md b/docs/commands/config.md index 77c0c59..bda2cd6 100644 --- a/docs/commands/config.md +++ b/docs/commands/config.md @@ -8,11 +8,11 @@ Initialize and manage the scrobbledb database, including optional FTS5 search se from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["config", "--help"]) +result = runner.invoke(cli, ["config", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli config [OPTIONS] COMMAND [ARGS]... +Usage: scrobbledb config [OPTIONS] COMMAND [ARGS]... Configuration and database management commands. @@ -35,11 +35,11 @@ Commands: Create the data directory, initialize the database, and set up the FTS5 index unless `--no-index` is used. Use `--dry-run` to see what would be created without modifying disk. ``` -Usage: cli config init [OPTIONS] +Usage: scrobbledb config init [OPTIONS] Initialize scrobbledb data directory and database. @@ -60,11 +60,11 @@ Options: Drop and recreate the database, optionally skipping FTS5 with `--no-index`. Prompts for confirmation unless `--force`/`-f` is provided. ``` -Usage: cli config reset [OPTIONS] [DATABASE] +Usage: scrobbledb config reset [OPTIONS] [DATABASE] Reset the scrobbledb database. @@ -88,11 +88,11 @@ Options: Show the resolved data and config directories plus expected file paths. ``` -Usage: cli config location [OPTIONS] +Usage: scrobbledb config location [OPTIONS] Display scrobbledb configuration and data directory locations. diff --git a/docs/commands/export.md b/docs/commands/export.md index a3245be..f8848aa 100644 --- a/docs/commands/export.md +++ b/docs/commands/export.md @@ -8,11 +8,11 @@ Run preset or custom queries against the database and write the results in JSONL from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["export", "--help"]) +result = runner.invoke(cli, ["export", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli export [OPTIONS] [[plays|tracks|albums|artists]] +Usage: scrobbledb export [OPTIONS] [[plays|tracks|albums|artists]] Export scrobble data in various formats. diff --git a/docs/commands/import.md b/docs/commands/import.md index a155cba..c6aa8c5 100644 --- a/docs/commands/import.md +++ b/docs/commands/import.md @@ -8,11 +8,11 @@ Load scrobbles from JSONL, CSV, or TSV files (or stdin) into the database. The c from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["import", "--help"]) +result = runner.invoke(cli, ["import", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli import [OPTIONS] [DATABASE] +Usage: scrobbledb import [OPTIONS] [DATABASE] Import scrobbles to the database from a file or stdin. diff --git a/docs/commands/index.md b/docs/commands/index.md index 1b1114d..65958fb 100644 --- a/docs/commands/index.md +++ b/docs/commands/index.md @@ -8,11 +8,11 @@ Create or rebuild the FTS5 full-text search index. Use this after large imports from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["index", "--help"]) +result = runner.invoke(cli, ["index", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli index [OPTIONS] [DATABASE] +Usage: scrobbledb index [OPTIONS] [DATABASE] Set up and rebuild FTS5 full-text search index. diff --git a/docs/commands/ingest.md b/docs/commands/ingest.md index c706a6f..5e92da7 100644 --- a/docs/commands/ingest.md +++ b/docs/commands/ingest.md @@ -8,11 +8,11 @@ Fetch recent plays from Last.fm/Libre.fm using saved credentials and insert them from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["ingest", "--help"]) +result = runner.invoke(cli, ["ingest", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli ingest [OPTIONS] [DATABASE] +Usage: scrobbledb ingest [OPTIONS] [DATABASE] Ingest play history from last.fm/libre.fm to a SQLite database. diff --git a/docs/commands/plays.md b/docs/commands/plays.md index f32e2b6..3f7a962 100644 --- a/docs/commands/plays.md +++ b/docs/commands/plays.md @@ -8,11 +8,11 @@ View and filter your listening history chronologically. The `plays` command grou from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["plays", "--help"]) +result = runner.invoke(cli, ["plays", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli plays [OPTIONS] COMMAND [ARGS]... +Usage: scrobbledb plays [OPTIONS] COMMAND [ARGS]... Play history commands. @@ -32,11 +32,11 @@ Commands: List recent plays with filtering and pagination. Supports flexible date filtering using relative expressions like "7 days ago" or ISO 8601 dates. ``` -Usage: cli plays list [OPTIONS] +Usage: scrobbledb plays list [OPTIONS] List recent plays with filtering and pagination. diff --git a/docs/commands/search.md b/docs/commands/search.md index 5ab6da6..34dd429 100644 --- a/docs/commands/search.md +++ b/docs/commands/search.md @@ -8,11 +8,11 @@ Full-text search across artists, albums, and track titles using the FTS5 index. from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["search", "--help"]) +result = runner.invoke(cli, ["search", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli search [OPTIONS] QUERY [DATABASE] +Usage: scrobbledb search [OPTIONS] QUERY [DATABASE] Search for tracks using full-text search. diff --git a/docs/commands/sql.md b/docs/commands/sql.md index 17bf7e1..2f304d8 100644 --- a/docs/commands/sql.md +++ b/docs/commands/sql.md @@ -8,11 +8,11 @@ Read-only sqlite-utils commands against the scrobbledb database. Use these to in from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["sql", "--help"]) +result = runner.invoke(cli, ["sql", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli sql [OPTIONS] COMMAND [ARGS]... +Usage: scrobbledb sql [OPTIONS] COMMAND [ARGS]... SQLite database query and inspection commands. @@ -74,11 +74,11 @@ Commands: Execute SQL and return results as JSON. ``` -Usage: cli sql query [OPTIONS] SQL_QUERY +Usage: scrobbledb sql query [OPTIONS] SQL_QUERY Execute SQL query and return the results as JSON. @@ -114,11 +114,11 @@ Options: List database tables with optional counts and columns. ``` -Usage: cli sql tables [OPTIONS] +Usage: scrobbledb sql tables [OPTIONS] List the tables in the database. @@ -151,11 +151,11 @@ Options: Show the schema for the whole database or specific tables. ``` -Usage: cli sql schema [OPTIONS] [TABLES]... +Usage: scrobbledb sql schema [OPTIONS] [TABLES]... Show full schema for this database or for specified tables. @@ -174,11 +174,11 @@ Options: List views in the database. ``` -Usage: cli sql views [OPTIONS] +Usage: scrobbledb sql views [OPTIONS] List the views in the database. @@ -209,11 +209,11 @@ Options: Run full-text search against a table. ``` -Usage: cli sql search [OPTIONS] DBTABLE Q +Usage: scrobbledb sql search [OPTIONS] DBTABLE Q Execute a full-text search against this table. @@ -248,11 +248,11 @@ Options: Output a SQL dump of the schema and contents. ``` -Usage: cli sql dump [OPTIONS] +Usage: scrobbledb sql dump [OPTIONS] Output a SQL dump of the schema and full contents of the database. @@ -270,11 +270,11 @@ Options: Analyze columns in one or more tables. ``` -Usage: cli sql analyze-tables [OPTIONS] [TABLES]... +Usage: scrobbledb sql analyze-tables [OPTIONS] [TABLES]... Analyze the columns in one or more tables. @@ -299,11 +299,11 @@ Options: Execute SQL against an in-memory database created from CSV/TSV/JSON inputs. ``` -Usage: cli sql memory [OPTIONS] [PATHS]... SQL_QUERY +Usage: scrobbledb sql memory [OPTIONS] [PATHS]... SQL_QUERY Execute SQL query against an in-memory database, optionally populated by imported data. @@ -348,11 +348,11 @@ Options: List installed sqlite-utils plugins. ``` -Usage: cli sql plugins [OPTIONS] +Usage: scrobbledb sql plugins [OPTIONS] List installed sqlite-utils plugins. @@ -369,11 +369,11 @@ Options: Show indexes for the whole database or specific tables. ``` -Usage: cli sql indexes [OPTIONS] [TABLES]... +Usage: scrobbledb sql indexes [OPTIONS] [TABLES]... Show indexes for the whole database or specific tables. @@ -403,11 +403,11 @@ Options: Output rows from a table with filtering options. ``` -Usage: cli sql rows [OPTIONS] TABLE_NAME +Usage: scrobbledb sql rows [OPTIONS] TABLE_NAME Output all rows in the specified table. @@ -449,11 +449,11 @@ Options: Show triggers configured in the database. ``` -Usage: cli sql triggers [OPTIONS] [TABLES]... +Usage: scrobbledb sql triggers [OPTIONS] [TABLES]... Show triggers configured in this database. diff --git a/docs/commands/stats.md b/docs/commands/stats.md index 7be7af7..b049cae 100644 --- a/docs/commands/stats.md +++ b/docs/commands/stats.md @@ -8,11 +8,11 @@ Summaries of your listening history. All subcommands default to the standard dat from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["stats", "--help"]) +result = runner.invoke(cli, ["stats", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli stats [OPTIONS] COMMAND [ARGS]... +Usage: scrobbledb stats [OPTIONS] COMMAND [ARGS]... Descriptive statistics about your scrobbles. @@ -45,11 +45,11 @@ Commands: Totals for scrobbles, unique artists/albums/tracks, and the listen date range. ``` -Usage: cli stats overview [OPTIONS] +Usage: scrobbledb stats overview [OPTIONS] Display overall scrobble statistics. @@ -74,11 +74,11 @@ Options: Monthly play counts with optional relative or absolute date bounds and an optional limit on the number of months returned. ``` -Usage: cli stats monthly [OPTIONS] +Usage: scrobbledb stats monthly [OPTIONS] Display scrobble statistics rolled up by month. @@ -115,11 +115,11 @@ Options: Yearly play counts using the same filtering options as `monthly`. ``` -Usage: cli stats yearly [OPTIONS] +Usage: scrobbledb stats yearly [OPTIONS] Display scrobble statistics rolled up by year. diff --git a/docs/commands/tracks.md b/docs/commands/tracks.md index 115bd0f..1aa001f 100644 --- a/docs/commands/tracks.md +++ b/docs/commands/tracks.md @@ -8,11 +8,11 @@ Track investigation commands. Search for tracks, view top tracks over time perio from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["tracks", "--help"]) +result = runner.invoke(cli, ["tracks", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli tracks [OPTIONS] COMMAND [ARGS]... +Usage: scrobbledb tracks [OPTIONS] COMMAND [ARGS]... Track investigation commands. @@ -34,11 +34,11 @@ Commands: Search for tracks using fuzzy matching. Find tracks by partial title with optional artist and album filtering. ``` -Usage: cli tracks search [OPTIONS] QUERY +Usage: scrobbledb tracks search [OPTIONS] QUERY Search for tracks using fuzzy matching. @@ -74,11 +74,11 @@ Options: Show top tracks with flexible time range support. Discover your most played tracks over various time periods with ranking and percentage statistics. ``` -Usage: cli tracks top [OPTIONS] +Usage: scrobbledb tracks top [OPTIONS] Show top tracks with flexible time range support. @@ -118,11 +118,11 @@ Options: Display detailed information about a specific track including play history and statistics. ``` -Usage: cli tracks show [OPTIONS] [TRACK_TITLE] +Usage: scrobbledb tracks show [OPTIONS] [TRACK_TITLE] Display detailed information about a specific track. diff --git a/docs/commands/version.md b/docs/commands/version.md index ae8a541..e34f5e9 100644 --- a/docs/commands/version.md +++ b/docs/commands/version.md @@ -8,11 +8,11 @@ Print the installed package version (also available via `-V/--version` on any co from click.testing import CliRunner from scrobbledb.cli import cli runner = CliRunner() -result = runner.invoke(cli, ["version", "--help"]) +result = runner.invoke(cli, ["version", "--help"], prog_name='scrobbledb') cog.out("```\n" + result.output + "```") ]]] --> ``` -Usage: cli version [OPTIONS] +Usage: scrobbledb version [OPTIONS] Display the scrobbledb version.