mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 13:34:40 +00:00
Restructure: promote working_copy to repo root
Make the stable 'working copy' bot the canonical code at the repository
root so the install/deploy scripts operate against it again.
- Move working_copy/* to root (bot entrypoint is bot.py)
- Restore root-level install/ops scripts from c4fa88e (deploy.sh,
install_main_bot.sh, status_report.*, conjurer.service, etc.)
- Fix deploy.sh: copy bot.py (was thin_client.py) and add the
conanjurer_* modules; bump command count
- Remove side-by-side variant dirs (backup_old_docker, prototype_one,
prototype_musician_one, musician_old, working_copy) and docker cruft
- Keep components as subdirs: conjurer_librarian, conjurer_musician,
spotify_dl, yt_dlp, fonts, utils, docs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
import requests
|
||||
|
||||
# Base URL for Flask service
|
||||
BASE_URL = 'http://192.168.1.15:5000'
|
||||
|
||||
|
||||
def find_matches(entries, keywords):
|
||||
"""
|
||||
Call the get_share_list endpoint.
|
||||
entries: int (1-10)
|
||||
keywords: list of strings
|
||||
Returns: list of file paths
|
||||
"""
|
||||
payload = {'entries': entries, 'keywords': keywords}
|
||||
response = requests.post(f"{BASE_URL}/get_share_list", json=payload)
|
||||
response.raise_for_status()
|
||||
data = response.json()
|
||||
return data.get('files', [])
|
||||
|
||||
|
||||
def publish(file_paths):
|
||||
"""
|
||||
Call the get_share_links endpoint.
|
||||
file_paths: list of file path strings
|
||||
Returns: list of published URLs
|
||||
"""
|
||||
payload = {'file_paths': file_paths}
|
||||
response = requests.post(f"{BASE_URL}/get_share_links", json=payload)
|
||||
response.raise_for_status()
|
||||
data = response.json()
|
||||
return data.get('links', [])
|
||||
Reference in New Issue
Block a user