Initial commit

This commit is contained in:
kfj001 committed 2026-09-06 10:18:26 -07:00
commit 5f2db08b43
100 files changed
+16985

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
import sqlite3, subprocess, sys, os
os.chdir("/Users/kyle/Documents/cali_scraper")
# 1. SQLite table populated
conn = sqlite3.connect("out/via_shared_entrypoint.db")
cur = conn.cursor()
cur.execute("SELECT count(*) FROM daily_file_records")
print("sqlite rows in shared-entrypoint db:", cur.fetchone()[0])
cur.execute("SELECT bill_number, bill_id, session, item_number FROM daily_file_records WHERE item_number=32 LIMIT 1")
print("AB 28 / item 32 row:", cur.fetchone())
conn.close()
# 2. Sibling subcommands still work (no regression from my additive edits)
for args in (["list"], ["check", "--date", "2026-09-02"]):
print("\n=== python -m scraper", " ".join(args), "===")
r = subprocess.run([sys.executable, "-m", "scraper"] + args,
capture_output=True, text=True)
print("rc:", r.returncode)
print(r.stdout.strip()[:400])
if r.stderr.strip():
print("STDERR:", r.stderr.strip()[:200])
# 3. help lists all four subcommands
r = subprocess.run([sys.executable, "-m", "scraper", "--help"], capture_output=True, text=True)
print("\n=== subcommands in help ===")
for tok in ("ingest", "list", "check", "parse"):
print(f" {tok:8} present:", tok in r.stdout)