ascii art renderer
our code is set up well to just plug in an ascii art renderer. i suspect still will be quite hard, though we can treat everything as rectangles to start to make it easier.
https://github.com/ironcamel/Graph-Easy
Any hope for this one?
Unfortunately there's no motivating factor right now.
💎 $200 bounty • Terrastruct
Steps to solve:
-
Start working: Comment
/attempt #924with your implementation plan -
Submit work: Create a pull request including
/claim #924in the PR body to claim the bounty - Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts
❗ Important guidelines:
- To claim a bounty, you need to provide a short demo video of your changes in your pull request
- If anything is unclear, ask for clarification before starting as this will help avoid potential rework
- Low quality AI PRs will not receive review and will be closed
- Do not ask to be assigned unless you've contributed before
Thank you for contributing to terrastruct/d2!
| Attempt | Started (UTC) | Solution | Actions |
|---|---|---|---|
| 🟢 @mohamed1408 | May 05, 2025, 05:37:42 PM | #2523 | Reward |
| 🟢 @DrSensor | Feb 14, 2025, 06:26:41 AM | #2353 | Reward |
| 🔴 @AkashJana18 | Feb 14, 2025, 06:15:41 AM | WIP | |
| 🟢 @melmathari | May 27, 2025, 07:42:08 PM | #2526 | Reward |
/attempt #924 I would like to work on this issue. Hey @alixander can you shed some more light how to proceed further?
Options
💡 @DrSensor submitted a pull request that claims the bounty. You can visit your bounty board to reward.
@AkashJana18 since there's a PR open, I'll let him proceed first and ping you if it doesn't work out
More context: https://github.com/terrastruct/d2/pull/2353#pullrequestreview-2618517820
Hey @DrSensor, would you like to collaborate on this issue, or should I go ahead and start working on it? Or are you planning to handle it solo?
I'll give 72 hours to respond to comments each time. I'll keep it moving to ensure people have a fair shot @AkashJana18
@AkashJana18 i came up with other solution using grid based method so i want to handle it solo. i will mention you if i need help.
interesting if it is interconvertible. https://ivanceras.github.io/svgbob-editor/
Well we already have SVG renderers so converting ASCII to SVG with another tool doesn't seem useful
umm, talk about SVG is short sighted...
that is great ascii art. i believe that d2's ability to output compatibly is to produce beautiful ascii art output.
/attempt #924 I would like to work on this issue. I have one doubt - I have completed basic shapes, but do we need curves in ascii in connections. Also shall I work?
eg: alphabet -> vowels
Is this Ok?
yes that's fine. can be only non-curve layouts. e.g. should render the landing page example: https://play.d2lang.com/?script=rJJBjtswDEX3OgWBrm2kzU4FeoruC8JibSG0KIj0pMHAdy9kW00yU2A2s6RI_8__6Bcs6uHVAYRv3SDpdxz3EoDxJot1lMaYyAPxZXv-Aj-pzDEhg000EwwSaOtsZReDh_Pp5ABWt7pEdpVy2TUHYgaTK5XmoWjEHI20vQDohJk8qEmh8CugYWvYjamfF7aYmTxYWXbj1e3-BZPO0YyKe6MO3Y_HtgelFD5xZttAEsdEkKUYcsuzRA-vR6SJ_uAoaW0f1GyQiwykKncmJgVHegdkuHFMgcrHNA75O-7-Yeca4dm4_-eYJ0kELKO61blF26GODTIVleQArjHY5OHr-dTmqupx6_7xzDNeCAZkfjf1RKuvmHCo--yGWzi1IhfqAurk4VytMEdQKi8fSYWomfH2Zr4G21NENbdX7TYZR_r-X6ira39x_8ytSt4N3N8AAAD__w%3D%3D&
Then it is ok. I will finish my work and let you know.
Hi @alixander it is taking some time. So I wanna let you know the progress I've made. The pending works are some shapes and connections. I share you the sample (partial) that my code can generate now in comparison with your landing page output. Pls let me know if any changes to e done
d2_landing_page_example_ascii.txt
FONT: Consolas Regular FONT SIZE: 12 pt
How about an approach to make all shapes rectangular? I think d2 can get smaller results.
e.g.
shape: rectangle ╭─────╮ │Default │ ╰─────╯
shape:person (^_^)────╮ │ USER │ ╰──────╯
shape: cloud ☁────╮ │ CLOUD │ ╰─────╯
╭┤☁├─────╮ │ Cloud Drive │ ╰────────╯
╭──┬──────╮ │☁ │Cloud Drive │ ╰──┴──────╯
That's genius. Is this ok with @alixander ?
the symbols for all SHAPES need to be determined. also, the design needs to be devised in the hierarchy.
e.g.
╭──┬──────╮
│☁ │Cloud Drive │
╰──┴──────╯
╭┤☁├─────╮
│ Cloud Drive │
│ │
│ ╭─────╮ │
│ │ Default │ │
│ ╰─────╯ │
╰────────╯
How about an approach to make all shapes rectangular? I think d2 can get smaller results.
e.g.
shape: rectangle ╭─────╮ │Default │ ╰─────╯
shape:person (^_^)────╮ │ USER │ ╰──────╯
shape: cloud ☁────╮ │ CLOUD │ ╰─────╯
╭┤☁├─────╮ │ Cloud Drive │ ╰────────╯
╭──┬──────╮ │☁ │Cloud Drive │ ╰──┴──────╯
Hi @alixander can you comment on this?
Yes, that is good to me.
Hi @alixander it is almost complete. Having small problems in connections arrow head.
Wanted to let you know will be completed in 2 days.
/attempt #924
Hi @alixander created new PR #2528 with signed commit. No code changes - same as previous PR #2523.
🎉🎈 @mohamed1408 has been awarded $200 by Terrastruct! 🎈🎊