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

Add gifs to the README to illustrate functionality #289

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

Conversation

ericphanson
Copy link

@ericphanson ericphanson commented Dec 11, 2023

I used ProgressMeter as a proving ground for my new package Asciicast.jl which intends to make it easy and maintainable to have animated examples in github READMEs. (The package is not registered, but will be in a couple days).

This PR turns some of the README examples into Asciicast blocks, by adding the syntax {cast = "true"} to some of the julia code blocks. Then Asciicast.cast_readme(ProgressMeter) executes them (using the same sandboxes as Documenter) and saves the results as gifs (using agg) to the assets directory, then uses pandoc to insert the image links back into the README.

This has the benefit of being easily maintainable, but the drawback that it uses pandoc's opinionated github-flavored markdown formatting, which causes a somewhat large diff here.

I am not sure if this is desired here, but since I was trying out Asciicast with ProgressMeter anyway, I figured I'd make a PR.

@timholy
Copy link
Owner

timholy commented May 30, 2024

This is pretty cool! I think it's a clear win in terms of usability for newbies. I guess one question is whether this will increase the package size: do the assets get downloaded when you install the package?

@giordano
Copy link

giordano commented May 30, 2024

do the assets get downloaded when you install the package?

Yes, a snapshot of the entire repository is installed, but all the images in this PR are less than 100 kB each (Edit: apart from one, which is 225 kB 😅).

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