wcbing-apt-repo/init-deb.py
wcbing 2012302cc4 refactor: github releases, arch name, multithreading
rewrite github downloader and configuration to store version tag in sqlite.
add 'all' arch, change 'x86_64' to 'amd64'.
add multithreading for downloader.
rename init_deb.py to init-deb.py
2025-02-22 21:44:10 +08:00

37 lines
610 B
Python
Executable File

#!/usr/bin/env python3
import sqlite3
# create table
conn = sqlite3.connect("data/deb.db")
conn.execute(
"""
CREATE TABLE IF NOT EXISTS amd64 (
name TEXT UNIQUE,
version TEXT,
url TEXT
);
"""
)
conn.execute(
"""
CREATE TABLE IF NOT EXISTS arm64 (
name TEXT UNIQUE,
version TEXT,
url TEXT
);
"""
)
conn.execute(
"""
CREATE TABLE IF NOT EXISTS 'all' (
name TEXT UNIQUE,
version TEXT,
url TEXT
);
"""
)
conn.commit()
conn.close()