-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexecute.sh
More file actions
executable file
·108 lines (75 loc) · 3.42 KB
/
execute.sh
File metadata and controls
executable file
·108 lines (75 loc) · 3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
#!/bin/bash
# 2023 arguments
# 2023 and older requires changing the api call in get-bill-data
# Commented out at the top of the file
# sessionId=20231
# sessionOrdinal=20251
# legislatureOrdinal=69
# 2025 arguments
sessionId=2
sessionOrdinal=20251
legislatureOrdinal=69
# measure time taken for a command
measure_time() {
local start_time=$(date +%s)
echo "Running: $@"
"$@"
local end_time=$(date +%s)
local elapsed_time=$((end_time - start_time))
echo "Time taken: ${elapsed_time} seconds"
}
# get bill data json
measure_time python ./interface/get-bill-data.py $sessionId
# split into separate files for processing
measure_time python ./interface/split-bills.py $sessionId
# match votes with actions:
# get legislators
measure_time python ./interface/get-legislators.py
# get all committees
measure_time python ./interface/get-all-committees.py $sessionId
# get agencies
measure_time python ./interface/get-agencies.py $sessionId
# generate list of bills for input into other scripts
measure_time python ./interface/generate-bill-list.py $sessionId
# get legal notices
measure_time python ./interface/get-legal-review-notes.py "$sessionId" "$legislatureOrdinal" "$sessionOrdinal"
# get fiscal notices
measure_time python ./interface/get-fiscal-review-notes.py "$sessionId" "$legislatureOrdinal" "$sessionOrdinal"
# get bill text PDFs
measure_time python interface/get-bill-text-pdf.py $sessionId $legislatureOrdinal $sessionOrdinal
# get ammendments
measure_time python ./interface/get-amendments.py "$sessionId" "$legislatureOrdinal" "$sessionOrdinal"
# compress fiscal notes:
measure_time python interface/compress-pdfs.py interface/downloads/fiscal-note-pdfs-$sessionId
# compress bill text PDFs:
measure_time python interface/compress-pdfs.py interface/downloads/bill-text-pdfs-$sessionId
# compress veto-lettrs:
measure_time python interface/compress-pdfs.py interface/downloads/veto-letter-pdfs-$sessionId
### These two don't seem worth doing. Take awhile and save less than 3MB
# 1) compress legal notes:
measure_time python interface/compress-pdfs.py interface/downloads/legal-note-pdfs-$sessionId
# 2) compress amendments:
# measure_time python interface/compress-pdfs.py interface/downloads/amendment-pdfs-$sessionId
# get committee hearings data
measure_time python ./interface/get-bill-hearings.py $sessionId
# get vote data:
measure_time python ./interface/get-votes-json.py $sessionId
# executive actions data
measure_time python ./interface/get-executive-actions-json.py $sessionId
# get committees by id
measure_time python ./interface/get-committees.py $sessionId
# match some votes:
measure_time python ./interface/match-votes-actions.py $sessionId
# Process committees data
measure_time python ./process/process-committees.py $sessionId
# process bill json into format we need
measure_time python ./process/process-bills.py $sessionId
#TODO: logic for `if sessionOrdinal is <20251, use this else use get-votes-json.py`
# download PDFs - only needed for sessions prior to 2025:
# measure_time python ./interface/get-pdf-votesheets.py --sessionId "$sessionId" --legislatureOrdinal "$legislatureOrdinal" --sessionOrdinal "$sessionOrdinal"
# parse vote counts from PDFs - pre-2025 only
# measure_time python ./process/process-vote-pdfs.py $sessionId
# merge actions and votes:
# measure_time python ./process/merge-actions.py $sessionId
# parse vote jsons:
# measure_time python ./process/process-vote-json.py $sessionId