test: add draft workflow coverage and sqlite migration helpers
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/env python3
|
||||
import json
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
def main(path: str) -> None:
|
||||
payload = json.loads(Path(path).read_text(encoding='utf-8'))
|
||||
for table, rows in payload.items():
|
||||
print(f'-- {table}: {len(rows)} rows')
|
||||
for row in rows[:2]:
|
||||
print(row)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) != 2:
|
||||
print('Usage: sqlite_preview.py <export-json>')
|
||||
raise SystemExit(1)
|
||||
main(sys.argv[1])
|
||||
Reference in New Issue
Block a user