1414from googleapiclient .discovery import build
1515from googleapiclient .errors import HttpError
1616
17+ def isEmpty (val ):
18+ return val == None or val == "" or val == "0"
19+
1720def main ():
1821 year = "2025"
19- month = "01 "
22+ month = "06 "
2023 day = "1"
2124 filename = """../_data/meetings/{year}/{month}/votes.csv""" .format (year = year , month = month )
2225 votes_list = list (csv .DictReader (open (filename )));
2326
24- votes = {'procedure' : [], 'no-no' : [], 'errata' : [], '1st' : [], '2nd' : []}
27+ votes = {'procedure' : [], 'no-no' : [], 'errata' : [], 'first-and-only' : [], ' 1st' : [], '2nd' : []}
2528 for vote in iter (votes_list ):
2629 # Have an easy way to pick the types of votes to include
2730 if vote ['type' ] == "no-no" :
@@ -33,14 +36,17 @@ def main():
3336 elif vote ['type' ] == "procedure" :
3437 #continue # Comment out to vote on this
3538 pass # Comment out to skip voting
39+ elif vote ['type' ] == "first-and-only" :
40+ #continue # Comment out to vote on this
41+ pass # Comment out to skip voting
3642 elif vote ['type' ] == "1st" :
3743 #continue # Comment out to vote on this
3844 pass # Comment out to skip voting
3945 elif vote ['type' ] == "2nd" :
4046 #continue # Comment out to vote on this
4147 pass # Comment out to skip voting
4248
43- if (vote ['yes' ] == None or vote [ 'yes' ] == "0" ) and (vote ['no' ] == None or vote [ 'no' ] == "0" ) and (vote ['abstain' ] == None or vote [ 'abstain' ] == "0" ):
49+ if isEmpty (vote ['yes' ]) and isEmpty (vote ['no' ]) and isEmpty (vote ['abstain' ]):
4450 votes [vote ['type' ]].append (vote )
4551
4652 SCOPES = ["https://www.googleapis.com/auth/forms.body" , "https://www.googleapis.com/auth/gmail.send" ]
0 commit comments