Add config.py module to read user settings from config.json (not tracked
by git). Proxy URL and request timeout are no longer hard-coded.
Configuration priority:
1. config.json 'civitai.proxy' — explicit user setting
2. HTTP_PROXY/HTTPS_PROXY environment variables — fallback
3. No proxy — if neither is set
Files added:
- config.py — configuration loader with get_proxy_url() and get_timeout()
- config.json.example — template showing available options
Files modified:
- civitai_client.py — uses config.py instead of hard-coded values;
proxy is passed explicitly to each request
- .gitignore — ignores config.json so user settings survive updates
Users in regions where Civitai is blocked can copy config.json.example
to config.json and adjust proxy settings without touching source code.
33 lines
320 B
Plaintext
33 lines
320 B
Plaintext
# Python
|
|
cache/
|
|
__pycache__/
|
|
*.pyc
|
|
*.egg-info/
|
|
.pytest_cache/
|
|
|
|
# Virtual environments
|
|
venv/
|
|
.venv/
|
|
|
|
# Logs
|
|
*.log
|
|
|
|
# Coverage
|
|
.coverage
|
|
htmlcov/
|
|
|
|
# macOS
|
|
.DS_Store
|
|
|
|
# IDE / Tools
|
|
.serena/
|
|
.claude/
|
|
|
|
# Local development docs
|
|
CLAUDE.md
|
|
DEVELOPMENT_NOTES.md
|
|
|
|
# User configuration (copy from config.json.example)
|
|
config.json
|
|
|