File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 1+ #include < cstdlib>
2+ #include < cstring>
13#include < openPMD/auxiliary/JSON_internal.hpp>
24
35#include < iostream>
@@ -39,6 +41,21 @@ int main(int argc, char const **argv)
3941 std::cin >> jsonOrToml;
4042 break ;
4143 case 2 :
44+ if (strcmp (argv[1 ], " --help" ) == 0 || strcmp (argv[1 ], " -h" ) == 0 )
45+ {
46+ std::cout << " Usage: " << std::string (argv[0 ]) << R"( [json_or_toml]
47+ 'json_or_toml' can be a JSON or TOML dataset specified inline or a reference
48+ to a file prepended by an '@'.
49+ Inline datasets will be interpreted as JSON if they start with an '{', as TOML
50+ otherwise. Datasets from a file will be interpreted as JSON or TOML depending
51+ on the file ending '.json' or '.toml' respectively.
52+ Inline dataset specifications can be replaced by input read from stdin.
53+
54+ If the input is JSON, then it will be converted to TOML and written to stdout,
55+ equivalently from TOML to JSON.
56+ )" ;
57+ exit (0 );
58+ }
4259 jsonOrToml = argv[1 ];
4360 break ;
4461 default :
You can’t perform that action at this time.
0 commit comments