melody-mp3 1.0.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.
Files changed (35) hide show
  1. melody_mp3-1.0.0/.github/workflows/publish.yml +27 -0
  2. melody_mp3-1.0.0/.gitignore +28 -0
  3. melody_mp3-1.0.0/LICENSE +21 -0
  4. melody_mp3-1.0.0/PKG-INFO +195 -0
  5. melody_mp3-1.0.0/README.md +164 -0
  6. melody_mp3-1.0.0/install.ps1 +67 -0
  7. melody_mp3-1.0.0/install.sh +61 -0
  8. melody_mp3-1.0.0/pyproject.toml +49 -0
  9. melody_mp3-1.0.0/src/melody/__init__.py +1 -0
  10. melody_mp3-1.0.0/src/melody/__main__.py +4 -0
  11. melody_mp3-1.0.0/src/melody/cli/__init__.py +0 -0
  12. melody_mp3-1.0.0/src/melody/cli/app.py +99 -0
  13. melody_mp3-1.0.0/src/melody/cli/commands/__init__.py +0 -0
  14. melody_mp3-1.0.0/src/melody/cli/commands/config.py +63 -0
  15. melody_mp3-1.0.0/src/melody/cli/commands/convert.py +97 -0
  16. melody_mp3-1.0.0/src/melody/cli/commands/download.py +113 -0
  17. melody_mp3-1.0.0/src/melody/cli/commands/fix.py +95 -0
  18. melody_mp3-1.0.0/src/melody/cli/commands/history.py +51 -0
  19. melody_mp3-1.0.0/src/melody/cli/commands/search.py +83 -0
  20. melody_mp3-1.0.0/src/melody/cli/interactive.py +762 -0
  21. melody_mp3-1.0.0/src/melody/core/__init__.py +0 -0
  22. melody_mp3-1.0.0/src/melody/core/converter.py +79 -0
  23. melody_mp3-1.0.0/src/melody/core/downloader.py +236 -0
  24. melody_mp3-1.0.0/src/melody/core/searcher.py +107 -0
  25. melody_mp3-1.0.0/src/melody/services/__init__.py +0 -0
  26. melody_mp3-1.0.0/src/melody/services/config_service.py +72 -0
  27. melody_mp3-1.0.0/src/melody/services/history_service.py +91 -0
  28. melody_mp3-1.0.0/src/melody/services/progress_service.py +52 -0
  29. melody_mp3-1.0.0/src/melody/utils/__init__.py +0 -0
  30. melody_mp3-1.0.0/src/melody/utils/ffmpeg.py +62 -0
  31. melody_mp3-1.0.0/src/melody/utils/validators.py +71 -0
  32. melody_mp3-1.0.0/tests/__init__.py +0 -0
  33. melody_mp3-1.0.0/tests/test_config_service.py +29 -0
  34. melody_mp3-1.0.0/tests/test_downloader.py +40 -0
  35. melody_mp3-1.0.0/tests/test_history_service.py +44 -0
@@ -0,0 +1,27 @@
1
+ name: Publish to PyPI
2
+
3
+ on:
4
+ release:
5
+ types: [published]
6
+
7
+ jobs:
8
+ build-and-publish:
9
+ runs-on: ubuntu-latest
10
+ environment: pypi
11
+ permissions:
12
+ id-token: write # OIDC — tidak perlu API token
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.12"
20
+
21
+ - name: Build package
22
+ run: |
23
+ pip install build --quiet
24
+ python -m build
25
+
26
+ - name: Publish to PyPI
27
+ uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,28 @@
1
+ __pycache__/
2
+ *.py[cod]
3
+ *.pyo
4
+ *.pyd
5
+ .Python
6
+ build/
7
+ dist/
8
+ *.egg-info/
9
+ .eggs/
10
+ .env
11
+ .venv
12
+ venv/
13
+ env/
14
+ *.egg
15
+ .pytest_cache/
16
+ .ruff_cache/
17
+ htmlcov/
18
+ .coverage
19
+ *.mp3
20
+ *.webm
21
+ *.m4a
22
+ *.wav
23
+ *.flac
24
+ *.opus
25
+ test_out/
26
+ test_mp3/
27
+ *.txt
28
+ !requirements*.txt
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 aryansyach
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,195 @@
1
+ Metadata-Version: 2.4
2
+ Name: melody-mp3
3
+ Version: 1.0.0
4
+ Summary: Fast YouTube to MP3 downloader — CLI tool for music lovers
5
+ Project-URL: Repository, https://github.com/0xAre/melody-cli
6
+ Project-URL: Issues, https://github.com/0xAre/melody-cli/issues
7
+ Author-email: aryansyach <aryansyach4@gmail.com>
8
+ License: MIT
9
+ License-File: LICENSE
10
+ Keywords: audio,cli,downloader,mp3,music,youtube
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Environment :: Console
13
+ Classifier: Intended Audience :: End Users/Desktop
14
+ Classifier: License :: OSI Approved :: MIT License
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Classifier: Topic :: Multimedia :: Sound/Audio
20
+ Requires-Python: >=3.10
21
+ Requires-Dist: platformdirs>=4.0
22
+ Requires-Dist: questionary>=2.0
23
+ Requires-Dist: rich>=13.7
24
+ Requires-Dist: tomli-w>=1.0
25
+ Requires-Dist: typer[all]>=0.12
26
+ Requires-Dist: yt-dlp>=2024.1
27
+ Provides-Extra: dev
28
+ Requires-Dist: pytest>=8.0; extra == 'dev'
29
+ Requires-Dist: ruff>=0.4; extra == 'dev'
30
+ Description-Content-Type: text/markdown
31
+
32
+ # 🎵 Melody CLI
33
+
34
+ > Fast, elegant YouTube → MP3 downloader for the terminal.
35
+ > Navigasi dengan arrow keys — tidak perlu hafal command apapun.
36
+
37
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://python.org)
38
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
39
+
40
+ ```
41
+ ╭────────────────────────────────────────────╮
42
+ │ melody v1.0.0 │
43
+ │ YouTube → MP3 • Cari, Download, Konversi│
44
+ ╰────────────────────────────────────────────╯
45
+
46
+ ? Apa yang ingin kamu lakukan?
47
+ ❯ Download lagu / playlist dari YouTube
48
+ Download dari file daftar URL (.txt)
49
+ Cari lagu di YouTube
50
+ Konversi file audio lokal ke MP3
51
+ ──────────────
52
+ Riwayat download
53
+ Pengaturan
54
+ Keluar
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Install
60
+
61
+ ### Windows (satu command)
62
+
63
+ Buka **PowerShell**, paste ini, tekan Enter:
64
+
65
+ ```powershell
66
+ irm https://raw.githubusercontent.com/0xAre/melody-cli/master/install.ps1 | iex
67
+ ```
68
+
69
+ Script akan otomatis:
70
+ - cek Python & FFmpeg
71
+ - install `pipx` jika belum ada
72
+ - install `melody` dan daftarkan ke PATH
73
+
74
+ ### Linux / macOS
75
+
76
+ ```bash
77
+ curl -sSL https://raw.githubusercontent.com/0xAre/melody-cli/master/install.sh | bash
78
+ ```
79
+
80
+ ### Via PyPI
81
+
82
+ ```bash
83
+ pip install melody-mp3
84
+ ```
85
+
86
+ ### Manual dari GitHub
87
+
88
+ ```bash
89
+ pip install git+https://github.com/0xAre/melody-cli.git
90
+ ```
91
+
92
+ ---
93
+
94
+ ## Persyaratan
95
+
96
+ | | |
97
+ |---|---|
98
+ | **Python** | 3.10 atau lebih baru |
99
+ | **FFmpeg** | wajib ada di PATH untuk konversi MP3 |
100
+
101
+ **Install FFmpeg:**
102
+
103
+ ```bash
104
+ # Windows
105
+ winget install -e --id Gyan.FFmpeg
106
+
107
+ # macOS
108
+ brew install ffmpeg
109
+
110
+ # Ubuntu / Debian
111
+ sudo apt install ffmpeg
112
+ ```
113
+
114
+ ---
115
+
116
+ ## Penggunaan
117
+
118
+ ### Mode interaktif (direkomendasikan)
119
+
120
+ ```bash
121
+ melody
122
+ ```
123
+
124
+ Jalankan saja `melody`, navigasi dengan ↑↓ arrow keys. Tidak perlu hafal flag apapun.
125
+
126
+ **Alur queue** — kumpulkan dulu, download sekaligus:
127
+ ```
128
+ Cari → pilih → Tambah ke antrian
129
+ Cari → pilih → Tambah ke antrian
130
+ ...
131
+ Download antrian (proses semua sekaligus)
132
+ ```
133
+
134
+ ### Mode CLI (untuk scripting)
135
+
136
+ ```bash
137
+ # Download lagu / playlist
138
+ melody get "https://youtu.be/..."
139
+ melody get "https://youtube.com/playlist?list=..." -o ~/Music -q 320
140
+
141
+ # Cari dan download
142
+ melody search query "bohemian rhapsody"
143
+
144
+ # Konversi file lokal
145
+ melody convert file ./dump -o ./musik
146
+
147
+ # Riwayat
148
+ melody history show
149
+
150
+ # Konfigurasi
151
+ melody config show
152
+ melody config show --set quality=320
153
+ melody config show --set output_dir=D:/Musik
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Konfigurasi
159
+
160
+ Tersimpan otomatis di `%APPDATA%\melody\config.toml` (Windows) atau `~/.config/melody/config.toml`.
161
+
162
+ | Key | Default | Keterangan |
163
+ |---|---|---|
164
+ | `output_dir` | `~/Music` | Folder default download |
165
+ | `quality` | `192` | Bitrate MP3: 128 / 192 / 256 / 320 kbps |
166
+ | `skip_history` | `true` | Skip otomatis jika sudah pernah didownload |
167
+ | `sample_rate` | `44100` | Hz — kompatibel dengan portable music player |
168
+
169
+ ---
170
+
171
+ ## Kompatibilitas Music Player
172
+
173
+ Melody menghasilkan MP3 yang kompatibel dengan hampir semua portable music player (music box, Acome, dll):
174
+
175
+ - Sample rate **44100 Hz**
176
+ - Codec **libmp3lame**
177
+ - **Stereo** (2 channel)
178
+ - ID3 metadata tertanam
179
+
180
+ ---
181
+
182
+ ## Development
183
+
184
+ ```bash
185
+ git clone https://github.com/0xAre/melody-cli
186
+ cd melody-cli
187
+ pip install -e ".[dev]"
188
+ pytest tests/ -v
189
+ ```
190
+
191
+ ---
192
+
193
+ ## License
194
+
195
+ [MIT](LICENSE) © 2025 [0xAre](https://github.com/0xAre)
@@ -0,0 +1,164 @@
1
+ # 🎵 Melody CLI
2
+
3
+ > Fast, elegant YouTube → MP3 downloader for the terminal.
4
+ > Navigasi dengan arrow keys — tidak perlu hafal command apapun.
5
+
6
+ [![Python](https://img.shields.io/badge/python-3.10%2B-blue)](https://python.org)
7
+ [![License: MIT](https://img.shields.io/badge/license-MIT-green)](LICENSE)
8
+
9
+ ```
10
+ ╭────────────────────────────────────────────╮
11
+ │ melody v1.0.0 │
12
+ │ YouTube → MP3 • Cari, Download, Konversi│
13
+ ╰────────────────────────────────────────────╯
14
+
15
+ ? Apa yang ingin kamu lakukan?
16
+ ❯ Download lagu / playlist dari YouTube
17
+ Download dari file daftar URL (.txt)
18
+ Cari lagu di YouTube
19
+ Konversi file audio lokal ke MP3
20
+ ──────────────
21
+ Riwayat download
22
+ Pengaturan
23
+ Keluar
24
+ ```
25
+
26
+ ---
27
+
28
+ ## Install
29
+
30
+ ### Windows (satu command)
31
+
32
+ Buka **PowerShell**, paste ini, tekan Enter:
33
+
34
+ ```powershell
35
+ irm https://raw.githubusercontent.com/0xAre/melody-cli/master/install.ps1 | iex
36
+ ```
37
+
38
+ Script akan otomatis:
39
+ - cek Python & FFmpeg
40
+ - install `pipx` jika belum ada
41
+ - install `melody` dan daftarkan ke PATH
42
+
43
+ ### Linux / macOS
44
+
45
+ ```bash
46
+ curl -sSL https://raw.githubusercontent.com/0xAre/melody-cli/master/install.sh | bash
47
+ ```
48
+
49
+ ### Via PyPI
50
+
51
+ ```bash
52
+ pip install melody-mp3
53
+ ```
54
+
55
+ ### Manual dari GitHub
56
+
57
+ ```bash
58
+ pip install git+https://github.com/0xAre/melody-cli.git
59
+ ```
60
+
61
+ ---
62
+
63
+ ## Persyaratan
64
+
65
+ | | |
66
+ |---|---|
67
+ | **Python** | 3.10 atau lebih baru |
68
+ | **FFmpeg** | wajib ada di PATH untuk konversi MP3 |
69
+
70
+ **Install FFmpeg:**
71
+
72
+ ```bash
73
+ # Windows
74
+ winget install -e --id Gyan.FFmpeg
75
+
76
+ # macOS
77
+ brew install ffmpeg
78
+
79
+ # Ubuntu / Debian
80
+ sudo apt install ffmpeg
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Penggunaan
86
+
87
+ ### Mode interaktif (direkomendasikan)
88
+
89
+ ```bash
90
+ melody
91
+ ```
92
+
93
+ Jalankan saja `melody`, navigasi dengan ↑↓ arrow keys. Tidak perlu hafal flag apapun.
94
+
95
+ **Alur queue** — kumpulkan dulu, download sekaligus:
96
+ ```
97
+ Cari → pilih → Tambah ke antrian
98
+ Cari → pilih → Tambah ke antrian
99
+ ...
100
+ Download antrian (proses semua sekaligus)
101
+ ```
102
+
103
+ ### Mode CLI (untuk scripting)
104
+
105
+ ```bash
106
+ # Download lagu / playlist
107
+ melody get "https://youtu.be/..."
108
+ melody get "https://youtube.com/playlist?list=..." -o ~/Music -q 320
109
+
110
+ # Cari dan download
111
+ melody search query "bohemian rhapsody"
112
+
113
+ # Konversi file lokal
114
+ melody convert file ./dump -o ./musik
115
+
116
+ # Riwayat
117
+ melody history show
118
+
119
+ # Konfigurasi
120
+ melody config show
121
+ melody config show --set quality=320
122
+ melody config show --set output_dir=D:/Musik
123
+ ```
124
+
125
+ ---
126
+
127
+ ## Konfigurasi
128
+
129
+ Tersimpan otomatis di `%APPDATA%\melody\config.toml` (Windows) atau `~/.config/melody/config.toml`.
130
+
131
+ | Key | Default | Keterangan |
132
+ |---|---|---|
133
+ | `output_dir` | `~/Music` | Folder default download |
134
+ | `quality` | `192` | Bitrate MP3: 128 / 192 / 256 / 320 kbps |
135
+ | `skip_history` | `true` | Skip otomatis jika sudah pernah didownload |
136
+ | `sample_rate` | `44100` | Hz — kompatibel dengan portable music player |
137
+
138
+ ---
139
+
140
+ ## Kompatibilitas Music Player
141
+
142
+ Melody menghasilkan MP3 yang kompatibel dengan hampir semua portable music player (music box, Acome, dll):
143
+
144
+ - Sample rate **44100 Hz**
145
+ - Codec **libmp3lame**
146
+ - **Stereo** (2 channel)
147
+ - ID3 metadata tertanam
148
+
149
+ ---
150
+
151
+ ## Development
152
+
153
+ ```bash
154
+ git clone https://github.com/0xAre/melody-cli
155
+ cd melody-cli
156
+ pip install -e ".[dev]"
157
+ pytest tests/ -v
158
+ ```
159
+
160
+ ---
161
+
162
+ ## License
163
+
164
+ [MIT](LICENSE) © 2025 [0xAre](https://github.com/0xAre)
@@ -0,0 +1,67 @@
1
+ # Melody CLI — Windows Installer
2
+ # Usage: irm https://raw.githubusercontent.com/0xAre/melody-cli/master/install.ps1 | iex
3
+
4
+ $ErrorActionPreference = "Stop"
5
+
6
+ Write-Host ""
7
+ Write-Host " melody-cli installer" -ForegroundColor Cyan
8
+ Write-Host " ─────────────────────────────────────" -ForegroundColor DarkGray
9
+ Write-Host ""
10
+
11
+ # ── 1. Cek Python ────────────────────────────────────────────────
12
+ if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
13
+ Write-Host " [!] Python tidak ditemukan." -ForegroundColor Red
14
+ Write-Host " Install dari: https://python.org/downloads" -ForegroundColor Yellow
15
+ Write-Host " Centang 'Add Python to PATH' saat install." -ForegroundColor Yellow
16
+ exit 1
17
+ }
18
+
19
+ $pyVer = python -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')"
20
+ $pyMinor = [int](python -c "import sys; print(sys.version_info.minor)")
21
+ $pyMajor = [int](python -c "import sys; print(sys.version_info.major)")
22
+
23
+ if ($pyMajor -lt 3 -or ($pyMajor -eq 3 -and $pyMinor -lt 10)) {
24
+ Write-Host " [!] Python 3.10+ dibutuhkan (kamu punya $pyVer)" -ForegroundColor Red
25
+ exit 1
26
+ }
27
+ Write-Host " [ok] Python $pyVer" -ForegroundColor Green
28
+
29
+ # ── 2. Cek FFmpeg ─────────────────────────────────────────────────
30
+ if (Get-Command ffmpeg -ErrorAction SilentlyContinue) {
31
+ Write-Host " [ok] FFmpeg sudah ada" -ForegroundColor Green
32
+ } else {
33
+ Write-Host ""
34
+ Write-Host " [!] FFmpeg belum ada — dibutuhkan untuk konversi MP3." -ForegroundColor Yellow
35
+ Write-Host " Install dengan salah satu cara:" -ForegroundColor Yellow
36
+ Write-Host " winget install -e --id Gyan.FFmpeg" -ForegroundColor Cyan
37
+ Write-Host " choco install ffmpeg" -ForegroundColor Cyan
38
+ Write-Host ""
39
+ $cont = Read-Host " Lanjut install melody tanpa FFmpeg dulu? (y/n)"
40
+ if ($cont -ne "y") { exit 0 }
41
+ }
42
+
43
+ # ── 3. Install pipx jika belum ada ───────────────────────────────
44
+ if (-not (Get-Command pipx -ErrorAction SilentlyContinue)) {
45
+ Write-Host " Installing pipx..." -ForegroundColor Cyan
46
+ pip install pipx --quiet
47
+ python -m pipx ensurepath | Out-Null
48
+ # Reload PATH sesi ini
49
+ $userPath = [System.Environment]::GetEnvironmentVariable("PATH", "User")
50
+ $machinePath = [System.Environment]::GetEnvironmentVariable("PATH", "Machine")
51
+ $env:PATH = "$userPath;$machinePath"
52
+ }
53
+ Write-Host " [ok] pipx" -ForegroundColor Green
54
+
55
+ # ── 4. Install melody ─────────────────────────────────────────────
56
+ Write-Host " Installing melody-cli..." -ForegroundColor Cyan
57
+ pipx install git+https://github.com/0xAre/melody-cli.git --force
58
+ # Catatan: package PyPI tersedia sebagai: pip install melody-mp3
59
+
60
+ Write-Host ""
61
+ Write-Host " ─────────────────────────────────────" -ForegroundColor DarkGray
62
+ Write-Host " Selesai! Jalankan: melody" -ForegroundColor Cyan
63
+ Write-Host ""
64
+ Write-Host " Jika command 'melody' tidak ditemukan," -ForegroundColor DarkGray
65
+ Write-Host " restart terminal atau jalankan:" -ForegroundColor DarkGray
66
+ Write-Host " python -m pipx ensurepath" -ForegroundColor DarkGray
67
+ Write-Host ""
@@ -0,0 +1,61 @@
1
+ #!/usr/bin/env bash
2
+ # Melody CLI — Linux/macOS Installer
3
+ # Usage: curl -sSL https://raw.githubusercontent.com/0xAre/melody-cli/master/install.sh | bash
4
+
5
+ set -e
6
+
7
+ GREEN='\033[0;32m' CYAN='\033[0;36m' YELLOW='\033[1;33m' RED='\033[0;31m' NC='\033[0m'
8
+
9
+ echo ""
10
+ echo -e " ${CYAN}melody-cli installer${NC}"
11
+ echo " ─────────────────────────────────────"
12
+ echo ""
13
+
14
+ # ── 1. Cek Python ────────────────────────────────────────────────
15
+ if ! command -v python3 &>/dev/null; then
16
+ echo -e " ${RED}[!] Python 3 tidak ditemukan.${NC}"
17
+ echo " macOS: brew install python"
18
+ echo " Ubuntu: sudo apt install python3 python3-pip"
19
+ exit 1
20
+ fi
21
+
22
+ PY_VER=$(python3 -c "import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')")
23
+ PY_MINOR=$(python3 -c "import sys; print(sys.version_info.minor)")
24
+ PY_MAJOR=$(python3 -c "import sys; print(sys.version_info.major)")
25
+
26
+ if [ "$PY_MAJOR" -lt 3 ] || { [ "$PY_MAJOR" -eq 3 ] && [ "$PY_MINOR" -lt 10 ]; }; then
27
+ echo -e " ${RED}[!] Python 3.10+ dibutuhkan (kamu punya $PY_VER)${NC}"
28
+ exit 1
29
+ fi
30
+ echo -e " ${GREEN}[ok] Python $PY_VER${NC}"
31
+
32
+ # ── 2. Cek FFmpeg ─────────────────────────────────────────────────
33
+ if command -v ffmpeg &>/dev/null; then
34
+ echo -e " ${GREEN}[ok] FFmpeg sudah ada${NC}"
35
+ else
36
+ echo -e " ${YELLOW}[!] FFmpeg belum ada.${NC}"
37
+ echo " macOS: brew install ffmpeg"
38
+ echo " Ubuntu: sudo apt install ffmpeg"
39
+ echo ""
40
+ fi
41
+
42
+ # ── 3. Install pipx jika belum ada ───────────────────────────────
43
+ if ! command -v pipx &>/dev/null; then
44
+ echo -e " ${CYAN}Installing pipx...${NC}"
45
+ python3 -m pip install --user pipx --quiet
46
+ python3 -m pipx ensurepath
47
+ fi
48
+ echo -e " ${GREEN}[ok] pipx${NC}"
49
+
50
+ # ── 4. Install melody ─────────────────────────────────────────────
51
+ echo -e " ${CYAN}Installing melody-cli...${NC}"
52
+ pipx install git+https://github.com/0xAre/melody-cli.git --force
53
+
54
+ echo ""
55
+ echo " ─────────────────────────────────────"
56
+ echo -e " ${GREEN}Selesai! Jalankan: melody${NC}"
57
+ echo ""
58
+ echo " Jika 'melody' tidak ditemukan, jalankan:"
59
+ echo " python3 -m pipx ensurepath"
60
+ echo " lalu restart terminal."
61
+ echo ""
@@ -0,0 +1,49 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
6
+ name = "melody-mp3"
7
+ version = "1.0.0"
8
+ description = "Fast YouTube to MP3 downloader — CLI tool for music lovers"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "aryansyach", email = "aryansyach4@gmail.com" }]
13
+ keywords = ["youtube", "mp3", "downloader", "cli", "music", "audio"]
14
+ classifiers = [
15
+ "Development Status :: 4 - Beta",
16
+ "Environment :: Console",
17
+ "Intended Audience :: End Users/Desktop",
18
+ "License :: OSI Approved :: MIT License",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3.10",
21
+ "Programming Language :: Python :: 3.11",
22
+ "Programming Language :: Python :: 3.12",
23
+ "Topic :: Multimedia :: Sound/Audio",
24
+ ]
25
+ dependencies = [
26
+ "typer[all]>=0.12",
27
+ "rich>=13.7",
28
+ "yt-dlp>=2024.1",
29
+ "platformdirs>=4.0",
30
+ "tomli-w>=1.0",
31
+ "questionary>=2.0",
32
+ ]
33
+
34
+ [project.optional-dependencies]
35
+ dev = ["pytest>=8.0", "ruff>=0.4"]
36
+
37
+ [project.scripts]
38
+ melody = "melody.cli.app:main"
39
+
40
+ [project.urls]
41
+ Repository = "https://github.com/0xAre/melody-cli"
42
+ Issues = "https://github.com/0xAre/melody-cli/issues"
43
+
44
+ [tool.hatch.build.targets.wheel]
45
+ packages = ["src/melody"]
46
+
47
+ [tool.ruff]
48
+ line-length = 100
49
+ target-version = "py310"
@@ -0,0 +1 @@
1
+ __version__ = "1.0.0"
@@ -0,0 +1,4 @@
1
+ from melody.cli.app import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
File without changes