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

GIF exports #547

Open
V1NAY8 opened this issue Oct 13, 2018 · 13 comments
Open

GIF exports #547

V1NAY8 opened this issue Oct 13, 2018 · 13 comments

Comments

@V1NAY8
Copy link

V1NAY8 commented Oct 13, 2018

Expected Behavior

An option to make GIF.
Example : For any repo that can show their work effectively in their README file such as installation instructions.

Actual Behavior

Browser:
Code Snippet (If Applicable)
@V1NAY8 V1NAY8 changed the title Integration of GIF Feature Request: Integration of GIF Oct 13, 2018
@mfix22
Copy link
Contributor

mfix22 commented Oct 24, 2018

@V1NAY8 have you tried https://getkap.co/ for quickly creating a GIF? I don't think it would be feasible to create one from the browser, unless you have ideas 🙂

@martinfrancois
Copy link
Contributor

What would the advantage of a gif be compared to a png? A png can just as well be used in a README of a repo, or do you mean an animated gif? If so, what would you animate?

@V1NAY8
Copy link
Author

V1NAY8 commented Jan 3, 2019

  • Just that carbon can be used for styling code. I wanted it also to behave as styling for Terminal or any UI.
  • Animating the Instructions will always help.

Example for Code: If the same is done in Carbon It looks Beautiful

  • These are nothing but a multiple output images from terminal.(If we could copy the output from terminal and paste it here and combine them). Just an Idea.
    gif
  • png can be used to demonstrate just the code itself. But when it comes to gif. We can demonstrate multiple commands or instructions in the Documentation of a Repo.

@martinfrancois
Copy link
Contributor

Ah okay, I see what you mean. Do you mean something like https://asciinema.org ? If so, how should it be different?

@V1NAY8
Copy link
Author

V1NAY8 commented Jan 4, 2019

  • Oh yeah, That's such a beautiful one. As of now, that's the idea.
  • The above is present only for terminal via the installation of a package.
  • Thinking whether we can perform the same in Browser. https://getkap.co/ is the one suggested above, but its available for MacOs only.
    The main idea is to use Carbon to create a beautiful environment for sharing code, along with these integrations

@merpheus-dev
Copy link

merpheus-dev commented Jun 14, 2019

I'd like to add another perspective to GIF support. I make tutorial videos and I want them to be pretty. So, I'm thinking about using carbon when I show a piece of code.

Although, having a window popping up animation would be great on that background which will produce either a GIF or a video file.
I think that can be a pretty good and needed enhancement.

@JessicaSachs
Copy link

JessicaSachs commented May 3, 2020

I did a poor-mans approach to this on a fork carbon#feat/record-terminal-sesh using gif.js

There's a record button next to the settings. Press that and then all the keystrokes will be recorded and then "replayed" once you stop recording.

It's not polished. There are bugs and it is slow. It worked for my situation and lets me make pretty README gifs and twitter gifs, so I'm pretty stoked.

If this were to get polished, the next steps would be:

  1. Improve speed (reevaluate approach of using setState)
  2. Fix mixed-dimensions problem
  3. Support highlighted lines
  4. Add preview/save step separate from recording step
  5. Add menu for gif options

The example below has been compressed. It was 11MB originally and then I went to ezgif.com and resized it so GH would lemme embed it.

carbon-typing-demo-resize

@repo-ranger repo-ranger bot deleted a comment from mfix22 May 4, 2020
@mfix22
Copy link
Contributor

mfix22 commented May 4, 2020

(Previous comment got deleted 😞)

@JessicaSachs this is amazing! 🎉 So cool that you got this working! I had never heard of gif.js before

If you would be up for it, I would absolutely love to help integrate this work into Carbon itself on my nights and weekends. Also happy to consult asynchronously if that works better 🙂I totally understand if you don't have the bandwidth — even if you pushed up a WIP PR rebased on master, that would be incredibly helpful.

Finally, FWIW, I would be more than happy to merge this with only a working record feature. No need for line-highlighting or menu options for an initial version, IMO.

I 🖤 the Carbon community!

@mfix22 mfix22 changed the title Feature Request: Integration of GIF GIF exports May 4, 2020
@mfix22 mfix22 pinned this issue May 4, 2020
@simpleneeraj
Copy link

Carbon.now.sh use dom-to-image library to generate images and svg from any div (dom) , unfortunately gif export is not possible with this library.
By @neerajcodes

@mfix22
Copy link
Contributor

mfix22 commented Aug 14, 2021

Carbon.now.sh use dom-to-image library to generate images and svg from any div (dom) , unfortunately gif export is not possible with this library.

This is true, however as @JessicaSachs demonstrated above, it is possible to combine this with a GIF library to create them. I haven't had time to implement this feature, though.

@JessicaSachs
Copy link

@mfix22 if I rebased, would you be able to take it over the line?

@mfix22
Copy link
Contributor

mfix22 commented Aug 21, 2021

@mfix22 if I rebased, would you be able to take it over the line?

@JessicaSachs unfortunately, I don't have much time for feature development at the moment 😞 If you rebased and pushed up a PR, that could be good so I can work on it steadily in the background, though.

@javydekoning
Copy link

This is an interesting approach: https://www.animate-code.com/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants