votify 1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- votify-1.0/.github/workflows/main.yml +38 -0
- votify-1.0/.gitignore +7 -0
- votify-1.0/PKG-INFO +141 -0
- votify-1.0/README.md +126 -0
- votify-1.0/pyproject.toml +25 -0
- votify-1.0/requirements.txt +6 -0
- votify-1.0/votify/__init__.py +1 -0
- votify-1.0/votify/__main__.py +3 -0
- votify-1.0/votify/cli.py +516 -0
- votify-1.0/votify/constants.py +41 -0
- votify-1.0/votify/downloader.py +463 -0
- votify-1.0/votify/downloader_episode.py +47 -0
- votify-1.0/votify/downloader_song.py +126 -0
- votify-1.0/votify/enums.py +12 -0
- votify-1.0/votify/models.py +32 -0
- votify-1.0/votify/playplay_pb2.py +33 -0
- votify-1.0/votify/playplay_pb2.pyi +46 -0
- votify-1.0/votify/spotify_api.py +251 -0
- votify-1.0/votify/utils.py +16 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: publish
|
|
2
|
+
|
|
3
|
+
# Controls when the workflow will run
|
|
4
|
+
on:
|
|
5
|
+
|
|
6
|
+
# Workflow will run when a release has been published for the package
|
|
7
|
+
release:
|
|
8
|
+
types:
|
|
9
|
+
- published
|
|
10
|
+
|
|
11
|
+
# Allows you to run this workflow manually from the Actions tab
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
|
15
|
+
jobs:
|
|
16
|
+
|
|
17
|
+
# This workflow contains a single job called "publish"
|
|
18
|
+
publish:
|
|
19
|
+
|
|
20
|
+
# The type of runner that the job will run on
|
|
21
|
+
runs-on: ubuntu-latest
|
|
22
|
+
|
|
23
|
+
# Steps represent a sequence of tasks that will be executed as part of the job
|
|
24
|
+
steps:
|
|
25
|
+
|
|
26
|
+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
|
27
|
+
- uses: actions/checkout@v3
|
|
28
|
+
|
|
29
|
+
- name: Set up Python 3.8
|
|
30
|
+
uses: actions/setup-python@v3
|
|
31
|
+
with:
|
|
32
|
+
python-version: 3.8
|
|
33
|
+
cache: pip
|
|
34
|
+
|
|
35
|
+
- name: To PyPI using Flit
|
|
36
|
+
uses: AsifArmanRahman/to-pypi-using-flit@v1
|
|
37
|
+
with:
|
|
38
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
votify-1.0/.gitignore
ADDED
votify-1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: votify
|
|
3
|
+
Version: 1.0
|
|
4
|
+
Summary: A Python CLI app for downloading songs/podcasts from Spotify in Vorbis (OGG).
|
|
5
|
+
Author: glomatico
|
|
6
|
+
Requires-Python: >=3.8
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
Requires-Dist: click
|
|
9
|
+
Requires-Dist: pillow
|
|
10
|
+
Requires-Dist: protobuf
|
|
11
|
+
Requires-Dist: pybase62
|
|
12
|
+
Requires-Dist: pycryptodome
|
|
13
|
+
Requires-Dist: yt-dlp
|
|
14
|
+
Project-URL: repository, https://github.com/glomatico/votify
|
|
15
|
+
|
|
16
|
+
# Votify
|
|
17
|
+
A Python CLI app for downloading songs/podcasts from Spotify in Vorbis (OGG).
|
|
18
|
+
|
|
19
|
+
## Features
|
|
20
|
+
* Download songs and podcasts in Vorbis 96/128kbps or in 320kbps with a premium account
|
|
21
|
+
* Download synced lyrics
|
|
22
|
+
* Highly configurable
|
|
23
|
+
|
|
24
|
+
## Prerequisites
|
|
25
|
+
* Python 3.8 or higher
|
|
26
|
+
* The cookies file of your Spotify browser session in Netscape format (free or premium)
|
|
27
|
+
* You can get your cookies by using one of the following extensions on your browser of choice at the Spotify website with your account signed in:
|
|
28
|
+
* Firefox: https://addons.mozilla.org/addon/export-cookies-txt
|
|
29
|
+
* Chromium based browsers: https://chrome.google.com/webstore/detail/gdocmgbfkjnnpapoeobnolbbkoibbcif
|
|
30
|
+
* Unplayplay
|
|
31
|
+
* Build it from source: https://git.gay/glomatico/unplayplay.
|
|
32
|
+
|
|
33
|
+
## Installation
|
|
34
|
+
1. Install the package `votify` using pip
|
|
35
|
+
```bash
|
|
36
|
+
pip install votify
|
|
37
|
+
```
|
|
38
|
+
2. Set up the `cookies.txt`.
|
|
39
|
+
* You can either move to the current directory from which you will be running Votify or specify its path using the command line arguments/config file.
|
|
40
|
+
3. Set up Unplayplay
|
|
41
|
+
* You can either add it to your PATH or specify its path using the command line arguments/config file.
|
|
42
|
+
|
|
43
|
+
## Usage
|
|
44
|
+
```bash
|
|
45
|
+
votify [OPTIONS] URLS...
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
### Examples
|
|
49
|
+
* Download a song
|
|
50
|
+
```bash
|
|
51
|
+
votify "https://open.spotify.com/track/18gqCQzqYb0zvurQPlRkpo"
|
|
52
|
+
```
|
|
53
|
+
* Download an album
|
|
54
|
+
```bash
|
|
55
|
+
votify "https://open.spotify.com/album/0r8D5N674HbTXlR3zNxeU1"
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Configuration
|
|
59
|
+
Votify can be configured using the command line arguments or the config file.
|
|
60
|
+
|
|
61
|
+
The config file is created automatically when you run Votify for the first time at `~/.votify/config.json` on Linux and `%USERPROFILE%\.votify\config.json` on Windows.
|
|
62
|
+
|
|
63
|
+
Config file values can be overridden using command line arguments.
|
|
64
|
+
|
|
65
|
+
| Command line argument / Config file key | Description | Default value |
|
|
66
|
+
| --------------------------------------------------------------- | ------------------------------------------------------------------ | ---------------------------------------------- |
|
|
67
|
+
| `--wait-interval`, `-w` / `wait_interval` | Wait interval between downloads in seconds. | `10` |
|
|
68
|
+
| `--force-premium`, `-f` / `force_premium` | Force to detect the account as premium. | `false` |
|
|
69
|
+
| `--save-cover`, `-s` / `save_cover` | Save cover as a separate file. | `false` |
|
|
70
|
+
| `--overwrite` / `overwrite` | Overwrite existing files. | `false` |
|
|
71
|
+
| `--read-urls-as-txt`, `-r` / - | Interpret URLs as paths to text files containing URLs. | `false` |
|
|
72
|
+
| `--save-playlist` / `save_playlist` | Save a M3U8 playlist file when downloading a playlist. | `false` |
|
|
73
|
+
| `--lrc-only`, `-l` / `lrc_only` | Download only the synced lyrics. | `false` |
|
|
74
|
+
| `--no-lrc` / `no_lrc` | Don't download the synced lyrics. | `false` |
|
|
75
|
+
| `--config-path` / - | Path to config file. | `<home>/.votify/config.json` |
|
|
76
|
+
| `--log-level` / `log_level` | Log level. | `INFO` |
|
|
77
|
+
| `--print-exceptions` / `print_exceptions` | Print exceptions. | `false` |
|
|
78
|
+
| `--cookies-path` / `cookies_path` | Path to cookies file. | `./cookies.txt` |
|
|
79
|
+
| `--quality`, `-q` / `quality` | Audio quality. | `medium` |
|
|
80
|
+
| `--output-path`, `-o` / `output_path` | Path to output directory. | `./Spotify` |
|
|
81
|
+
| `--temp-path` / `temp_path` | Path to temporary directory. | `./temp` |
|
|
82
|
+
| `--download-mode`, `-d` / `download_mode` | Download mode. | `ytdlp` |
|
|
83
|
+
| `--aria2c-path` / `aria2c_path` | Path to aria2c binary. | `aria2c` |
|
|
84
|
+
| `--unplayplay-path` / `unplayplay_path` | Path to unplayplay binary. | `unplayplay` |
|
|
85
|
+
| `--template-folder-album` / `template_folder_album` | Template folder for tracks that are part of an album. | `{album_artist}/{album}` |
|
|
86
|
+
| `--template-folder-compilation` / `template_folder_compilation` | Template folder for tracks that are part of a compilation album. | `Compilations/{album}` |
|
|
87
|
+
| `--template-file-single-disc` / `template_file_single_disc` | Template file for the tracks that are part of a single-disc album. | `{track:02d} {title}` |
|
|
88
|
+
| `--template-file-multi-disc` / `template_file_multi_disc` | Template file for the tracks that are part of a multi-disc album. | `{disc}-{track:02d} {title}` |
|
|
89
|
+
| `--template-folder-episode` / `template_folder_episode` | Template folder for episodes (podcasts). | `Podcasts/{album}` |
|
|
90
|
+
| `--template-file-episode` / `template_file_episode` | Template file for episodes (podcasts). | `{track:02d} {title}` |
|
|
91
|
+
| `--template-file-playlist` / `template_file_playlist` | Template file for the M3U8 playlist. | `Playlists/{playlist_artist}/{playlist_title}` |
|
|
92
|
+
| `--date-tag-template` / `date_tag_template` | Date tag template. | `%Y-%m-%dT%H:%M:%SZ` |
|
|
93
|
+
| `--exclude-tags` / `exclude_tags` | Comma-separated tags to exclude. | `null` |
|
|
94
|
+
| `--truncate` / `truncate` | Maximum length of the file/folder names. | `null` |
|
|
95
|
+
| `--no-config-file`, `-n` / - | Do not use a config file. | `false` |
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Tag variables
|
|
99
|
+
The following variables can be used in the template folder/file and/or in the `exclude_tags` list:
|
|
100
|
+
- `album`
|
|
101
|
+
- `album_artist`
|
|
102
|
+
- `artist`
|
|
103
|
+
- `compilation`
|
|
104
|
+
- `composer`
|
|
105
|
+
- `copyright`
|
|
106
|
+
- `cover`
|
|
107
|
+
- `disc`
|
|
108
|
+
- `disc_total`
|
|
109
|
+
- `isrc`
|
|
110
|
+
- `label`
|
|
111
|
+
- `lyrics`
|
|
112
|
+
- `playlist_artist`
|
|
113
|
+
- `playlist_title`
|
|
114
|
+
- `playlist_track`
|
|
115
|
+
- `producer`
|
|
116
|
+
- `rating`
|
|
117
|
+
- `release_date`
|
|
118
|
+
- `release_year`
|
|
119
|
+
- `title`
|
|
120
|
+
- `track`
|
|
121
|
+
- `track_total`
|
|
122
|
+
- `url`
|
|
123
|
+
|
|
124
|
+
### Download qualities
|
|
125
|
+
The following qualities are available:
|
|
126
|
+
* `high` (320kbps, requires premium account)
|
|
127
|
+
* `medium` (160kbps)
|
|
128
|
+
* `low` (96kbps)
|
|
129
|
+
|
|
130
|
+
### Download modes
|
|
131
|
+
The following modes are available:
|
|
132
|
+
* `ytdlp`
|
|
133
|
+
* `aria2c`
|
|
134
|
+
* Faster than `ytdlp`
|
|
135
|
+
* Can be obtained from here: https://github.com/aria2/aria2/releases
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
## Credits
|
|
139
|
+
* [spotify-oggmp4-dl](https://github.com/DevLARLEY/spotify-oggmp4-dl)
|
|
140
|
+
* [spsync](https://github.com/baltitenger/spsync)
|
|
141
|
+
* [unplayplay](https://git.gay/uhwot/unplayplay)
|
votify-1.0/README.md
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
# Votify
|
|
2
|
+
A Python CLI app for downloading songs/podcasts from Spotify in Vorbis (OGG).
|
|
3
|
+
|
|
4
|
+
## Features
|
|
5
|
+
* Download songs and podcasts in Vorbis 96/128kbps or in 320kbps with a premium account
|
|
6
|
+
* Download synced lyrics
|
|
7
|
+
* Highly configurable
|
|
8
|
+
|
|
9
|
+
## Prerequisites
|
|
10
|
+
* Python 3.8 or higher
|
|
11
|
+
* The cookies file of your Spotify browser session in Netscape format (free or premium)
|
|
12
|
+
* You can get your cookies by using one of the following extensions on your browser of choice at the Spotify website with your account signed in:
|
|
13
|
+
* Firefox: https://addons.mozilla.org/addon/export-cookies-txt
|
|
14
|
+
* Chromium based browsers: https://chrome.google.com/webstore/detail/gdocmgbfkjnnpapoeobnolbbkoibbcif
|
|
15
|
+
* Unplayplay
|
|
16
|
+
* Build it from source: https://git.gay/glomatico/unplayplay.
|
|
17
|
+
|
|
18
|
+
## Installation
|
|
19
|
+
1. Install the package `votify` using pip
|
|
20
|
+
```bash
|
|
21
|
+
pip install votify
|
|
22
|
+
```
|
|
23
|
+
2. Set up the `cookies.txt`.
|
|
24
|
+
* You can either move to the current directory from which you will be running Votify or specify its path using the command line arguments/config file.
|
|
25
|
+
3. Set up Unplayplay
|
|
26
|
+
* You can either add it to your PATH or specify its path using the command line arguments/config file.
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
```bash
|
|
30
|
+
votify [OPTIONS] URLS...
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### Examples
|
|
34
|
+
* Download a song
|
|
35
|
+
```bash
|
|
36
|
+
votify "https://open.spotify.com/track/18gqCQzqYb0zvurQPlRkpo"
|
|
37
|
+
```
|
|
38
|
+
* Download an album
|
|
39
|
+
```bash
|
|
40
|
+
votify "https://open.spotify.com/album/0r8D5N674HbTXlR3zNxeU1"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Configuration
|
|
44
|
+
Votify can be configured using the command line arguments or the config file.
|
|
45
|
+
|
|
46
|
+
The config file is created automatically when you run Votify for the first time at `~/.votify/config.json` on Linux and `%USERPROFILE%\.votify\config.json` on Windows.
|
|
47
|
+
|
|
48
|
+
Config file values can be overridden using command line arguments.
|
|
49
|
+
|
|
50
|
+
| Command line argument / Config file key | Description | Default value |
|
|
51
|
+
| --------------------------------------------------------------- | ------------------------------------------------------------------ | ---------------------------------------------- |
|
|
52
|
+
| `--wait-interval`, `-w` / `wait_interval` | Wait interval between downloads in seconds. | `10` |
|
|
53
|
+
| `--force-premium`, `-f` / `force_premium` | Force to detect the account as premium. | `false` |
|
|
54
|
+
| `--save-cover`, `-s` / `save_cover` | Save cover as a separate file. | `false` |
|
|
55
|
+
| `--overwrite` / `overwrite` | Overwrite existing files. | `false` |
|
|
56
|
+
| `--read-urls-as-txt`, `-r` / - | Interpret URLs as paths to text files containing URLs. | `false` |
|
|
57
|
+
| `--save-playlist` / `save_playlist` | Save a M3U8 playlist file when downloading a playlist. | `false` |
|
|
58
|
+
| `--lrc-only`, `-l` / `lrc_only` | Download only the synced lyrics. | `false` |
|
|
59
|
+
| `--no-lrc` / `no_lrc` | Don't download the synced lyrics. | `false` |
|
|
60
|
+
| `--config-path` / - | Path to config file. | `<home>/.votify/config.json` |
|
|
61
|
+
| `--log-level` / `log_level` | Log level. | `INFO` |
|
|
62
|
+
| `--print-exceptions` / `print_exceptions` | Print exceptions. | `false` |
|
|
63
|
+
| `--cookies-path` / `cookies_path` | Path to cookies file. | `./cookies.txt` |
|
|
64
|
+
| `--quality`, `-q` / `quality` | Audio quality. | `medium` |
|
|
65
|
+
| `--output-path`, `-o` / `output_path` | Path to output directory. | `./Spotify` |
|
|
66
|
+
| `--temp-path` / `temp_path` | Path to temporary directory. | `./temp` |
|
|
67
|
+
| `--download-mode`, `-d` / `download_mode` | Download mode. | `ytdlp` |
|
|
68
|
+
| `--aria2c-path` / `aria2c_path` | Path to aria2c binary. | `aria2c` |
|
|
69
|
+
| `--unplayplay-path` / `unplayplay_path` | Path to unplayplay binary. | `unplayplay` |
|
|
70
|
+
| `--template-folder-album` / `template_folder_album` | Template folder for tracks that are part of an album. | `{album_artist}/{album}` |
|
|
71
|
+
| `--template-folder-compilation` / `template_folder_compilation` | Template folder for tracks that are part of a compilation album. | `Compilations/{album}` |
|
|
72
|
+
| `--template-file-single-disc` / `template_file_single_disc` | Template file for the tracks that are part of a single-disc album. | `{track:02d} {title}` |
|
|
73
|
+
| `--template-file-multi-disc` / `template_file_multi_disc` | Template file for the tracks that are part of a multi-disc album. | `{disc}-{track:02d} {title}` |
|
|
74
|
+
| `--template-folder-episode` / `template_folder_episode` | Template folder for episodes (podcasts). | `Podcasts/{album}` |
|
|
75
|
+
| `--template-file-episode` / `template_file_episode` | Template file for episodes (podcasts). | `{track:02d} {title}` |
|
|
76
|
+
| `--template-file-playlist` / `template_file_playlist` | Template file for the M3U8 playlist. | `Playlists/{playlist_artist}/{playlist_title}` |
|
|
77
|
+
| `--date-tag-template` / `date_tag_template` | Date tag template. | `%Y-%m-%dT%H:%M:%SZ` |
|
|
78
|
+
| `--exclude-tags` / `exclude_tags` | Comma-separated tags to exclude. | `null` |
|
|
79
|
+
| `--truncate` / `truncate` | Maximum length of the file/folder names. | `null` |
|
|
80
|
+
| `--no-config-file`, `-n` / - | Do not use a config file. | `false` |
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
### Tag variables
|
|
84
|
+
The following variables can be used in the template folder/file and/or in the `exclude_tags` list:
|
|
85
|
+
- `album`
|
|
86
|
+
- `album_artist`
|
|
87
|
+
- `artist`
|
|
88
|
+
- `compilation`
|
|
89
|
+
- `composer`
|
|
90
|
+
- `copyright`
|
|
91
|
+
- `cover`
|
|
92
|
+
- `disc`
|
|
93
|
+
- `disc_total`
|
|
94
|
+
- `isrc`
|
|
95
|
+
- `label`
|
|
96
|
+
- `lyrics`
|
|
97
|
+
- `playlist_artist`
|
|
98
|
+
- `playlist_title`
|
|
99
|
+
- `playlist_track`
|
|
100
|
+
- `producer`
|
|
101
|
+
- `rating`
|
|
102
|
+
- `release_date`
|
|
103
|
+
- `release_year`
|
|
104
|
+
- `title`
|
|
105
|
+
- `track`
|
|
106
|
+
- `track_total`
|
|
107
|
+
- `url`
|
|
108
|
+
|
|
109
|
+
### Download qualities
|
|
110
|
+
The following qualities are available:
|
|
111
|
+
* `high` (320kbps, requires premium account)
|
|
112
|
+
* `medium` (160kbps)
|
|
113
|
+
* `low` (96kbps)
|
|
114
|
+
|
|
115
|
+
### Download modes
|
|
116
|
+
The following modes are available:
|
|
117
|
+
* `ytdlp`
|
|
118
|
+
* `aria2c`
|
|
119
|
+
* Faster than `ytdlp`
|
|
120
|
+
* Can be obtained from here: https://github.com/aria2/aria2/releases
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
## Credits
|
|
124
|
+
* [spotify-oggmp4-dl](https://github.com/DevLARLEY/spotify-oggmp4-dl)
|
|
125
|
+
* [spsync](https://github.com/baltitenger/spsync)
|
|
126
|
+
* [unplayplay](https://git.gay/uhwot/unplayplay)
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "votify"
|
|
3
|
+
description = "A Python CLI app for downloading songs/podcasts from Spotify in Vorbis (OGG)."
|
|
4
|
+
requires-python = ">=3.8"
|
|
5
|
+
authors = [{ name = "glomatico" }]
|
|
6
|
+
dependencies = [
|
|
7
|
+
"click",
|
|
8
|
+
"pillow",
|
|
9
|
+
"protobuf",
|
|
10
|
+
"pybase62",
|
|
11
|
+
"pycryptodome",
|
|
12
|
+
"yt-dlp",
|
|
13
|
+
]
|
|
14
|
+
readme = "README.md"
|
|
15
|
+
dynamic = ["version"]
|
|
16
|
+
|
|
17
|
+
[project.urls]
|
|
18
|
+
repository = "https://github.com/glomatico/votify"
|
|
19
|
+
|
|
20
|
+
[build-system]
|
|
21
|
+
requires = ["flit_core"]
|
|
22
|
+
build-backend = "flit_core.buildapi"
|
|
23
|
+
|
|
24
|
+
[project.scripts]
|
|
25
|
+
spotify-web-downloader = "votify.cli:main"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0"
|