mirror of
https://github.com/wcbing/wcbing-apt-repo.git
synced 2025-12-28 18:18:31 +08:00
rewrite github downloader and configuration to store version tag in sqlite. change 'version_tag' to 'releases_tag', 'stripped_version' to 'version'. add 'all' arch, change 'x86_64' to 'amd64'. add multithreading for downloader.
20 lines
363 B
Python
Executable File
20 lines
363 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import sqlite3
|
|
|
|
# create table
|
|
conn = sqlite3.connect("data/deb.db")
|
|
for arch in ["amd64", "arm64", "all"]:
|
|
conn.execute(
|
|
f"""
|
|
CREATE TABLE IF NOT EXISTS '{arch}' (
|
|
name TEXT UNIQUE,
|
|
version TEXT,
|
|
url TEXT
|
|
);
|
|
"""
|
|
)
|
|
|
|
conn.commit()
|
|
conn.close()
|