Skip to content

Conversation

@joshuarayton
Copy link
Contributor

Changes to how the logo is made.

There is an external invocation to sed. I've left a pure bash implementation as a comment but I wasn't sure how to implement the regular expressions in pure bash (I think it's possible with something like =~ regex; $BASH_REMATCH but that seems excessive). The pure bash has the same visual output, but outputs more ANSI escape sequences which it isn't good to stream more bytes in general and it significantly increases build time on my system. There are external programs used in website/make-video-pages, so not sure how big a deal it is.

I added the colours used in the logo to website/theme although I'm not sure if the colours are strictly part of your theme for the website. Also I copied the escape sequences from the current implementation of make-logo but I think the red can be shortened.

I also have a question about the licensing inside the file. When making a change, do I update the date? Do I attribute co-author? Not sure.

@bahamas10
Copy link
Owner

This is great! I love the idea of making make-logo something easier to maintain than a large printf statement - in my video where I went over how I made tho logo even I was surprised to see that's what it was haha.

I vote against using sed here - not because i'm fully against using external tools in general, just because it's not consistent across version of sed. For example, your code unmodified when run on my mac results in:

Screenshot 2025-10-24 at 4 48 12 PM

Since it seems to expect the GNU variant of sed - if I change it to gsed which I've installed manually on my machine it works as expected though.

By contrast, the pure bash solution works fine - but I agree that it is costly in terms of size. If I update your code to use the pure bash solution we get:

Screenshot 2025-10-24 at 4 49 33 PM

Which, 2.6kb of data just for the logo seems crazy high compared to the 1k it is currently (still high? I haven't dug too far into it tbh).


So all that being said, here's what I think:

  1. I'll spend some time trying to get the pure-bash solution to work using the regex you have in the sed version.
  2. I agree that these colors aren't technically part of the theme - so I'd be ok with the colors for the logo being defined inside make-logo and not updating the theme file at all.
  3. Great question about the license - I've written software for a while but was never getting too many PRs so I don't have a good answer for updating the license stuff. I'm open to suggestions. I like having the date stamp of when the file was created but adding a section with your name + current date or year to the bottom that people can append to might be useful? idk. what do you think?

@bahamas10
Copy link
Owner

Ok - I have a solution and it's actually pretty-fast... it's a bash version of the sed you had - let me know if this works for you:

. ./theme || exit

readarray -t LOGO << EOF
AA  AA  AAAA     AAA   AAAAA
CC  CC CC  BB  ACB BCA CC  CC
 BCCB   BBBBCA CCAAACC CCAACB
  CC   BCAAACB CC   CC CC
DDDDDDDDDDDDDDDDDDDDDDDDDDDDD
EEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EOF

shopt -s extglob

for line in "${LOGO[@]}"; do
        line=${line//+([AB])/$COLOR5&$RST}
        line=${line//+(C)/$COLOR6&$RST}
        line=${line//+(D)/$COLOR7&$RST}
        line=${line//+(E)/$COLOR8&$RST}

        line=${line//A/▄}
        line=${line//B/▀}
        line=${line//C/ }
        line=${line//D/▄}
        line=${line//E/▄}
        echo "$line"
done

I think this (plus moving the colors into this file as separate from theme) will work

@joshuarayton
Copy link
Contributor Author

joshuarayton commented Nov 3, 2025

Thank you, looks good to me. I've updated the commit for this more efficient pure bash implementation. Minor changes include using \e instead of \x1b, shortening $COLOR7, opting for +(A|B) instead of +([AB]), and replacing ADE in 1 substitution.

About the licensing, I'm really not sure. I only mentioned it because after my initial changes I had changed the entire file yet you were still "author", now the latest change is mostly your implementation. It's a blurry line to who's the original author of parts of code because you made the original logo, I made the regular expressions but they each overlap in our different implementations. I think it's fine to keep it as is, I was just wondering if you had any insight into what's more "correct".

@fearphage
Copy link
Contributor

FYI there's no need to convert this to an array first. while loops will happily read line-by-line:

while IFS= read -r line; do
        line=${line//+(A|B)/$COLOR5&$RST}
        line=${line//+(C)/$COLOR6&$RST}
        line=${line//+(D)/$COLOR7&$RST}
        line=${line//+(E)/$COLOR8&$RST}

        line=${line//[ADE]/▄}
        line=${line//B/▀}
        line=${line//C/ }

        echo "$line"
done << EOF
AA  AA  AAAA     AAA   AAAAA
CC  CC CC  BB  ACB BCA CC  CC
 BCCB   BBBBCA CCAAACC CCAACB
  CC   BCAAACB CC   CC CC
DDDDDDDDDDDDDDDDDDDDDDDDDDDDD
EEEEEEEEEEEEEEEEEEEEEEEEEEEEE
EOF

@bahamas10 bahamas10 merged commit 9c7a99d into bahamas10:main Jan 13, 2026
@bahamas10
Copy link
Owner

thank you @joshuarayton! I've merged this change as-is.

I've also done a lot of thinking about how I handle the licensing / attribution blob in the codebase and i came to this solution:

so basically, i've added a "contributors" list to to the bottom of the attribution block for people to (if they want) add they names to!

I wasn't sure what information you may/may not want there so feel free to make a PR with what you want in the contributors list (full name, username only, email optionally - whatever you want)... i think this hopefully will make it clear for people making changes going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants