# -*- coding: utf-8 -*- import sqlite3 def main() -> None: conn = sqlite3.connect("pb/pb_data/data.db") cur = conn.execute("select name from sqlite_master where type='table' order by name") rows = [r[0] for r in cur.fetchall()] print("table_count", len(rows)) print("first20", rows[:20]) keys = ["short", "yt_groups", "oauth", "youtube"] for key in keys: matches = [t for t in rows if key.lower() in t.lower()] if matches: print("match", key, matches[:30]) conn.close() if __name__ == "__main__": main()