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

Create new URL encoding function to align with SEC API #40

Merged
merged 21 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
f5171a1
Update README examples w/ x-platform escape chars
jordan-gillard Jul 7, 2024
549273e
Use urllib.parse.quote to encode quote characters
jordan-gillard Jul 9, 2024
ec66721
Merge remote-tracking branch 'upstream/main' into clarify-escape-char…
jordan-gillard Jul 9, 2024
53576dc
Avoid double escaping keywords in url and handle single quotes
GalenReich Jul 10, 2024
d7f754c
Update exact search instructions in README
GalenReich Jul 10, 2024
164bbb2
feat: Add search param validator and basic tests
jordan-gillard Jul 14, 2024
49876a2
test: Add invalid arg tests
jordan-gillard Jul 15, 2024
c498941
test: Add invalid custom date tests
jordan-gillard Jul 16, 2024
0391bf6
test: Raises error for invalid date_range_select
jordan-gillard Jul 16, 2024
bb850ec
test: Add tests for all date options
jordan-gillard Jul 16, 2024
9b51728
Merge remote-tracking branch 'upstream/main' into clarify-escape-char…
jordan-gillard Jul 28, 2024
e30880b
Add filing categories to url_generator
jordan-gillard Jul 28, 2024
eb2583a
Remove duplicate filing category to form id code
jordan-gillard Jul 28, 2024
534b672
feat: Add support for single forms
jordan-gillard Aug 7, 2024
ca7add3
Amend me! Add TODO for remaining work
jordan-gillard Aug 7, 2024
d31de9a
Add ISO 3166-1/2 country codes to EDGAR codes
jordan-gillard Aug 17, 2024
4d4c1ba
Add urls for remaining countries
jordan-gillard Aug 18, 2024
41ee9bb
Add test for invalid peo_in
jordan-gillard Aug 18, 2024
f3204b8
Add tests for incorportated in
jordan-gillard Sep 7, 2024
c4e0163
Update url_generator to use EDGAR API URL
jordan-gillard Sep 8, 2024
58501d3
Merge branch 'main' into pr/40
GalenReich Oct 24, 2024
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
41 changes: 32 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,26 +38,49 @@ This is a command line tool that takes a search query, queries a server, and dow

### Examples

```bash
# Display help message describing all supported arguments along with their usage, aliases and eventual default values (type q to exit)
Display help message describing all supported arguments along with their usage, aliases and eventual default values (type `q` to exit)

```shell
edgar-tool text_search --help
```

Basic usage (defaults to searching the last 5 years of records)

# Basic usage (defaults to searching the last 5 years of records)
```shell
edgar-tool text_search John Doe
```

You can wrap a phrase in quotes if you want an exact match.
This works in both POSIX-compliant shells (Linux/Bash) and Windows PowerShell environments.

# Basic usage with a combination of exact and partial search parameters
edgar-tool text_search \"John Doe\" Pharmaceuticals Chemicals
For example, the following usage will search for the exact phrase `"John Doe"` and treat `Pharmaceuticals` and
`Chemicals` as partial search parameters.

```shell
edgar-tool text_search "John Doe" Pharmaceuticals Chemicals
```

# Usage with date range and export to custom CSV file
Usage with date range and export to custom CSV file

```shell
edgar-tool text_search Tsunami Hazards --start_date "2021-01-01" --end_date "2021-12-31" --output "results.csv"
```

# Usage with a partial set of filing forms + single forms
### Usage with a partial set of filing forms + single forms

```
edgar-tool text_search Hurricane Damage --filing_form "registration_statements" --single_forms "['1-K', '1-SA']"
```

Usage specifying the location of incorporation

# Usage specifying the location of incorporation
```shell
edgar-tool text_search oil --inc_in "Egypt"
```

More advanced usage specifying more arguments, with export to JSON

# More advanced usage specifying more arguments, with export to JSON
```shell
edgar-tool text_search Volcano Monitoring --start_date "2021-01-01" --end_date "2021-12-31" --output "results.json"\
--filing_form "all_annual_quarterly_and_current_reports" --entity_id "0001030717" \
--min_wait 5.0 --max_wait 7.0 --retries 3
Expand Down
4 changes: 2 additions & 2 deletions edgar_tool/main.py → edgar_tool/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
from edgar_tool.cli import SecEdgarScraperCli


def main_entrypoint():
def main():
fire.Fire(SecEdgarScraperCli)


if __name__ == "__main__":
main_entrypoint()
main()
Loading
Loading