-
Notifications
You must be signed in to change notification settings - Fork 24
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
Added donut.ascii.svg #27
base: main
Are you sure you want to change the base?
Conversation
Once I'm back home (in like 8 hours or so) I could make it donut shaped if you are okay with that. Alternatively I could first program (or try to at least) an automatic donutification program (you can then use). |
Feel free to do it! I will be making a video about this donut today (without the formatting), so if you want to, you can make a follow-up video about the automatic donut formatting program :) |
“Auto donut-formatting” is the exact same problem as code formatting. Essentially you want to create your own formatter. You can parse the code and re-spit out the tokens with added white space. I would look into tree-sitter as a potential language-agnostic parser. You can also look at Python’s black formatter for inspiration |
why do i only see this now after i already made my own parser... Anyway, i think imma stay with mine, since it it language independent (which is good for languages that arent supported by tree-sitter) and cause I dont want to code this tool in a programming language I dont know. Still thanks for telling me though :) |
I got the svg kinda working and into a kinda donut shape, but cant identify why it still has the error it has rn (cause I dont know scg syntax and mostly guessed my way here) Anyone got an idea what could be wrong here?: https://drive.google.com/file/d/1hr6joJIqpGXI2xUXR05GD6t-bfgcuvLT/view?usp=sharing (also I used the older version with the |
Two things, first the fact that content isn't allowed in trailing sections (which I would assume you noticed), and two, I think using spaces in the tspan causes it to indent... with preserve-whitespace, it automatically parses spaces, without need of the escape sequence. (Noticed that a bit late lol) |
I guess the only option left is to split the tspan tags at certain points to make it donut-shaped unless you have some other idea? |
One unrelated comment - once this gets merged, you need to add the ASCII SVG to the README for this project (so it's easier to show off what the code should be doing) |
That's what I would probably do. |
@EvanZhouDev I took where you left off and took a stab at donut-ifying the SVG, and I'm very very close... but it currently outputs something that looks like a cryptid. 😆 See my gist Edit: I switched out 2023-10-25.13-56-41.mp4 |
I didn't want to push to your branch in case you had a better solution already |
Also included in my gist is the NodeJS file I used to generate both the SVG and put it into donut shape. I'm not gonna lie, this has shaken my faith in having an auto-donut formatter where you give it code and it pops out donut-shaped code. Especially with languages like SVG, HTML, etc, where you have both XML stuff and CSS stuff and plaintext stuff you have to be extremely context-aware to know where you can put line breaks and extra spaces. Since every language will have different safe characters to split on and may have different valid split points in different parts of the code, it could be a lost cause to make it work for any language. But... if you do get one working, try it out on all the existing donuts (after collapsing all consecutive whitespaces) and see if it works. It may work for one language, but not many. |
@joeskeen This looks great, but is there any reason you know it is kinda flickering up and down? It's a bit jarring 😅 |
Description
Added a new SVG donut with an ASCII design.
This is an alternate implementation to Joe Skeen's original SVG donut; it has been added because it has a different donut design (ASCII).
However, it is not donut-shaped! If anyone has an idea for easily formatting these 4000 lines, please let me know! (@IOKG04 , @joeskeen, @ThatXliner)
Checklist
donut
in thedonuts
folder with the proper file extensioninfo.json
with the proper metadata (Includingdescription
for Alternate-Implementation Donuts)