diff options
| author | Jan Tuomi <jan.tuomi@eficode.com> | 2019-10-09 09:29:11 +0300 |
|---|---|---|
| committer | Jan Tuomi <jan.tuomi@eficode.com> | 2019-10-09 09:29:11 +0300 |
| commit | ae1033142801c1a0410d878a7f798c6aad217640 (patch) | |
| tree | 4228678f1b09f565c6445cb5a1ac5fc7449181ba /filing.py | |
Initial commit
Diffstat (limited to 'filing.py')
| -rw-r--r-- | filing.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/filing.py b/filing.py new file mode 100644 index 0000000..7d90507 --- /dev/null +++ b/filing.py @@ -0,0 +1,20 @@ +import os +uid = 1 + +# Placeholder Filing class + + +class Filing: + def __init__(self, cik, filing_type, count): + self.cik = cik + self.filing_type = filing_type + self.count = count + + def save(self, filings_dir): + global uid + out_dir = os.path.join(filings_dir, self.cik, "10-k") + out_filename = os.path.join(out_dir, "file_{}.out".format(uid)) + uid += 1 + os.makedirs(out_dir, exist_ok=True) + with open(out_filename, "w") as f: + f.write("<html>ribul</html>") |
