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

download images to git #35

Open
milahu opened this issue Jul 10, 2022 · 1 comment
Open

download images to git #35

milahu opened this issue Jul 10, 2022 · 1 comment

Comments

@milahu
Copy link
Contributor

milahu commented Jul 10, 2022

currently, images have no special handling
gh2md simply uses the original image source

ideally, the user can enable image scraping

  • download the images to git
  • rewrite the image urls to local paths

also allow special handling of "large" images

  • dont download, keep original url (cache the url somewhere to avoid re-downloading)
  • compress large JPEGs
  • reduce large GIFs to the first frame image
  • reduce large video files to a thumbnail image
  • allow storing large files in a separate git branch, to keep the main branch small
  • allow storing large files in git-lfs (Git Large File Storage)

example avatar

<img src="https://avatars.githubusercontent.com/u/12958815?v=4" width="50">

example attachment

<img src="https://user-images.githubusercontent.com/12958815/177718602-943af214-24be-4209-82cc-18e6fa5d04c1.jpg" title="Mephistopheles and Margaretta  19th-century wooden double sculpture" width="10%">

dupe #28 says "completed" but its not

@pattacini
Copy link

Hi there 👋🏻

First up, this is a nice tool.

Just wanted to share with you all a ruby script I had to write recently to download the images, which can be used in conjunction with gh2md.

This is particularly useful for private repositories, as GH has raised the security bar for accessing the assets.

github.zip

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

No branches or pull requests

2 participants