-
Notifications
You must be signed in to change notification settings - Fork 32
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
command line svg export tool? #246
Comments
(Note, I'm not a project member.) Tuhi dumps its output data in JSON format into Tuhi developers: Would it be possible to have a slightly more integrated workflow for converters like these, Unix pipe style? PS: I'm happy to contribute my renderer tool once it's a bit more finished, but it's written in Go, unlike Tuhi, so can't be easily integrated into the existing codebase. |
I understand the use-case but it's not something we've got plans for (let alone the As @gnoack notes, the The main question I'd have is: why do you need to sync to a server and then batch convert there instead of just saving the files in Tuhi? Wouldn't it be more efficient to improve the SVG export feature? I could envision some nominated directory that Tuhi automatically saves SVG files to, that may not be the worst of all features. |
Hmm, how about this scheme:
If I'm understanding this right, this would allow Tuhi to basically run in "headless" mode, e.g. on a Raspberry Pi; so that the device would sync automatically with the Tuhi server without GUI interaction, and we could script the images to be sent around in the background. Is this mode of operation reasonable in terms of power consumption and stability? (@whot you're mentioning there are reliability issues with a standalone server?) @jave is this the same what you're also looking for? |
that was how Tuhi was originally intended, so it will work. There are a number of issues for the general use-case but for what you're planning to do in a very constrained environment it should work. but there's a reason we don't install kete, we only intended it as a debugging CLI, not as a user-facing command. As a real issue you may face: IIRC there are still some issues when bluez removes the bluetooth device altogether while tuhi is running. You can get around this by just restarting tuhi, but it'll crash. |
@gnoack I guess it sounds what I had in mind. I can clarify my usecase a bit. I have a laptop which is mostly just used as a client to a remote workstation. Since it is not very reliable to remote a bluetooth session(but doable using trickery) I just run tuhi on the client and upload files to the workstation for further processing. So one idea was to use unison to sync the json files to the workstation, and use a separate tuhi process there to save the files to svg. But I dont really need the json files for anything in my use case other than to convert them to svg, so I thought they could be directly converted with a cli tool. Perhaps that makes it clearer? I guess using a lightweight laptop and a powerful remote workstation is kind of quirky, so I understand if its not a top priority. |
For a completely different approach: the JSON files are versioned and there's the theory that if we change it significantly, we'll bump the version (right now they just match the tablet data). So a simple solution without relying on Tuhi would be to just take the If anything, it's likely that this is what you want because tuhi's svg converter is simple but the json files should include things like timestamps etc. that you can then use to replay. |
@whot that sounds like an interesting idea. Do you have any pointers how I would convert the .json files to svg? For instance, where in the codebase to look? |
https://github.com/tuhiproject/tuhi/blob/master/DBusInterface.md#json-file-format the current json to svg conversion is the |
@jave @whot: I uploaded my JSON-to-PNG/GIF conversion tool at https://github.com/gnoack/tuhirender - I put installation instructions into the Readme file, and from there the rest should be standard unix pipeline plumbing. :) Let me know how it works for you. Some example images are at https://blog.gnoack.org/post/tuhirender/ |
@gnoack tuhirender does indeed convert tuhi json files to png, thanks! But I still need the svg files. atm I'm having problems getting the tuhi gui to work at all, so I even more want a cli tool the problem I'm having now is that tuhi starts by trying to register a new device, but I dont want to do that, I just want to access the files I have already downloaded. |
I did a json to svg tool now.
|
I think you could get around this by creating a compatible
This would work if it's part of the tuhi repo, but for any "outside" renderer I recommend not relying on the |
This works for me now, so this can be closed, unless you want to keep it open. |
Hello,
Is it possible to make a command line svg export tool using the codebase? If so, do you have any pointers?
My use case is syncing the tuhi data directory to a server, and batch convert the drawings to svg there.
PS thanks for Tuhi, it really makes the device much more useful!
The text was updated successfully, but these errors were encountered: