Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

Convert website to GIF #25

Closed
7flash opened this issue Jun 7, 2022 · 11 comments · Fixed by #28
Closed

Convert website to GIF #25

7flash opened this issue Jun 7, 2022 · 11 comments · Fixed by #28
Assignees
Labels
enhancement New feature or request

Comments

@7flash
Copy link

7flash commented Jun 7, 2022

That would be incredibly useful for learning experience.. consider converting some framework documentation.. then see it looping it in background.. while coding..

In this example I had to manually capture all screenshots from StencilJS documentation.. then recorded myself sliding the pictures..

twelve

@Flowko
Copy link
Owner

Flowko commented Jun 17, 2022

thanks for checking it out, and sorry for the late reply,

so let me see if i got this right, u mean like pass urls and convert them into screenshots/gif, or just one page that will be converted into a gif ?

@7flash
Copy link
Author

7flash commented Jun 18, 2022

Ideally a root URL is passed.. and then all linked pages are fetched.. and glued up into a gif..

@Flowko
Copy link
Owner

Flowko commented Jun 18, 2022

hmm this might be tricky to get working, to get all linked pages insied the root URL, will resolve in enxepected results, but i think i'll add the option to let the user add multiple URLs and they'll be fetched and converted into a GIf, sounds good ?

@7flash
Copy link
Author

7flash commented Jun 18, 2022

That would be perfect.. then I could run a script on the documentation root page.. then copy the list of links into app..

image

@7flash
Copy link
Author

7flash commented Jun 18, 2022

excalidraw/excalidraw#5299 once I have GIFs.. I would place them into my excalidraw document.. a dream workspace..

@7flash
Copy link
Author

7flash commented Jun 18, 2022

In the context of this github repository.. I would have extracted links to all code files.. and have pictures generated.. to see this whole repository at once.. that would be already awesome.. just to convert all these links into pictures.. no GIFS..

Example code to extract links:

links = [];
codeFilePrefix = document.location.href.replace(document.location.origin, '')

for (const link of document.querySelectorAll('.Details a.Link--primary')) {
    if (link.getAttribute('href').replace('blob', 'tree').startsWith(codeFilePrefix)) {
        links.push(link.getAttribute('href'));
    };
};

image

@Flowko
Copy link
Owner

Flowko commented Jun 18, 2022

okay got it,i'll try to add this feature as soon as i have time to do so 🙏

@Flowko Flowko self-assigned this Jun 18, 2022
@Flowko Flowko added the enhancement New feature or request label Jun 18, 2022
@Flowko Flowko linked a pull request Jun 18, 2022 that will close this issue
@Flowko
Copy link
Owner

Flowko commented Jun 18, 2022

so here how its going to be, and i would like ur feedback on this, before i close it, if u have any.
Website-Shot _ Home

after u add the links and press the button, it'll download a zip file automaticly
the zip file will contain the screenshots, like this:
image

@Flowko Flowko reopened this Jun 19, 2022
@7flash
Copy link
Author

7flash commented Jun 19, 2022

Ideally looking for a way to download all screenshots of code files from repository.. organized into directories following the original structure.. then I can make a script to generate excalidraw document showing all the code.. following the nesting structure of directories..

@Flowko
Copy link
Owner

Flowko commented Jun 19, 2022

Ill try to add an option to get the screenshots inside the same folder structure, but the getting urls process will have to be manual, as shown in the Gif above

@Flowko
Copy link
Owner

Flowko commented Jun 19, 2022

added this

image

will generate folders with the same url structure

screenshots (19).zip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants