aoout / obsidian-epub-importer

Import EPUB files as Markdown.
MIT License
124 stars 2 forks source link

convert urls to markdown links not wiki links #51

Closed zsviczian closed 6 months ago

zsviczian commented 7 months ago

In the book I converted urls were converted to wiki links like this [[https://the.url|alias]]. In quick switcher Obsidian picked these up as pages that could be created in my vault. Instead it would be great if urls could be converted to markdown links [alias](https://the.url)

aoout commented 6 months ago

Can you please show relevant screenshots?

zsviczian commented 6 months ago

image

text00033.zip

aoout commented 6 months ago

Maybe you can do this conversion through other plugins?

zsviczian commented 6 months ago

sure I could... but why not do the post-processing in one go? I'd rather avoid using additional plugins making the whole process more complicated and more fragile...

This regular expression will capture the link and the alias. you can easily convert this into markdown links so they are correctly handled by Obsidian /\[\[(https:\/\/[^\]|]*?)(?:\|([^\]]*?))?]]/g