Closed stolksdorf closed 4 years ago
Including the source in the SVG sounds like a good idea. Would you have time to make a pull request with such a change?
I am not immediately convinced that it is a good idea to embed data in the PNG files. Perhaps that could be a 3rd party service to handle stuff like that :)
I started experimenting with this, couple things:
<desc>
tag insteaddesc
tag, which is fine, we just need to put the escaper and unescaper somewhereDo you have a preference/aversion to either of those ideas?
Sound nice.
The file manager menu should have a button for “Open file” where you can select a .nomnoml or .svg file. Would be great to accept drag-dropping local files onto the browser window as well.
Implemented in #117
I have done some cleanup, and the feature turned out to be really nice! Will test it a bit and they deploy it.
Deployed 🎉
Keeping rendered nomnoml diagrams and their source "linked" is a tricky problem, eg. I make a png diagram for a slideshow at work, if I don't save the source for that diagram somewhere, it will be lost.
It would be great that when you render either a SVG or a PNG, nomnol would embed the source code into the image file to be read and edited later.
For SVGs this is pretty easy, there's a
metadata
tag that can just store whatever you want. so thats perfect.For PNGs it's a bit weirder. There is a text chunk but it seems less straight forward to use, and I'm not sure on it's max allowable size. You could of course embed the source data into the least significant color bits, but that seems like overkill.
It would also be great if the web editor could accept these images via drag and drop and populates the editor with the embedded source code.
I was inspired by Pico8 game cartridges.
Thoughts?