From 122499b7451091593764a557075273e829979ae1 Mon Sep 17 00:00:00 2001 From: Stefan Sullivan Date: Fri, 10 May 2024 16:51:49 -0700 Subject: [PATCH 1/3] Update and rename run.py to edgar/__main__.py allow you to run python -m edgar ... --- run.py => edgar/__main__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) rename run.py => edgar/__main__.py (95%) diff --git a/run.py b/edgar/__main__.py similarity index 95% rename from run.py rename to edgar/__main__.py index 5436b18..752398e 100644 --- a/run.py +++ b/edgar/__main__.py @@ -5,7 +5,7 @@ from argparse import ArgumentParser import logging -import edgar +from edgar.main import download_index logger = logging.getLogger() logger.setLevel(logging.DEBUG) @@ -69,5 +69,5 @@ logger.debug("downloads will be saved to %s" % args.directory) - edgar.download_index(args.directory, args.year, args.ua, args.skip) + download_index(args.directory, args.year, args.ua, args.skip) logger.info("Files downloaded in %s" % args.directory) From ce06b5e4c26ea969e6f2261290b63f9390556282 Mon Sep 17 00:00:00 2001 From: Stefan Sullivan Date: Fri, 10 May 2024 16:53:48 -0700 Subject: [PATCH 2/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f72a6e7..b703ed9 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ Output - Open your terminal inside that directory and run `python run.py -h`. You can specify a destination directory for downloaded index files like `-d edgar-idx` (defaults to a temporary directory) and/or specify the year from which you want to build the index with `-y 2017` (defaults to current year). ```shell - $ python run.py -y 2017 -ua "MyCompany edward@mycompany.com" + $ python -m edgar -y 2017 -ua "MyCompany edward@mycompany.com" 2018-06-23 12:41:46,451 - DEBUG - downloads will be saved to /var/folders/bv/2zbdkyyj14766dcw07x6zrrr0000gn/T/tmpr2Nk3o 2018-06-23 12:41:46,451 - DEBUG - downloading files since 2017 2018-06-23 12:41:46,451 - INFO - 6 index files to retrieve From 7cefcc0faa85a9f3184d30bc6247cb9d2c86d4c6 Mon Sep 17 00:00:00 2001 From: Stefan Sullivan Date: Fri, 10 May 2024 16:57:03 -0700 Subject: [PATCH 3/3] Update setup.py to exclude run.py --- setup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.py b/setup.py index 264862c..c2e3ce5 100644 --- a/setup.py +++ b/setup.py @@ -14,7 +14,6 @@ author_email="edouard.swiac@gmail.com", url="https://github.com/edouardswiac/python-edgar", packages=["edgar"], - scripts=["run.py"], license="MIT", keywords="edgar sec filings 10k 10q 13d 8k", classifiers=[