Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run as module #33

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]"
$ python -m edgar -y 2017 -ua "MyCompany [email protected]"
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
Expand Down
4 changes: 2 additions & 2 deletions run.py → edgar/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
author_email="[email protected]",
url="https://github.com/edouardswiac/python-edgar",
packages=["edgar"],
scripts=["run.py"],
license="MIT",
keywords="edgar sec filings 10k 10q 13d 8k",
classifiers=[
Expand Down