mirror of
https://github.com/wcbing/wcbing-apt-repo.git
synced 2025-12-29 02:28:30 +08:00
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
37 lines
610 B
Python
Executable File
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()
|