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 support for timelapses with more than 2 frames #7

Merged
merged 5 commits into from
Dec 22, 2024

Conversation

iandees
Copy link
Contributor

@iandees iandees commented Dec 22, 2024

Fixes #1

This adds the ability to specify a number of frames when running the main script. The minimum and default is "2", which replicates the previous behavior. Specifying something larger than 2 means that it will create multiple renderings between the start and end times, using those as frames when generating the output GIF.

@amandasaurus
Copy link
Owner

This is great! (As you can see) people have been asking for this for years, This could make things much better.

I don't know about the Jupyter notebaook stuff, I trust you there. Likewise I'm unsure about Docker. However you have replaced something that look “standard” with a random other domain, so I'm a little cautious 🤨🤔🤔🤔. Is that OK? Is this to work on mac? Isn't Docker supposed to make everything work everywhere? 🤣 (I don't know anything about docker). Maybe @gedankenstuecke can comment.

Your inline python code to calculate differences is fine. But maybe I'll replace it with pure Bash someday. Alas I think I know how to do that in bash. 😂😭

Copy link
Collaborator

@gedankenstuecke gedankenstuecke left a comment

Choose a reason for hiding this comment

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

That's really cool, thanks for putting this together! I tried it locally already and it works really well!

For my own understanding to see if I missed it: It only creates the gifs using >2 frames, right? I.e. the PNG stay at a split screen between the start & end date?

Otherwise my only question is about the changed image too (see inline comment)

Dockerfile Outdated Show resolved Hide resolved
@iandees
Copy link
Contributor Author

iandees commented Dec 22, 2024

I don't know about the Jupyter notebaook stuff, I trust you there.

Most of the Jupyter notebook changes seem to be from removing whitespace at the end of lines that my editor did on its own.

The only substantive change I made was to add a new field for the number of frames and then pass the value of that into the command line in the next section.

Your inline python code to calculate differences is fine. But maybe I'll replace it with pure Bash someday. Alas I think I know how to do that in bash.

I spent a bit of time experimenting with a bash version of doing this and didn't get it to work. I'd love to see what you come up with.

Copy link
Collaborator

@gedankenstuecke gedankenstuecke left a comment

Choose a reason for hiding this comment

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

LGTM!

Thanks so much for this again, and also for refactoring parts of the Dockerfile 🙏

I'll merge this in and will refactoring #8 accordingly!

@gedankenstuecke gedankenstuecke merged commit 6ebd631 into amandasaurus:main Dec 22, 2024
@iandees
Copy link
Contributor Author

iandees commented Dec 22, 2024

I should note that I used this to generate the animation in https://social.modest.com/@ian/113694595676182175, if you want to see the output.

@amandasaurus
Copy link
Owner

amandasaurus commented Dec 22, 2024 via email

@amandasaurus
Copy link
Owner

amandasaurus commented Dec 22, 2024 via email

@gedankenstuecke
Copy link
Collaborator

Yup, I saw that. It's good to clean things up now and then.

Also Jupyter notebooks are notoriously hard to diff 🙈

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.

Timelapse feature
4 participants