-
Notifications
You must be signed in to change notification settings - Fork 49
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
Remove speech bubble from ascii #67
Comments
can you clarify? not sure what you mean |
You define an animal as
Which means the speech bubble will look the same no matter what the input text is. For instance
While if instead animals were defined as
You could replace the entire speech bubble with one that looks appropriate to the input size.
|
Okay. My cli cowsay has vertical bars instead of carrots, not important really, but just to show you
I think making this the default would be good. it'd be good to have the bubble envelop the entire string wrt letting the user specify, can you give a use case? and might it be difficult for the user to know how to give the bubble? i guess you could present options for the bubble that are a set that we know work well. |
Interesting idea! I think I like it. @sckott's cli cowsay I think looks good because it's more compact than the full width of the terminal. As far as implementing something like that, for the top and bottom of the bubble I guess you'd just make a line measured by something like
to ensure that Then add As far as splitting the text up into lines I'm not totally sure but I don't think you wouldn't want to split up the text exactly evenly because that would spread words across multiple lines. So you'd probably want to go with splitting on the last space character without going over |
Not sure how much it should be based on the terminal size as it might get too unwieldy. Something adjustable with a smaller default would probably look better. The command cowsay seems to limit it to 44 characters by default |
also sorry about a lack of a PR. didn't have time to look into it |
Yeah sorry I didn't explain well. The idea is that the maximum width would be |
makes sense @aedobbyn |
Cool cool. If you want to put together a PR @oganm, go for it. Another idea would be to kick it to participants at an upcoming unconf I'm planning on going to since this would be a cool thing for people to talk through implementing. (The idea with this unconf is to let participants contribute to existing packages.) It's your idea, though, so very much up to you! |
If I'm not done by that time feel free to hand it to the unconf. Will try to take a look before that |
Works for me, thanks @oganm |
sounds good @aedobbyn |
yep. it's fine 👍 |
Awesome, thanks guys! |
@aedobbyn It would be nice to make this change. Would you want to do it, and have time to? |
I have implemented dynamic speech bubbles in my personal package startifyR. startifyR::startify()
#> +--------------------------------------------------------+
#> |Easy things should be easy and hard things should be |
#> |possible. |
#> | - Larry Wall|
#> +--------------------------------------------------------+
#> o
#> o
#> <=======]}======
#> --. /|
#> _\"/_.`/
#> .`._._,.`
#> :/ \{}/
#> (L /--`,----._
#> | \\
#> : /-\ .`-`\ / |
#> snd \\, || \|
#> \/ || ||
startifyR::startify()
#> +----------------------------------------------------------------+
#> |Some things are better done than described. |
#> |Don't fall into the specification spiral - at some point you |
#> |need to start coding. |
#> +----------------------------------------------------------------+
#> o
#> o
#> ,```.._ ,```.
#> :,--._:)\,:,._,.: All Glory to
#> :`--,`` :`...`;\ the HYPNO TOAD!
#> `,` `---` `.
#> / :
#> / \
#> ,` :\.___,-.
#> `...,---```````-..._ |: \
#> ( ) ;: ) \ _,-.
#> `. ( // `` \
#> : `.// ) ) , ;
#> ,-|`. _,`/ ) ) ,` ,`
#> ( :`.`-..____..=:.-`: . _,` ,`
#> `,`\ ``--....-)=` `._, \ ,`) _ ```._
#> _.-/ _ `. (_) / )` ; / \ \`-.`
#> `--( `-:`. `` ___..` _,-` |/ `.)
#> `-. `.`.``-----``--, .`
#> |/`.\`` ,`,`); SSt
#> ` (/ (/
startifyR::startify()
#> +--------------------------------------------------------------+
#> |The computer was born to solve problems that did not exist |
#> |before |
#> | - Bill Gates|
#> +--------------------------------------------------------------+
#> o
#> o
#> .--`````````--.
#> .` .---. `.
#> / .-----------. \
#> / .-----. \
#> | .-. .-. |
#> | / \ / \ |
#> \ | .-. | .-. | /
#> `-._| | | | | | |_.-`
#> | `-` | `-` |
#> \___/ \___/
#> _.-` / \ `-._
#> .` _.--| |--._ `.
#> ` _...-| |-..._ `
#> | |
#> `.___.`
#> | |
#> _| |_
#> /\( )/\
#> / ` ` \
#> | | | | Created on 2024-10-11 with reprex v2.1.1 Not sure I would have time for a PR at the moment, but feel free to copy/adapt the relevant code: |
sweet, thanks @schochastics - I'll have a look |
to do:
as part of this effort:
|
- uses code from @schochastics - variety of cleanup things - fully remove multicolor stuff from pkg - bump pkg version - say gains two params to manage bubble specs
It seems like the default way of specifying animals forces speech bubbles within the elements of the
animals
object, causing the output to be less pretty compared to the command line alternative.vs
This can be solved by giving the responsibility of creating the speech bubble to
say
function. Would this be a welcome change? I can look into it if I find some spare time.The text was updated successfully, but these errors were encountered: