-
-
Notifications
You must be signed in to change notification settings - Fork 78
logo #18
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
logo #18
Conversation
|
Ok - I have a solution and it's actually pretty-fast... it's a bash version of the . ./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"
doneI think this (plus moving the colors into this file as separate from |
|
Thank you, looks good to me. I've updated the commit for this more efficient pure bash implementation. Minor changes include using 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". |
|
FYI there's no need to convert this to an array first. 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 |
|
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. |


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_REMATCHbut 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 inwebsite/make-video-pages, so not sure how big a deal it is.I added the colours used in the logo to
website/themealthough 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 ofmake-logobut 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.