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

Provide CLI script #123

Merged
merged 4 commits into from
Jul 20, 2020
Merged

Provide CLI script #123

merged 4 commits into from
Jul 20, 2020

Conversation

clausnagel
Copy link
Member

The recommended way to use the Importer/Exporter in CLI mode is to invoke the impexp-client.jar using the java tool. From the doc:

$ java -jar lib/impexp-client-{version}.jar [-options]

This is neither intuitive nor handy and it also faces disadvantages. For example, you cannot easily put this command on your PATH and the {version} part of the command must be adapted with every new release. In theory, you could use the provided start script 3DCityDB-Importer-Exporter(.bat) to run the Importer/Exporter in CLI mode. But at least for Windows, the start script uses "start /min cmd /c" to execute the tool. This is OK and makes sense for launching the graphical user interface but suppresses all output when invoking the script from a shell.

This PR proposes to have an explicit CLI script impexp(.bat) in addition to the start script. The CLI script is located in the bin subfolder. This makes using the Importer/Exporter in CLI mode really simple. For example, the following command shows the help message and all available options:

$ impexp -help

This way, the CLI script can be put in the PATH and is independent of the release version. And the start script can be re-implemented such that it just invokes the CLI script with the option to launch the GUI.

@clausnagel clausnagel requested a review from yaozhihang July 19, 2020 11:28
@clausnagel clausnagel self-assigned this Jul 19, 2020
@clausnagel
Copy link
Member Author

Discussed offline with @yaozhihang. Merging.

@clausnagel clausnagel merged commit 3bd9b60 into master Jul 20, 2020
@clausnagel clausnagel deleted the cli branch July 20, 2020 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant