Open stuchalk opened 1 year ago
I don't know how useful or generally desired that is as the tool is intended to be called from the command line.
If you want to call it from another python program, you can look at the main method in the package and invoke the parts you would like to use, https://github.com/LLNL/scraper/blob/aabc24fbe6e38d8de996fc40b5fdc8b2bd9b24b9/scraper/gen_code_gov_json.py#L15
Thanks for quick reply. Took a quick look at main and I will see what I can do. Would you consider a PR to add this functionality?
Definitely, I think a PR that refactors this to be more program callable would be nice. It should be possible to refactor this and keep the command line functionality the same.
OK, I will fork the repo and work on it.
@stuchalk just to chime in with @leebrian -- yes, would definitely consider a PR that changes things around, but at a glance if you didn't want to do that, I think this is the meat you'd be looking for:
Can you add documentation how to call scraper in Python code rather than the command line? This would be very helpful for a new project I am working on that goes even further than this - which is awesome by the way...:)