markdown-clipper
markdown-clipper copied to clipboard
Improvement - Images & \img
It would be awesome if this could also save images to an \img
folder within the same directory as the markdown so that the markdown file can be previewed with images.
Do I need to use a specific viewer to view the resulting .md file complete with images offline in chrome? When converting a site I see reference to an image under my chrome extension /img folder that is not loading in preview within chrome or where I prefer, e.g., vscode (outside of chrome). I want to harvest and save the images instead to the same folder where the .md file is being generated, so it's ready for offline preview. In an example the .md renders the first image as 
I can't find the image at the chrome-extension/ location.
In my example I know that the site's root https://coding-bootcamps.com/ is what's being called so I can replace text to get things working, and I can curl download the image files to place them into an offline folder more efficiently.
Ideally the image will directly save from the HTML on the site so that it would handle any CDN.
I see your problem with the failed image load.
Regarding your request of automatically downloading the images for offline preview: I like the idea, but I am not sure, if it is doable in a good way by the extension. To my current knowledge, the extension can NOT download files in the background. Therefore, the extension would have to ask for every image, where it should be saved (correct me if I am wrong on this, I will dig deeper into this when I have time). Maybe the extension provides an option to save all images additionally, although this would require the user to handle the save confirmation dialog n times.
As for now, it would be best, if the image path inside the md is the path to the web resource. It shouldn't be a problem, to write a local script and search for all urls ending with .jpeg|png, curl the images and replace the web urls with relative paths. I will fix this when I have some time.