allow passing param json via stdin in CLI
See original GitHub issueSometimes it is preferable to specify parameters for processing on the fly. But the CLI module expects a filesystem path. It could be easily extended to allow -
for stdin as well, by adding allow_dash=True
to ocrd_tool_tool_parse_params, which is available since Click 6.0. This would enable on-the-fly specifications using here strings, e.g.:
ocrd-tesserocr-recognize -m mets.xml -p - <<<'{ "textequiv_level": "glyph", "model": "Fraktur" }'
Issue Analytics
- State:
- Created 4 years ago
- Comments:9 (7 by maintainers)
Top Results From Across the Web
Pass JSON as command line argument to Node - Stack Overflow
I wanted to pass around lots of options via JSON between parts of my program (a master node routine calling a bunch of...
Read more >Pass JSON to script via stdin instead of as an argument #79
This calls the tee command which reads from stdin and outputs everything to its stdout. So it essentially writes 'testing! to the stdin...
Read more >Loading AWS CLI parameters from a file
For commands that take binary data as a parameter, specify that the data is binary content by using the fileb:// prefix. Commands that...
Read more >Ubuntu - How do I pass JSON string to herestring?
I have a command where I need to pass a JSON string to the options but for some reasons I need it to...
Read more >Using the CLI - Oracle Help Center
This topic describes how to use the CLI to access Oracle Cloud Infrastructure and carry out service-related tasks.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
How about:
{
(whitespace allowed)Looks good @kba 😃