feat: add Grimmory/Booklore push integration
- Added "Push to Library" button to issues archive - Implemented direct API upload to Grimmory/Booklore - Added support for `.env` files via `python-dotenv` - Handled 409 Conflict for duplicate files gracefully - Resolved library name to numeric ID for direct uploads - Fixed SQLAlchemy and ebooklib warnings in tests - Added comprehensive tests for push functionality Made-with: Cursor
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import os
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv()
|
||||
|
||||
BASE_DIR = os.path.abspath(os.path.dirname(__file__))
|
||||
DATA_DIR = os.path.join(BASE_DIR, "data")
|
||||
@@ -14,3 +17,9 @@ FETCH_INTERVAL_HOURS = 1
|
||||
IMAGE_MAX_LANDSCAPE = (800, 480)
|
||||
IMAGE_MAX_PORTRAIT = (480, 800)
|
||||
COVER_SIZE = (480, 800)
|
||||
|
||||
# Grimmory config (preferred) with Booklore fallbacks (deprecated)
|
||||
GRIMMORY_URL = os.environ.get("GRIMMORY_URL") or os.environ.get("BOOKLORE_URL")
|
||||
GRIMMORY_USERNAME = os.environ.get("GRIMMORY_USERNAME") or os.environ.get("BOOKLORE_USERNAME")
|
||||
GRIMMORY_PASSWORD = os.environ.get("GRIMMORY_PASSWORD") or os.environ.get("BOOKLORE_PASSWORD")
|
||||
GRIMMORY_LIBRARY_ID = os.environ.get("GRIMMORY_LIBRARY_ID") or os.environ.get("BOOKLORE_LIBRARY_ID")
|
||||
|
||||
Reference in New Issue
Block a user