aoout / obsidian-epub-importer

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

Image path parsing error #11

Closed ProudBenzene closed 11 months ago

ProudBenzene commented 11 months ago

In the very first place, thank you for your dedication about the plugin! I am just planning to read a English Learning book and I think it can be a fantastic substitute for other viewers!

However, I found two issues while importing my .epub book.

Here is my configuration in the setting:

image
  1. The embeded path links were wrong. The plugin would add doc before my path, for example: ![](doctest//Think/assets/cover.jpg)
  2. If there were spaces in the booktitle, the spaces won't be transcoded so that the path can't be displayed as well.

Although I succeeded in avoiding the two issues, it is vital to fix the issue because it can be a great impact on the user experience.

Finally the book files are attached, thanks again for your selflessness! 🎉

Think Faster, Talk Smarter.epub.zip

aoout commented 11 months ago

If there were spaces in the booktitle, the spaces won't be transcoded so that the path can't be displayed as well.

I can't understand this. the path can't be displayed? where?

aoout commented 11 months ago

The embeded path links were wrong. The plugin would add doc before my path

the images inside the .epub file is under a folder named "docimages", that is why the "doc" will come out, it is a problem.

ProudBenzene commented 11 months ago

If there were spaces in the booktitle, the spaces won't be transcoded so that the path can't be displayed as well.

I can't understand this. the path can't be displayed? where?

That's to say, the image indicated by this path cannot be displayed in ob if ! []() has a space directly in it

ProudBenzene commented 11 months ago

The embeded path links were wrong. The plugin would add doc before my path

the images inside the .epub file is under a folder named "docimages", that is why the "doc" will come out, it is a problem.

The embeded path links were wrong. The plugin would add doc before my path

the images inside the .epub file is under a folder named "docimages", that is why the "doc" will come out, it is a problem.

It's strange, the character doc isn't in the images directory I set up, and even if it was, it shouldn't be on the parent folder of the book Think.

aoout commented 11 months ago

It's strange, the character doc isn't in the images directory I set up, and even if it was, it shouldn't be on the parent folder of the book Think.

It's a mistake, I'm not saying you setup any directory. I mean, this .epub file is special. Unzip the .epub file, and you will find the docimages folder.

aoout commented 11 months ago

I understand the problem and I will find a way to solve it.

ProudBenzene commented 11 months ago

I understand the problem and I will find a way to solve it.

That's very kind of you!

aoout commented 11 months ago

fixed in https://github.com/aoout/obsidian-epub-importer/commit/f041ce33501297450a71cbda1b116f85f1b05934.