Escape characters not well documented
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"
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:
- Documentation - simply changing the documentation to make this subtlety clear.
- 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.
- Interactive session - we could make it so that when a user runs
text_searchwithout 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 @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.
This has been fixed by #40, new release to PyPi soon