crowbook icon indicating copy to clipboard operation
crowbook copied to clipboard

support for urlencoded localpath?

Open Cl4ySmith opened this issue 1 year ago • 0 comments

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.

Cl4ySmith avatar Dec 05 '23 05:12 Cl4ySmith