~dricottone/fmg-timesheets

ref: c041ec57595dc0e315a64b892633df30acf57509 fmg-timesheets/main.py -rw-r--r-- 480 bytes
c041ec57Dominic Ricottone Initial commit 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
23
#!/usr/bin/env python3

import sys
import pathlib

import parse

def main(filelist):
    print(f"processing {len(filelist)} files")
    for filename in (filelist[4],):
        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)