Code Monkey home page Code Monkey logo

sunny's Introduction

Welcome to sunny 🌞

Version docs License: MIT

Tool to download freely available music from bandcamp.

Automatically organize files to folder, ID3 tags (including album art).

Demo

Demo

Motivation

Sunny is hugely inspired by SoundScrape, the main motivation for writing this was speed and customizability.

  • SoundScrape downloads sequentially whereas Sunny does parallelly, giving a huge boost of speed.
  • Track format can be customized.

Format

By default, files are saved in this structure in current directory if --path option is not passed.

Artist
  β”œβ”€β”€ Album
  β”‚Β Β  β”œβ”€β”€ 01 - Track.mp3
  β”‚Β Β  β”œβ”€β”€ 02 - Track.mp3
  β”‚Β Β  β”œβ”€β”€ 03 - Track.mp3
  β”‚Β Β  β”œβ”€β”€ 04 - Track.mp3

Install

cargo install sunny

Usage

# whole discography of an artist by url
sunny https://65daysofstatic.bandcamp.com/music

# whole discography just by the name of the artist
sunny 65daysofstatic

# single album
sunny https://clevergirl.bandcamp.com/album/no-drum-and-bass-in-the-jazz-room

# single track
sunny https://65daysofstatic.bandcamp.com/track/twenty-four-twelve-twenty

# specify path to download to
sunny yvetteyoung --path=~/Music

CLI options

Usage: sunny [OPTIONS] <ARTIST | URL>

Arguments:
  <ARTIST | URL>
          Artist's bandcamp username or full url

Options:
  -t, --track-format <FORMAT>
          Specify track format: default is '{num} - {track}'

          available keys:
              {num} - track number
              {track} - track
              {artist} - artist
              {album} - album

          usage:
              -t='{num} - {track} - {album} {artist}'

          expands to:
              2 - Track - Album Artist

          note that `.mp3` is appended automatically.

  -p, --path <PATH>
          Directory path where downloads should be saved to.
          By default files are saved in the current directory.

  -S, --skip-albums <ALBUMS>
          Skip downloading these albums, note that albums need to be delimited by ',' eg: -s 'one,two' or --skip-albums=one,two

  -l, --list-available
          List albums/tracks available for download

  -s, --search
          Search artist, album, label, track or all, instead of downloading

  -T, --type <TYPE>
          Specify type to search for, available only for `--search` flag

          [default: artists]
          [possible values: all, artists, labels, albums, tracks]

  -h, --help
          Print help (see a summary with '-h')

  -V, --version
          Print version

      --dry-run
          Do not do anything; just show what would happen

Note: run --help to see full descriptions of each flags/options

Contributing

Contributions, issues and feature requests are welcome!

Please have a look at TODO.md.

sunny's People

Contributors

dependabot[bot] avatar flbn avatar pombadev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

genderquery flbn

sunny's Issues

escaping file sensitive characters for track names

ok, so i can't actually tell if this is me being on a train and the wifi being terrible or if it's just these specific tracks but i did notice that the only songs that failed downloading when i was checking this tool out had / in the title. i would peruse through the code to see if you're sanitizing it or passing it in as a literal (unescaped) but like i said my network connection is so weak rn 🫠

ok so, i tried downloading this album:

and then all tracks ended up downloading fine, save for the second one, which has a /

i figured it was my connection, so i moved on and tried to download it individually -> failed, tried to download the album again, failed once more.

then, i went to download this single, which also has a / present in the title

that's when i figured it was likely a bug, even though my wifi is ass rn

Compile error on install

Hi. I'm trying to "cargo install" this package and I get this error:

error[E0432]: unresolved import `clap::Clap`
 --> /home/maeday/.cargo/registry/src/github.com-1ecc6299db9ec823/sunny-0.2.0/src/cli.rs:3:5
  |
3 | use clap::Clap;
  |     ^^^^^^^^^^ no `Clap` in the root

error: cannot determine resolution for the derive macro `Clap`
 --> /home/maeday/.cargo/registry/src/github.com-1ecc6299db9ec823/sunny-0.2.0/src/cli.rs:9:17
  |
9 | #[derive(Debug, Clap)]
  |                 ^^^^
  |
  = note: import resolution is stuck, try simplifying macro imports

error: cannot find attribute `clap` in this scope
  --> /home/maeday/.cargo/registry/src/github.com-1ecc6299db9ec823/sunny-0.2.0/src/cli.rs:10:3
   |
10 | #[clap(about, version, after_help = "note: run --help to see more details")]
   |   ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error: cannot find attribute `clap` in this scope
  --> /home/maeday/.cargo/registry/src/github.com-1ecc6299db9ec823/sunny-0.2.0/src/cli.rs:13:7
   |
13 |     #[clap(display_order = 1, parse(from_str = from_str))]
   |       ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error: cannot find attribute `clap` in this scope
  --> /home/maeday/.cargo/registry/src/github.com-1ecc6299db9ec823/sunny-0.2.0/src/cli.rs:17:7
   |
17 |     #[clap(short, long, display_order = 2, validator = validate_path, parse(from_str = expand_tilde), long_about = r"
   |       ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error: cannot find attribute `clap` in this scope
  --> /home/maeday/.cargo/registry/src/github.com-1ecc6299db9ec823/sunny-0.2.0/src/cli.rs:24:7
   |
24 |     #[clap(long)]
   |       ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error: cannot find attribute `clap` in this scope
  --> /home/maeday/.cargo/registry/src/github.com-1ecc6299db9ec823/sunny-0.2.0/src/cli.rs:28:7
   |
28 |     #[clap(
   |       ^^^^
   |
   = note: `clap` is in scope, but it is a crate, not an attribute

error[E0599]: no function or associated item named `parse` found for struct `cli::Config` in the current scope
  --> /home/maeday/.cargo/registry/src/github.com-1ecc6299db9ec823/sunny-0.2.0/src/cli.rs:55:17
   |
11 | pub struct Config {
   | ----------------- function or associated item `parse` not found for this
...
55 |         Config::parse()
   |                 ^^^^^ function or associated item not found in `cli::Config`
   |
   = help: items from traits can only be used if the trait is implemented and in scope
   = note: the following traits define an item `parse`, perhaps you need to implement one of them:
           candidate #1: `Parser`
           candidate #2: `time::private::Parsable`

Some errors have detailed explanations: E0432, E0599.

Track Formatting Not Work

Running Sunny on MacOS Ventura 13.3.1.

Specifying the track structure with the provided parameters doesn't work.

Command I ran:
sunny https://hardlinesounds.bandcamp.com/album/hard17 -t='{artist} - {track}'

The only output I got was a single file with the name "- .mp3"

image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.