2024-05-19 17:51:51 -05:00
|
|
|
import leglib #billdb import BillDB, BillQuery, QueryField, QueryAll
|
2024-05-19 17:56:26 -05:00
|
|
|
from leglib.billdb import BillDB, BillQuery, QueryField, QueryAll
|
|
|
|
from leglib.parsers import HSYIGPdfParser
|
2024-05-03 05:58:33 -05:00
|
|
|
|
2024-05-19 17:56:26 -05:00
|
|
|
parser = HSYIGPdfParser.from_filename(
|
2024-05-19 16:02:33 -05:00
|
|
|
filename="YIGVolunteerBook2024.pdf",
|
2024-05-19 17:51:51 -05:00
|
|
|
confname="HSVolunteer"
|
2024-05-19 16:02:33 -05:00
|
|
|
)
|
2024-05-03 13:49:16 -05:00
|
|
|
parser.parse()
|
2024-05-19 17:51:51 -05:00
|
|
|
|
|
|
|
print(len(parser.bills))
|
|
|
|
|
2024-05-19 17:56:26 -05:00
|
|
|
db = BillDB()
|
2024-05-19 17:51:51 -05:00
|
|
|
db.add_conference(parser=parser)
|
|
|
|
|
2024-05-19 17:56:26 -05:00
|
|
|
allbills = len(db.search(query=QueryAll))
|
2024-05-19 17:51:51 -05:00
|
|
|
|
2024-05-19 17:56:26 -05:00
|
|
|
bluelen = len(db.search(query=BillQuery(color=QueryField.Colors.Blue)))
|
|
|
|
whitelen = len(db.search(query=BillQuery(color=QueryField.Colors.White)))
|
|
|
|
redlen = len(db.search(query=BillQuery(color=QueryField.Colors.Red)))
|
2024-05-19 17:51:51 -05:00
|
|
|
|
2024-05-19 17:56:26 -05:00
|
|
|
senatelen = len(db.search(query=BillQuery(assembly=QueryField.Assemblies.Senate)))
|
|
|
|
houselen = len(db.search(query=BillQuery(assembly=QueryField.Assemblies.House)))
|
2024-05-19 17:51:51 -05:00
|
|
|
|
2024-05-19 17:56:26 -05:00
|
|
|
franklincount = len(db.search(query=BillQuery(school="Franklin")))
|
2024-05-19 17:51:51 -05:00
|
|
|
|
|
|
|
print(allbills)
|
|
|
|
print(redlen, whitelen, bluelen, redlen + whitelen + bluelen)
|
|
|
|
print(senatelen, houselen, senatelen + houselen)
|
|
|
|
print(franklincount)
|