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

[FEATURE] open xml file with core-gui from CLI #844

Closed
gh0st42 opened this issue Jan 12, 2024 · 4 comments
Closed

[FEATURE] open xml file with core-gui from CLI #844

gh0st42 opened this issue Jan 12, 2024 · 4 comments
Assignees

Comments

@gh0st42
Copy link

gh0st42 commented Jan 12, 2024

In old versions of coreemu (iirc <6.0) it was possible to load a scenario config directly into core-gui using the command line without using the file open dialog.
This is super convenient when you have test scenarios in different repositories and are working in the terminal anyhow.

It would be nice to have a something like -f <scenario.xml> as an optional parameter for core-gui again.

@bharnden
Copy link
Contributor

This is now accomplished by the core-cli utility.

usage: core-cli xml [-h] -f FILE [-s]

optional arguments:
  -h, --help            show this help message and exit
  -f FILE, --file FILE  xml file to open (default: None)
  -s, --start           start the session? (default: False)

@bharnden bharnden self-assigned this Jan 12, 2024
@gh0st42
Copy link
Author

gh0st42 commented Jan 12, 2024

ah, almost forgot about core-cli for loading and starting.
So I should do something core-gui -s $(core-cli xml -f scenario.xml | cut -d, -f2)?
Inconvenient but is a workaround and if the CLI interface is stable can be added to my bashrc.

@bharnden
Copy link
Contributor

It doesn't plan to change at the moment. It probably should have an exit code reflective of failure or success, if that would make it an easier check. Assuming that is your goal.

That would probably be something that should be adjusted.

@gh0st42
Copy link
Author

gh0st42 commented Jan 13, 2024

no, my/our goal is just to quickly open/edit/view scenarios that we have in various repositories and projects.
sometimes not even with the intent to run them directly but just to look over them, add documentation or do minor adjustments.

Of course, catching errors when opening fails should happen if multiple processes are involved now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants