Remove hardcoded credentials; read them from the environment
- Env.py now reads SPOTIFY_CLIENT_ID/SPOTIFY_CLIENT_SECRET (and optional path overrides) from the environment instead of hardcoding them. - Add .env.example and ignore .env / .venv. - Rewrite README with setup, usage and layout (drops the leaked secret). Note: secrets are also purged from prior history in this push. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
36058c318a
commit
83f782d125
4 changed files with 121 additions and 7 deletions
14
Env.py
14
Env.py
|
|
@ -1,7 +1,13 @@
|
|||
import os
|
||||
from pathlib import Path
|
||||
|
||||
local_library_path = Path("/home/auser/Music/")
|
||||
work_dir = Path("./work_dir/new")
|
||||
# Local config. Paths can be overridden via environment variables.
|
||||
local_library_path = Path(os.environ.get("MUSIC_LIBRARY_PATH", "~/Music")).expanduser()
|
||||
work_dir = Path(os.environ.get("WORK_DIR", "./work_dir/new"))
|
||||
|
||||
client_id = '***REDACTED***'
|
||||
client_secret = "***REDACTED***"
|
||||
# Spotify app credentials. NEVER hardcode these here — set them in the
|
||||
# environment (see .env.example) so they don't end up in version control.
|
||||
# export SPOTIFY_CLIENT_ID=...
|
||||
# export SPOTIFY_CLIENT_SECRET=...
|
||||
client_id = os.environ.get("SPOTIFY_CLIENT_ID")
|
||||
client_secret = os.environ.get("SPOTIFY_CLIENT_SECRET")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue