-
Notifications
You must be signed in to change notification settings - Fork 44
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
How to export the rendered image in python #210
Comments
Hi @chenxinfeng4 it's probably easiest to use the command line interface for that. It runs on node.js and can be installed with node.js's default package manager. I have no experience with calling node programs from python or c++, but I guess the thing that enables calling executables from an state-machine-cat.js.org doesn't run an API - it's only a 'static' website... |
Is it possible to deploy all the dependence into one folder? I can just access the |
Hi @chenxinfeng4 I've heard of solutions that bundle node applications, including the node.js run time & libs into single executables, but I have no experience with them. |
Sad, something went wrong when I packaged the cmcat.
SyntaxError: Cannot use import statement outside a module Node.js v18.5.0 |
Hi @chenxinfeng4 it seems that I've searched a bit for alternatives for single executable applications on nodejs, but it turns out none of the ones I found will work.
Alternatively, if you want to run a modern node module from a single folder this should work:
All you need to run state-machine-cat should now be in that folder. To run it, in that folder:
Note I have tried this on my own machine only, which is not a windows machine hope this helps. |
That seems a great solution, thanks for your kind help. |
I'm the creating a stimuli delivering system for animal behavior training, named ArControl. I use the state machine to design task and convert task to "State Machine Cat" smcat file for beautiful visulazition.
The smcat is great, but how can I directly get the image file? I want to embed this
export
feature in my application.I'm good at C++ and python programming, but I not good at js and web. Is there any simple way to post my smcat file to
https://state-machine-cat.js.org/
and get the image back? I'd would be better if the installation is as small as possible.The text was updated successfully, but these errors were encountered: