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

Escape characters not well documented #24

Closed
apassy opened this issue May 3, 2024 · 3 comments
Closed

Escape characters not well documented #24

apassy opened this issue May 3, 2024 · 3 comments
Labels
bug Something isn't working documentation Improvements or additions to documentation

Comments

@apassy
Copy link

apassy commented May 3, 2024

edgar-tool text_search "BF Borgers"

Results in:
https://efts.sec.gov/LATEST/search-index?q=%5CBF+Borgers%5C&dateRange=custom&startdt=2019-05-05&enddt=2024-05-03&page=1

Note that %5C is , not "

Py 12, windows 10, powershell 7.42.

This is a Doc issue. For Powershell it should be: edgar-tool text_search "BF Borgers"

@GalenReich
Copy link
Collaborator

Thanks for opening this issue! It took a few moments to parse thanks to the markdown interpreter, but I think it boils down to the escape character being backslash (\) in Linux/Mac, backtick (`) in Windows Powershell, and caret (^) in WIndows Command Prompt

There are a few ways this could be handled:

  1. Documentation - simply changing the documentation to make this subtlety clear.
  2. Parsing - work out a better way of parsing the command-line search arguments. I don't think this is possible though as the characters are handled by the shell.
  3. Interactive session - we could make it so that when a user runs text_search without arguments they would be interactively prompted for their search (which wouldn't have to deal with escape characters) - a bit more clunky perhaps, but might help with the usability when it comes to the escape characters!

@GalenReich GalenReich added bug Something isn't working documentation Improvements or additions to documentation labels May 8, 2024
@GalenReich GalenReich changed the title exact search example is broken on Powershell Escape characters not well documented May 8, 2024
@jordan-gillard
Copy link
Contributor

@GalenReich @apassy

I believe the solution is to wrap the exact search term, including the double quotes ", in single quotes ', as in:

edgar-tool text_search '"John Doe"' Pharmaceuticals Chemicals

I will open a PR in a second that updates the README.

@GalenReich
Copy link
Collaborator

This has been fixed by #40, new release to PyPi soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants