camcorder icon indicating copy to clipboard operation
camcorder copied to clipboard

gg_record for code

Open gkaramanis opened this issue 4 years ago • 8 comments

I saw @Z3tt mentioning flipbook on Slack and it just hit me: I’ve written a couple of functions to save the code from the Source pane as a comment in the png file or as a text file.

We could have an option to save the code in output formats that support comments/metadata or as text files alongside the output files.

If you think it sounds interesting and it’s a good fit for camcorder, I’ll gladly share the code!

gkaramanis avatar Aug 21 '20 16:08 gkaramanis

Open a branch with the code!

thebioengineer avatar Aug 21 '20 16:08 thebioengineer

Haha, actually had the same idea but didn't wanted to push it too far 😋 I like the idea as long as we do not compete too much with Gina, it's a great project!

z3tt avatar Aug 21 '20 16:08 z3tt

For sure, {flipbook} has found a following and is a super cool project and we don't want to just re-implement their work. we could maybe reach out and see about how camcorder and flipbook could work together? a final slide that contains a gif of the process could be cool?

thebioengineer avatar Aug 21 '20 16:08 thebioengineer

I can see how it's similar in some ways, the use case I had in mind was going back to a plot and see the code for it. Anyway, we'll see how it turns out and we can decide then!

gkaramanis avatar Aug 21 '20 18:08 gkaramanis

I think in general it sounds very interesting, especially if it would work not only with code but any type of text output. I directly have gifs in mind that show how to improve a plot with notes next to it what and why to improve.

z3tt avatar Aug 22 '20 10:08 z3tt

@gkaramanis could you maybe link to the code? One thought I have right now is make use of trelliscope where the code and plot could be viewed side by side, as well as all images. https://github.com/hafen/trelliscopejs

thebioengineer avatar Aug 23 '20 06:08 thebioengineer

OK, I've sent you both an invite to the repo. Didn't know of trelliscope, the idea sounds interesting!

gkaramanis avatar Aug 23 '20 06:08 gkaramanis

In general this would seem difficult/impossible to work fully generally. Plots can be built up over multiple statements and multiple chunks of code. You can take the plot object itself and try and reverse engineer the code a la https://github.com/coolbutuseless/ggreverse but then this also would fail for more general plots, like the output of patchwork

TylerGrantSmith avatar Sep 11 '20 21:09 TylerGrantSmith