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

CI: Show useful data about token URLs #192

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

CI: Show useful data about token URLs #192

wants to merge 12 commits into from

Conversation

tooomm
Copy link
Member

@tooomm tooomm commented Dec 4, 2022

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:

March 2024 August 2024

@ZeldaZach ZeldaZach closed this Nov 1, 2023
@tooomm tooomm reopened this Mar 16, 2024
@tooomm tooomm changed the title Show some data about the token files CI: Show useful data about token URLs Mar 16, 2024
@tooomm
Copy link
Member Author

tooomm commented Mar 16, 2024

The upstream issue is resolved and dump works as expected now.

@tooomm tooomm marked this pull request as ready for review March 16, 2024 18:14
# 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
Copy link
Member

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?

Copy link
Member Author

@tooomm tooomm Mar 27, 2024

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.


why does it run sort twice?

You mean sort descending directly before count + list?
I did simply not think about combining that.

Copy link
Member

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.

Copy link
Member Author

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.

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