From ae1033142801c1a0410d878a7f798c6aad217640 Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 9 Oct 2019 09:29:11 +0300 Subject: Initial commit --- filing.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 filing.py (limited to 'filing.py') 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("ribul") -- cgit v1.3