Skip to content
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

Apple WWDC 2020 logo variant #122

Merged
merged 2 commits into from Jun 25, 2023
Merged

Conversation

twang817
Copy link

@twang817 twang817 commented Nov 8, 2022

Description

Adds Apple's WWDC 2020 logo as a variant.

Types of changes :

  • Bug fix (non-breaking change which fixes an issue)
  • Typo / style fix (non-breaking change which improves readability)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist :

  • [IF NEEDED] I have updated the README.md file accordingly ;
  • [IF NEEDED] I have updated the test cases (which pass) accordingly ;
  • [IF BREAKING] This pull request targets next Archey version branch ;
  • My changes looks good ;
  • I agree that my code may be modified in the future ;
  • My code follows the code style of this project (PEP8).

image

@HorlogeSkynet HorlogeSkynet self-requested a review November 8, 2022 20:43
@HorlogeSkynet HorlogeSkynet added the enhancement ⬆️ Implements a new feature, fixes or improves existing ones label Nov 8, 2022
@HorlogeSkynet HorlogeSkynet added this to IN PROGRESS in OS, Distributions & Hardware via automation Nov 8, 2022
archey/output.py Outdated Show resolved Hide resolved
@ingrinder
Copy link
Collaborator

I didn't draw this. I came across the wwdc logo and copied it from there.

Are you sure we can add this logo then? I'm not 100% sure on the intricacies of licensing here, but I would surmise that we can't relicense the work made by Apple... If it were recreated in the same style, I would suppose that might count as an "original" work.

@twang817
Copy link
Author

I didn't draw this. I came across the wwdc logo and copied it from there.

Are you sure we can add this logo then? I'm not 100% sure on the intricacies of licensing here, but I would surmise that we can't relicense the work made by Apple... If it were recreated in the same style, I would suppose that might count as an "original" work.

I honestly didn't give it anywhere near this much thought. The picture isn't exactly the same. I used a random generator for the internal symbols and randomized the colors.

That being said, if there are issues, I would wonder what the legality of any of the logos/trademarks are. I suspect that there isn't anyone that's going to get upset with this use case.

If the size is a concern, I'd happily share my Python code that generates the ascii file. It's stupid code, done in a hurry. Perhaps it could be worked into something that generates and caches the logo on first load.

As for shrinking it, I really don't have a single artistic bone in my body. Perhaps someone else will come along and redo this in a smaller size.

Really, I made this change for my own use. I've always liked this graphic, and I thought I'd share. I'm not trying to sound stand-offish, but at this point, it's entirely up to you.

@HorlogeSkynet
Copy link
Owner

I'll try to work on this within some days 👍

@HorlogeSkynet
Copy link
Owner

HorlogeSkynet commented Nov 14, 2022

So I caught a glimpse of it, my points below :

  • License should not be an issue here (partly-related : Possible license violation? dylanaraps/neofetch#170).
    But that raised a question though, under which license the Reddit OP released this ? 😅
  • This logo is definitely too big ;
  • The Reddit thread had been started 6 years ago : is this really the WWDC 2020 logo ?
  • If there are some unmatched {, please prefer escaping them ({{) 😉
  • Would your script be able to output something like ~20/30 lines high ? "Resolution" wouldn't look clean as yours but maybe it can be a good trade-off ?

Thanks again, bye 🙏

@twang817
Copy link
Author

twang817 commented Nov 14, 2022

I've uploaded the code I used to generate this. I wrote this some time ago, and revisited it today.

A couple points:

  1. It uses ply. A bit crazy, but I must have been in a lex-yacc mood that day.
  2. It generates from an existing logo. It figures out the edges to retain shape and then figures out how to follow a word/non-word pattern and randomize the symbols, words, and colors.
  3. It does have a stretch built in that can stretch it horizontally. I think I used this to accommodate for fonts that may be skinnier than they are tall.

I don't know how useful this is to your requirements and/or goals.

You can find the gist here:
https://gist.github.com/twang817/30dacccd1c9a29fe159157027e9c462c

@HorlogeSkynet
Copy link
Owner

Hey @twang817, sorry for the delay.

So I've checked your gist, see below my points/suggestions :

  • The logo height seems OK (it is pretty "tall" according to others, but it is not very important)
  • Do you think you can (with your script of course) colorize tokens using the {c[N]} syntax (literally 6 bytes in the end source code) instead of explicit control characters (i.e. \033[...) full format ?
  • Of course, you can provision a (Python) list COLORS_WWDC containing all the colors that are needed.
  • If it's still "too big", maybe we can limit coloration to a subset of tokens (words and specific characters tokens) ?

Thanks again, bye 👋

@ingrinder
Copy link
Collaborator

ingrinder commented Jun 18, 2023

I noticed this has been around for a while so I've had a bit of a go at addressing some of the above concerns.

I forked the gist with a few small changes to get it to output an Archey-style logo and dirtily remove redundant colour codes - https://gist.github.com/ingrinder/9e68f7bd1e2d8c9d86a0a5a594a64e1d

I also made some tentative changes to allow the specific colours to be used by adding 256-colour support, see the logo/apple_wwdc20 branch.

image

It's still "big", at 8K and 36 lines, but it looks fairly decent to me despite the size? I suppose the big empty space satisfies the Apple aesthetic...! I wouldn't really know how to start removing lines from the logo without redrawing the whole input one by hand. @HorlogeSkynet if you think this is viable, perhaps I could write some tests and @twang817 could pull it into this PR?

@HorlogeSkynet
Copy link
Owner

Thanks @ingrinder for the hard work !!! I'm ready to review a PR for your branch 🙏

@HorlogeSkynet HorlogeSkynet added this to the v4.14.2.0 milestone Jun 19, 2023
@ingrinder
Copy link
Collaborator

@twang817 I pushed onto the end of your fork, I hope that's okay - it seemed easier than making a separate PR, and I believe you won't lose credit in the commit once it's merged that way.

@HorlogeSkynet I think this is ready for review, I added tests and squashed together some of my commits. Quick overview of changes:

  • Splits Colors class into Style base class for general formatting stuff (possibility for extension in future with other attributes)
  • Adds Colors8Bit class extending Style to allow 256 colour mode text to be used (as in this PR)
  • Adds modified WWDC20 logo in "Archey style" from gist linked above
  • Unit tests for new classes

Let me know what you think 👍

archey/colors.py Outdated Show resolved Hide resolved
ingrinder and others added 2 commits June 25, 2023 13:20
Splits `Colors` into a base class `Style` and a subclass `Colors`.
Adds a new subclass `Colors8Bit`, which adds support for 256 colours
(8-bit) mode.
@ingrinder
Copy link
Collaborator

@HorlogeSkynet Rebased on master and squashed into 2 commits - I removed the AttributeError check as you said. Should be good to merge if you're happy 🎉

@HorlogeSkynet HorlogeSkynet merged commit c522a92 into HorlogeSkynet:master Jun 25, 2023
12 checks passed
OS, Distributions & Hardware automation moved this from IN PROGRESS to DONE Jun 25, 2023
@HorlogeSkynet
Copy link
Owner

Many thanks @ingrinder 🙏
@twang817 This will be released in the next Archey version, optimistically before the end of July.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement ⬆️ Implements a new feature, fixes or improves existing ones
Development

Successfully merging this pull request may close these issues.

None yet

3 participants