News for hackers. Stuff that matters.
Re:Show HN: Cascii – A portable ASCII diagram builder writte... by ssriram on Tuesday March 18, 2025 @02:13AM (#43396239)
After uploading cascii.html to deepseek.com and promptCoding with it, I saw that you had the json representaion in localStorage.

I tried generating the json from the ascii exported to the clipboard but see why this could get very tricky. So, I added an Export (JSON) to file and Import (JSON) from file and placed them in a More Popup component in which I put the existing export button, so the menu bar does not get too crowded. (for code see (1)) -

This now allows me to save the json and import/edit it at a later time - no short url needed and the data stays private.

Your code was well laid out and deepseek was able to make all the changes error-free.

(1) https://github.com/ssr1ram/cascii-core/tree/more-export-impo...

Re:Show HN: Cascii – A portable ASCII diagram builder writte... by ftr1200 on Tuesday March 18, 2025 @04:08AM (#43396790)
Nice! Yea it should be easy to use the internal layerManager.import and .encodeAll

This might break state for the online version, but I can do some tweaks and get it merged if you open the PR.

to be clear, the short url feature is useful in that other people can easily edit / update diagrams they see referenced in code comments. If privacy is a concern and you're not distributing the diagram, then indeed exporting JSON is a good way to go.

Re:Show HN: Cascii – A portable ASCII diagram builder writte... by ssriram on Tuesday March 18, 2025 @12:09PM (#43401096)
Having an AI engine understand ascii diagrams and output the JSON would be ideal. Till then here is the PR (1) for a simple import and export.

(1) https://github.com/casparwylie/cascii-core/pull/5