17 lines
486 B
Python
17 lines
486 B
Python
from application import Application
|
|
|
|
import sqlite3
|
|
import sys
|
|
|
|
where_clause = ' '.join(sys.argv[1:])
|
|
|
|
with sqlite3.connect("./database.db") as connection:
|
|
cursor = connection.cursor()
|
|
applications = []
|
|
|
|
cursor.execute(f"SELECT reference FROM applications {where_clause} ORDER BY dateScraped DESC, dateDecided DESC")
|
|
|
|
for (application_ref,) in cursor.fetchall():
|
|
applications.append(Application(cursor, application_ref))
|
|
|
|
Application.PrintTable(applications) |