Live data from Hacker News

Show HN: Cascii – A portable ASCII diagram builder written in vanilla JavaScript

github.com

41–50 of 54 posts

Re: Show HN: Cascii – A portable ASCII diagram builder written in vanilla JavaScript

#41
post #28
post #24

Earlier quoted context omitted.

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…

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 JS…

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

Re: Show HN: Cascii – A portable ASCII diagram builder written in vanilla JavaScript

#43
post #38
post #14

Earlier quoted context omitted.

Hi, great app. I'd love to understand how you are maintaining state behind that short url and see if there are ways (sans server) to at least partially recreate state from the exported ascii. Having an Import from clipboard would truly make this a remarkable app.

Exactly. Make it importable and i am sold. Maybe base64 encoded metadata under the diagram? Maybe encode in non-printable characters? Maybe just use non-printable characters to hint where the corners of objects are?

v1.0.1 now has offline import/export

https://github.com/casparwylie/cascii-core

Re: Show HN: Cascii – A portable ASCII diagram builder written in vanilla JavaScript

#44
post #13
post #9

Earlier quoted context omitted.

Glad you asked. Have you checked the online version https://cascii.app There, all exported drawings come with a short link. This is so that months later anyone reading / seeing can edit their own copy online / keep it up to date. You can also create an account to manage your own drawings. Side note - when you use real pasting, it will not remember meaningful information (that's very hard to do elegantly). In your exa…

Makes sense. Thank you for making and sharing this.

v1.0.1 now has offline import/export

https://github.com/casparwylie/cascii-core

Re: Show HN: Cascii – A portable ASCII diagram builder written in vanilla JavaScript

#45
post #34

Wow. This is absolutely fantastic! Great work! Congrats! Do you know if there would be a way (in the future) to export existing image diagrams to this format / will there be an API. It would be very cool for archival purposes.

v1.0.1 now has offline import/export

https://github.com/casparwylie/cascii-core

Re: Show HN: Cascii – A portable ASCII diagram builder written in vanilla JavaScript

#46

Nice job. Thanks! Also very interesting to have it "distributed" in one html file. Sometimes people forget simple ways to do stuff :) Is is possible to import and edit diagrams after they have been created?

v1.0.1 now has offline import/export

https://github.com/casparwylie/cascii-core

Re: Show HN: Cascii – A portable ASCII diagram builder written in vanilla JavaScript

#47
post #14
post #9

Earlier quoted context omitted.

Glad you asked. Have you checked the online version https://cascii.app There, all exported drawings come with a short link. This is so that months later anyone reading / seeing can edit their own copy online / keep it up to date. You can also create an account to manage your own drawings. Side note - when you use real pasting, it will not remember meaningful information (that's very hard to do elegantly). In your exa…

Hi, great app. I'd love to understand how you are maintaining state behind that short url and see if there are ways (sans server) to at least partially recreate state from the exported ascii. Having an Import from clipboard would truly make this a remarkable app.

v1.0.1 now has offline import/export

https://github.com/casparwylie/cascii-core

Re: Show HN: Cascii – A portable ASCII diagram builder written in vanilla JavaScript

#48
post #26
post #22

Earlier quoted context omitted.

It's a single 4992 line HTML file, which is the source code, making a lot harder to contribute to or maintain. I'd like it a bit more (and I might even contribute) if it had at least some separation of concerns, and a simple build system even if the build system is just a bash command to concatenate source files into one HTML file (if having 1 HTML file is somehow very important, but it's not).

I know it's controversial to do things this way, but given it's a personal project and focuses on portability, I think the benefits are worth while. I have taken care to break things up, comment, etc - if you start at main(), you may find it's not any more difficult to follow than if i'd broken it up. Just because it's one file doesn't mean it doesn't separate concerns.

>"Contributions are very welcomed. Please feel free to submit proposals directly in the form of a PR or Issue."

Good luck getting contributions. I don't have the time to read and understand all 4000+ lines of this very long file. I have ideas, but I'm not even interested in participating because of the format.

Re: Show HN: Cascii – A portable ASCII diagram builder written in vanilla JavaScript

#50
post #26
post #22

Earlier quoted context omitted.

It's a single 4992 line HTML file, which is the source code, making a lot harder to contribute to or maintain. I'd like it a bit more (and I might even contribute) if it had at least some separation of concerns, and a simple build system even if the build system is just a bash command to concatenate source files into one HTML file (if having 1 HTML file is somehow very important, but it's not).

I know it's controversial to do things this way, but given it's a personal project and focuses on portability, I think the benefits are worth while. I have taken care to break things up, comment, etc - if you start at main(), you may find it's not any more difficult to follow than if i'd broken it up. Just because it's one file doesn't mean it doesn't separate concerns.

One file is great!
Post reply on HN