MCPcopy Index your code
hub / github.com/desbma/sacad

github.com/desbma/sacad @3.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release 3.0.1 ↗ · + Follow
246 symbols 529 edges 18 files 80 documented · 33%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

SACAD

Smart Automatic Cover Art Downloader

CI status crates.io version AUR version License


Since version 3.0, this tool has been completely rewritten in Rust.

The previous Python version can be found in the 2.x branch.


SACAD is a multi platform command line tool to download album covers without manual intervention, ideal for integration in scripts, audio players, etc.

SACAD also provides a second command line tool, sacad_r, to scan a music library, read metadata from audio tags, and download missing covers automatically, optionally embedding the image into audio audio files.

Features

  • Can target specific image size, and find results for high resolution covers
  • Support JPEG and PNG formats
  • Customizable output: save image along with the audio files / in a different directory named by artist/album / embed cover in audio files...
  • Currently support the following cover sources:
  • CoverArtArchive (MusicBrainz)
  • Deezer
  • Discogs
  • Last.fm
  • Itunes
  • Smart sorting algorithm to select THE best cover for a given query, using several factors: source reliability, image format, image size, image similarity with reference cover, etc.
  • Automatically crunch PNG images (can save 30% of file size without any loss of quality)
  • Cache search data locally for faster future search
  • Automatically convert/resize image if needed
  • Multi platform (Windows/Mac/Linux)

Installation

Binaries

Windows, Mac OS, and Linux binaries are available on GitHub.

From crates.io

cargo install sacad

From source

You need a Rust build environment for example from rustup.

Run in the current repository:

cargo install --path .

Command line usage

Two tools are provided: sacad to search and download one cover, and sacad_r to scan a music library and download all missing covers.

Run sacad -h / sacad_r -h to get full command line reference.

Examples

To download the cover of Master of Puppets from Metallica, to the file AlbumArt.jpg, targeting ~ 600x600 pixel resolution:

sacad "metallica" "master of puppets" 600 AlbumArt.jpg

To download covers for your library with the same parameters as previous example:

sacad_r library_directory 600 AlbumArt.jpg

License

Mozilla Public License Version 2.0

Extension points exported contracts — how you extend this code

Source (Interface)
(no doc) [5 implementers]
src/source/mod.rs
Compressor (Interface)
Compression algorithm [2 implementers]
src/http/cache.rs

Core symbols most depended-on inside this repo

make_cover
called by 44
src/cover.rs
default_relevance
called by 42
src/cover.rs
create_file
called by 14
src/walk.rs
normalize
called by 14
src/source/mod.rs
to_path_buf
called by 14
src/bin/sacad_r.rs
value_hint
called by 13
src/cover.rs
get
called by 11
src/http/cache.rs
make_search_opts
called by 10
src/cover.rs

Shape

Function 114
Method 71
Class 48
Enum 11
Interface 2

Languages

Rust100%

Modules by API surface

src/cover.rs46 symbols
src/http/cache.rs24 symbols
src/bin/sacad_r.rs23 symbols
src/source/mod.rs20 symbols
src/cl.rs17 symbols
src/source/coverartarchive.rs16 symbols
src/walk.rs15 symbols
src/http/mod.rs13 symbols
src/tags.rs11 symbols
src/source/discogs.rs11 symbols
src/source/deezer.rs10 symbols
src/source/lastfm.rs8 symbols

For agents

$ claude mcp add sacad \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact