Driving the Database plugin from console?

Started by vladeki, April 03, 2019, 14:21:49 PM

Previous topic - Next topic

vladeki

Hello, Archi forum!

First of all, thank you for the tool. It works and accomplishes exactly what my organization needs.

I was able to automate remote model retrieval and the HTML dump through the terminal, but I'm stuck trying to automate export into a SQLite database. Are there any command line controls for the DB plugin, like there are for the Collaboration plugin?

Hervé

Hi,

In fact, the database plugin is not developed by the core Archi team, and therefore is not known by the core of Archi.

That's the reason why I created the script plugin that is quite very limited but allows to automate a model loading and saving from a file or a database: https://github.com/archi-contribs/script-plugin

Please do not hesitate should you need help using this plugin.

Best regards
Hervé

Hervé

Just thinking ...

I should be possible to reference org.archicontribs.database classes and methods from jArchi, and jArchi can be piloted using the command line ... I'll try to try it this way and let you know if I succeed :-)

Best regards
Hervé

Phil Beauvoir

Or you could write an Archi CLI extension plug-in. Take a look at the existing ones.

https://github.com/archimatetool/archi-modelrepository-plugin/tree/master/org.archicontribs.modelrepository.commandline

Extend AbstractCommandLineProvider class and implement:

void run(CommandLine commandLine);

Options getOptions();

int getPriority();

And then just call your code.
If you value and use Archi please consider making a donation! https://www.archimatetool.com/donate

vladeki

Quote from: Hervé on April 03, 2019, 20:47:43 PM
Just thinking ...

I should be possible to reference org.archicontribs.database classes and methods from jArchi, and jArchi can be piloted using the command line ... I'll try to try it this way and let you know if I succeed :-)

Best regards
Hervé

I've been considering something like this, however, I'd really need to catch up on my Java.

For now, I've decided that xdotool would suffice as far as pushing the right buttons goes. I'll take a closer look at a proper implementation as mentioned above by Hervé.