| 1 | import sys |
| 2 | |
| 3 | from lib.rows import parse_row |
| 4 | from lib.tally import tally |
| 5 | |
| 6 | |
| 7 | def main(path): |
| 8 | with open(path) as f: |
| 9 | rows = [parse_row(line) for line in f if line.strip()] |
| 10 | return tally(rows) |
| 11 | |
| 12 | |
| 13 | if __name__ == "__main__": |
| 14 | print(main(sys.argv[1])) |
| 15 |