diff options
author | Suleyman Farajli <suleyman@farajli.net> | 2025-05-02 18:02:29 +0400 |
---|---|---|
committer | Suleyman Farajli <suleyman@farajli.net> | 2025-05-02 18:02:29 +0400 |
commit | 77e0259ebc8f41e3d09a1d189eb805a81d82a5f9 (patch) | |
tree | f0cda65a2178cc7ed69542fdcb3b51ce0e0f205b /README.md | |
parent | 5ee153207f49dcd225bddfb07644aa9fa279b2a2 (diff) |
Download songs from the command line
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 47 |
1 files changed, 27 insertions, 20 deletions
@@ -1,6 +1,5 @@ # Pamus -This script allows you to download audio files from YouTube Music based on a list of song names, -and it also tags the downloaded files with relevant metadata (such as title, artist, album, genre). +This script allows you to download audio files from YouTube Music based on a list of song names, and it also tags the downloaded files with relevant metadata (such as title, artist, album, genre). ## Dependencies: - [Python 3](https://www.python.org) @@ -8,35 +7,43 @@ and it also tags the downloaded files with relevant metadata (such as title, art - [mutagen](https://mutagen.readthedocs.io/en/latest/) - [ytmusicapi](https://ytmusicapi.readthedocs.io/en/stable/) -## Script Overview -1. **Reads a list of song names** from a specified input file (by default $HOME/.config/pamus/list.txt). -2. **Searches for each song on YouTube Music** using the YTMusic API. -3. **Downloads the audio** in the specified format (mp3, flac, etc.) to specified directory (by default $HOME/music). -4. **Tags the audio files** with metadata (title, artist, album, genre). -5. Supports downloading multiple songs concurrently using threads. - ## Help -For help run: +For help, run: ```Bash pamus -h -``` ## Install Simply run: ``` Bash make ``` -### Examples +## Usage Examples -``` Bash -pamus -``` -This will download the songs listed in `$HOME/.config/pamus/list.txt` to the `$HOME/music` directory in mp3 format. +1. Using Input File: + To download songs listed in the input file (`$HOME/.config/pamus/list.txt`) to the default output directory (`$HOME/music`) in mp3 format: + ```bash + pamus + ``` -```bash -pamus -o /path/to/save/music -i /path/to/song_list.txt -f mp3 -v -``` -This will download the songs listed in `song_list.txt` to the specified output directory in MP3 format with verbose output enabled. +2. Specifying Songs Directly: + To download songs provided directly on the command line: + ```bash + pamus -s "Song Name 1" "Song Name 2" "Song Name 3" + ``` + This will download the specified songs to the default directory (`$HOME/music`) in the default format (`mp3`). + +3. Combining Both Methods: + To download both songs from the input file and songs provided directly on the command line: + ```bash + pamus -s "Song Name 1" "Song Name 2" -i /path/to/song_list.txt + ``` + This will download the songs listed in `song_list.txt` as well as the songs provided directly via the command line. + +4. With Additional Options: + To download songs from a specific list, save them to a custom directory, use a specific audio format, and enable verbose output: + ```bash + pamus -o /path/to/save/music -i /path/to/song_list.txt -f opus -v + ``` ### Example list.txt file (supports comments) ```txt |