automatically generate screenshots #101
Labels
No labels
🐛 bug
DO THE THING >:(
blocked
dependencies
k3s
kind
openbao
question
secrets
wontfix
✨ enhancement
🌱good first issue
📓documentation
📕kyverno
🔐 Bitwarden
🙋help wanted
🦩 MinIO
🧸 🧸 Duplicate
🩹 Bug Fix
🪠 CICD
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
small-hack/smol-k8s-lab#101
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the feature you'd like, and why
I'd like a way to automatically generate screenshots for the CLI help, as well as all the TUI screens here:
https://github.com/small-hack/smol-k8s-lab/tree/main/docs/images/screenshots
We can generate the screenshots with rich and textual. We have a hidden feature in smol-k8s-lab for rich here:
small-hack/smol-k8s-lab@f753dda743/smol_k8s_lab/utils/rich_cli/help_text.py (L16)and here:
small-hack/smol-k8s-lab@f753dda743/smol_k8s_lab/utils/rich_cli/help_text.py (L130-L132)We should expose that via the cli, and also add textual screenshots in there as well, as right now, I actually manually generate each of those screenshots and with the amount of screens we support, this is getting a bit too time consuming.
Ran into a minor snag where the screenshot file name is not predictable, so I've opened https://github.com/Textualize/textual/issues/3795 to kindly ask if this is a feature that can be implemented. In the meantime, I think I can only automate the
smol-k8s-lab --helpscreenshot since rich already provides a way to name the screenshot.Created an env var to set to generate the
--helpdocs:small-hack/smol-k8s-lab@f61a92d51a/smol_k8s_lab/utils/rich_cli/help_text.py (L18)davep linked me their useful blog post:
https://blog.davep.org/2023/07/03/making-my-github-banner.html
I've been using it to write a script for our ci jobs:
https://github.com/small-hack/smol-k8s-lab/blob/main/smol_k8s_lab/tui/make_screenshots.py
Also learned about the testing guide 🤯 very useful and makes testing less scary :
https://textual.textualize.io/guide/testing/#snapshot-testing