Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...



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.


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




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: