Backup old. Preparation for forking

This commit is contained in:
Michal Tuszowski
2026-06-16 10:52:20 +02:00
parent 92940a4d46
commit 8e5e4ce530
54 changed files with 18 additions and 76 deletions
-31
View File
@@ -1,31 +0,0 @@
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', [])