Skip to main content

A small example package

Project description

downsonic

downsonic is a little command-line utility made to help download all of a user's music from an OpenSubsonic server.

downsonic is meant to fill a similar niche to rsync; it keeps it simple as a transfer utility. It's not as intelligent as rsync—no delta-transfers here—but music libraries tend not to be edited, only added to.

What sets downsonic apart from rsync for music is that, in working with the OpenSubsonic API, you have the option to transcode your music before downloading it. This can save you considerable space if you'd just like a good-enough copy of your music for the occasional offline listen.

installing

On pipx systems:

pipx install downsonic

On pip systems, for global installation:

pip install downsonic

For development and other cases: the program's more or less a single file, at src/downsonic/main.py.

usage

usage: main.py [-h] [--netrc-file NETRC_FILE] [-u USER] [-p PASSWORD] [-b BITRATE] [-F FORMAT] [-e EXTENSION] [-t THREADS] [-f] [-V] [--non-interactive]
               source destination

examples:
  main.py music.server.local ~/Music
  main.py https://music.server.me ~/Music --netrc-file ~/.another-netrc
  main.py https://music.server.me:1234 ~/Music -F mp3 -b 320

positional arguments:
  source                OpenSubsonic server to download music from; [http[s]://][host][:port], where port defaults to 80 for http, 443 for https, and 8080
                        when unspecified
  destination           destination directory

options:
  -h, --help            show this help message and exit
  --netrc-file NETRC_FILE
                        path to a netrc file with login credentials; defaults to `~/.netrc`
  -u, --user USER       username for server login; see help on `--password`
  -p, --password PASSWORD
                        password for server login ⚠️ avoid supplying your passwords through the terminal in plaintext, and instead consider using a netrc
                        file
  -b, --bitrate BITRATE
                        target bitrate for transcoded files, in kbps; unspecified or `0` set no limit
  -F, --format FORMAT   audio format; navidrome servers, for example, support `mp3`, `flac`, `aac`, and `raw` (no transcoding)
  -e, --extension EXTENSION
                        override the extension of all audio files; when unspecified, each file's extension will be inferred automatically
  -t, --threads THREADS
                        maximum number of threads (and parallel network connections) to use while downloading
  -f, --force           (re)download songs even if they're already in the destination directory
  -V, --verbosity       how much logging to show; `-v` for critical errors (🛑), `-vv` for recoverable errors (⛔️), `-vvv` for warnings (⚠️), `-vvvv` for
                        info (default), and `-vvvvv` for debug (🪲)
  --non-interactive     don't show dynamic UI elements, like progress bars

contributing

Feel free to ask questions here or at person@dandelion.computer. I'll do my best to collaborate with those who'd like to!

license

GNU General Public License v3.0 or later. See license in LICENSE.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

downsonic-0.0.1.tar.gz (18.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

downsonic-0.0.1-py3-none-any.whl (19.2 kB view details)

Uploaded Python 3

File details

Details for the file downsonic-0.0.1.tar.gz.

File metadata

  • Download URL: downsonic-0.0.1.tar.gz
  • Upload date:
  • Size: 18.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for downsonic-0.0.1.tar.gz
Algorithm Hash digest
SHA256 fc19d9e833a968a19cc7f4c4491cc50e7ab68834831064c38cfae617fb233512
MD5 02f23eff8dceede2d02b97ce764af8b0
BLAKE2b-256 25b1d299e540190d8ca653f6f5b92559766d09599260d2205117733c9544a5d6

See more details on using hashes here.

File details

Details for the file downsonic-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: downsonic-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 19.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for downsonic-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b4ec22d84e0fc765e6bad36732d6fc03e7316fdbc11a87fab542f2ccf8143a1f
MD5 37b561af2da2ab30d024409181cbcd6a
BLAKE2b-256 1d7cdd1a00052844c66e1f199f99c842ba9b473879bcbbefd89552f9545cdca2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page