-
Notifications
You must be signed in to change notification settings - Fork 15
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
CI: Show useful data about token URLs #192
base: master
Are you sure you want to change the base?
Conversation
The upstream issue is resolved and |
# Extract domains from URLs | remove blank lines | sort | count and list | sort descending | ||
run: | | ||
echo "📊 **Image Hosting Statistics**" >> $GITHUB_STEP_SUMMARY | ||
awk -F/ '{print $3}' lychee/out.md | grep . | sort | uniq -c | sort -nr >> $GITHUB_STEP_SUMMARY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is grep . here? is there empty lines? why does it run sort twice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is grep . here? is there empty lines?
There used to be empty lines in the output when we had token or sets added without image links. This is currently not the case.
Since we do not validate for empty/missing links that could happen again.
But I can also remove it.
Am actually not sure if empty lines would even mess with the result or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess the comment on it could be more explicit, it takes the third column from the file, removes empty lines, sorts and then counts the duplicates, listing them with their count before the url, then sorts again but based on the number that represents the amount of duplicates descending.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the wording of the comment.
The sorting needs to be split because first it's sorting to bring same domain names next to reach other for counting to work. Only after combining the entries and adding quantity numbers it can be sorted descending.
We automatically check if imagine links are accessible/available.
This adds some more insights and helps with understanding the file. It gives us a little overview of its content and our sources/dependencies, also highlighting doubled links (which we eliminated by now).
Result:
https://github.com/Cockatrice/Magic-Token/actions/runs/10619612692/attempts/1#summary-29437582199
Screenshot: