crowdagger / crowbook

Converts books written in Markdown to HTML, LaTeX/PDF and EPUB
GNU Lesser General Public License v2.1
744 stars 38 forks source link

support for urlencoded localpath? #119

Open Cl4ySmith opened 12 months ago

Cl4ySmith commented 12 months ago

In the markdown file, the image local path is like:

![图片.png](HTTP%E5%8D%8F%E8%AE%AE%E5%9F%BA%E7%A1%80.assets%5C9be60EFc48640557b0b4f2e.png)

This path can be URL decoded according to UTF-8 encoding to get the correct path to the local file, as shown below: image

But it ran with the following error message:

D:\Tool\crowbook.exe my.book
🐦 CROWBOOK 📚 0.16.0
✔ Finished
❌ pdf: 01.HTTP协议基础.md: Could not find file '.\HTTP%E5%8D%8F%E8%AE%AE%E5%9F%BA%E7%A1%80.assets%5C9be60EFc48640557b0b
❌ epub: 01.HTTP协议基础.md: Could not find file '.\HTTP%E5%8D%8F%E8%AE%AE%E5%9F%BA%E7%A1%80.assets%5C9be60EFc48640557b0⚠️ WARNING Crowbook exited successfully, but the following errors occurred:
💣 ERROR Error rendering pdf: 01.HTTP协议基础.md: Could not find file '.\HTTP%E5%8D%8F%E8%AE%AE%E5%9F%BA%E7%A1%80.assets%5C9be60EFc48640557b0b4f2e.png' for image
⚠️ WARNING Could not run zip command, falling back to zip library
💣 ERROR Error rendering epub: 01.HTTP协议基础.md: Could not find file '.\HTTP%E5%8D%8F%E8%AE%AE%E5%9F%BA%E7%A1%80.assets%5C9be60EFc48640557b0b4f2e.png' for image

My guess is that crowbook cannot parse URL encoded local file paths.

Thank you for the great work.