~dricottone/fmg-timesheets

ref: 9efdae59717e3d48470a4834470072a86f5fb706 fmg-timesheets/main.py -rw-r--r-- 471 bytes
9efdae59Dominic Ricottone Implemented time entry extraction; no assert errors! 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/env python3

import sys
import pathlib

import parse

def main(filelist):
    print(f"processing {len(filelist)} files")
    for filename in (filelist):
        parse.timesheet(filename)

if __name__ == "__main__":
    filelist = []
    for filename in sys.argv[1:]:
        filepath = pathlib.Path(filename)
        if filepath.exists():
            filelist.append(filepath)
        else:
            print(f"no such file: '{filename}'")
    main(filelist)