~dricottone/fmg-timesheets

ref: f441822f16af2386abe50dc1d4b8161566843f3e fmg-timesheets/main.py -rw-r--r-- 471 bytes
f441822fDominic Ricottone Significant updates 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)