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

chore: 优化 github_svg 生成,从每年第一天开始 #765

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

kingcanfish
Copy link
Contributor

github 的 年度图已经是从第一天开始绘画,会跳过第一周但是非本年的日子, 如下图
image

本次修改从 向上一年补齐格子的逻辑改成了跳过格子,从每年的第一天开始绘画
修改前:
image

修改后:
image

Copy link

vercel bot commented Jan 7, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
running-page ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 13, 2025 8:24am

@yihong0618
Copy link
Owner

Thanks will take a look

@yihong0618 yihong0618 requested review from ben-29 and NaturezzZ January 7, 2025 12:45
Copy link
Owner

@yihong0618 yihong0618 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code LGTM
but I think it will affect our users,
can we make it configurable? and set it default to True

@kingcanfish
Copy link
Contributor Author

kingcanfish commented Jan 7, 2025

code LGTM but I think it will affect our users, can we make it configurable? and set it default to True

thanks for your review

how do you think that add an argument --github-style , value: align-firstday (default) for the new style, align-monday for the old style

python run_page/gen_svg.py --from-db --title "${{ env.TITLE }}" --type github ----github-style align-firstday --athlete "${{ env.ATHLETE }}" --special-distance 10 --special-distance2 20 --special-color yellow --special-color2 red --output assets/github.svg --use-localtime --min-distance 0.5

python run_page/gen_svg.py --from-db --title "${{ env.TITLE }}" --type github --github-style align-monday --athlete "${{ env.ATHLETE }}" --special-distance 10 --special-distance2 20 --special-color yellow --special-color2 red --output assets/github.svg --use-localtime --min-distance 0.5

If it makes sense, I will improve the code when I have time later.

@yihong0618
Copy link
Owner

make sense and default is True is OK.

@NaturezzZ
Copy link
Collaborator

LGTM. @me for approval when the argument is ok.

@kingcanfish
Copy link
Contributor Author

please review this code again @yihong0618 @NaturezzZ

Copy link
Collaborator

@ben-29 ben-29 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Owner

@yihong0618 yihong0618 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much

@yihong0618 yihong0618 merged commit 9a123ff into yihong0618:master Jan 13, 2025
4 checks passed
jiantian99 pushed a commit to jiantian99/running_page that referenced this pull request Jan 16, 2025
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.

4 participants