Comments (10)
This is something I have thought about. As discussed in issue #21 I'm unable to specify a download folder, and can't pick where I write things to. I can download multiple files at once, but they'll either all get dumped to the downloads folder or display a large number of "save as" modals...
My thoughts to get around this are to potentially pack all the images into a zip file, so there's only one download. But it needs more research and thought put into it.
Thanks for the suggestion, though! And the insights about having a prefix for the image name — that's a good idea 💡
from markdownload.
Let me also share this app with you: https://optimage.app so you can see what it can do. It will be amazing to optimize images after downloading them, this feature will be consider as luxury feature :D
The code is open-source and available to use as python module.
https://github.com/sk-/optimage
from markdownload.
@deathau check out https://addons.mozilla.org/en-US/firefox/addon/maoxian-web-clipper/. They are able to bypass the save as locations with some manual setup by the user.
It also creates folders within the downloads folder by default. My thinking would be to do something similar to a browsers default Save Page As... functionality. Create a folder with a name matched to the name of the download file and use relative links to the images within that folder. I've found that to be a common pattern for apps that export files to markdown.
Then he end user could setup something like https://github.com/tfeldmann/organize or Hazel to move the file and folder to the desired location and optimize images. I'd be happy to write some docs on how to do it.
from markdownload.
I was still tossing up between zipping images and having a subfolder. Thanks for your input @montemartin. Thinking about it more, the subfolder thing is pretty standard (even when you just SaveAs a HTML page). That's probably the route I'll take.
from markdownload.
Also, organize looks pretty cool. If you do end up writing up a guide, I'd be happy to link it in my extension's description
from markdownload.
from markdownload.
I've committed this functionality now: There's an option to download images, and a "prefix" for the images (which can use the same template substitutions as title/frontmatter/backmatter).
If you use a '/' in your prefix, that will create a subfolder when you download. So by default you could have {title}/image_
and all images will get the image_
prefix in a {title}
subfolder. This subfolder is relative to wherever you choose to download the .md file
from markdownload.
This is a perfect solution! It solves several problems for me.
There does seem to be one small bug when combined with subfolders in the filename template. Images are still being created relative to the downloads folder instead of the file location after factoring in the filename template.
For example if my template is {title}/{date:YYYYMMDDHHMM}-{title}.md
if the downloads prefix is set to images/
I'd expect images to end up in ~/Downloads/20201028230504/{title}/images
. They are actually still downloading to ~/Downloads/images/
.
I assume this wasn't the intended behavior. The filepath in the image links is set relative to the actual Markdown file, (i.e. ![](image/filename.ext)
in the example above). Replicating the entire filename template in the downloads prefix field does put the images inside the same subfolder as the actual file, but writes the links with a path relative to the downloads folder and they still don't work.
The somewhat inelegant solution I came up with is to use the prefix {title}_images/
. That makes it easy to associate the images folder with the correct folder and simply move it so the images are located correctly.
from markdownload.
Ah, yeah, silly me I didn't make the image path relative to the .md path (because I'm basically just using both as a prefix to the filename that gets downloaded). I'll add it to my to-do list to check if the title template also has a slash and if so, get everything up to the last slash added to the image prefix as well.
In the meantime, another workaround would be to use the same prefix in both. For example, if your title template is {title}/{date:YYYYMMDDHHMM}/{title}
you could set your image prefix to {title}/{date:YYYYMMDDHHMM}/images/
... which could be weird when I make it relative.
from markdownload.
Also check out the TextBundle format: http://textbundle.org
from markdownload.
Related Issues (20)
- Firefox version downloads multiple files
- tags underlined since upgrade
- Strange treatment of Mail Online pages
- Add a shortcut for "Save current selection as Markdown" HOT 1
- when i try to download some htmls as markdown, the code block in the markdwon disappears
- Markdownload does not scrape content from Iframes
- Add option to trigger on every page visited
- convert html table to markdown table format when using "send text selection to obsidian" in browser
- mathjax v3 not extracted on this page
- Better Android support: add "copy selected text to clipboard" option HOT 1
- Better Android support: scale interface to full viewport width & height
- [Documentation] Add step-by-step instruction to use obsidian integration
- Images cannot be displayed. It is recommended to add ![](UNIX timestamp/image file)
- Does this work on ChromeOS?
- Add possibility to define trimming rules and then trim superfluous parts of markdown produced based on them, automatically (based on URL) or as a button
- Image filename prefix template with `{pageTitle}` ignores changes to `pageTitle`
- Markdown clip download fails if website does not have a 'title' tag HOT 1
- MarkDownload can't save images directly to an Obsidian vault via "Copy selection as markdown" HOT 4
- Code blocks still unreadable after #312
- Part of the page is missing
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from markdownload.