studio icon indicating copy to clipboard operation
studio copied to clipboard

Command line interface

Open vpoulailleau opened this issue 3 years ago • 3 comments

Would be nice to have a command line interface.

En version un peu plus détaillée (mais en français !)

Tout d'abord, un gros merci pour STUdio, c'est génial !

J'ai plein de packs d'histoires et je les transfère à qui m'amène sa fabrique à histoires. Mais pour l'instant je fais cela à la main, et c'est long et répétitif.

Dans mon cas, j'aimerai pouvoir scripter, avec une interface en ligne de commande (ou une API HTTP ou autre). Voici ce que je vois comme besoin :

  • lister les packs (par UUID ou titre ?) présents sur une fabrique à histoires
  • uploader un pack dans une fabrique à histoires
  • éventuellement changer l'ordre des packs

Si je suis le seul à avoir le besoin, je comprends tout à fait que ce ne soit pas implémenté. Mais j'imagine que cela aiderait beaucoup d'accrocs à STUdio !

@marian-m12l (et les autres) Qu'en penses-tu ?

vpoulailleau avatar Jul 07 '21 16:07 vpoulailleau

@vpoulailleau Actually, I started working on a CLI, it's somewhere on a local branch. I could push that branch but it probably requires more work, as this was before the new firmware IIRC. Also it was part of an effort to build STUdio with GraalVM to provide standalone native binaries, because nobody wants to install a JVM just to run a CLI, right?

marian-m12l avatar Jul 07 '21 21:07 marian-m12l

because nobody wants to install a JVM just to run a CLI, right?

@marian-m12l sure!

Since you already have a web server for the GUI, it may be easier to develop an HTTP API (GraphQL or REST or whatever), allowing the creation of different CLI with different programming languages (for instance in Python, my preferred language!).

Whatever the chosen solution, it'll be great to have this CLI. It's been years that I haven't programmed in Java, so I probably won't be the best help here. So I'll wait (I know you're doing this in your spare time)

vpoulailleau avatar Jul 08 '21 05:07 vpoulailleau

Well technically the API exists, it's just undocumented and I can't guarantee it won't change (spoiler alert: it will). Also, you'd still need to run the web module on the JDK. I need to dig my local branch and see if it's clean enough to push to github, as a "better than nothing" solution on a separate branch for now.

marian-m12l avatar Jul 23 '21 19:07 marian-m12l