iamjackg / md2cf

Convert and upload Markdown documents to Confluence
MIT License
91 stars 49 forks source link

Convert URL-encoded attachment paths? #86

Closed sanscontext closed 1 year ago

sanscontext commented 1 year ago

Hey there, I checked for previous issues about this, but didn't find anything that seemed relevant. I'm working with a dump of markdown from a popular wiki-like tool that starts with an N, and for attached images, it exports like this:

Export-folder:
 John a10958b569844bf9bc44097757e559f8.md
 |_ John a10958b569844bf9bc44097757e559f8
     |_profile-picture.jpeg

But in the export file, it's referencing URL-encoded paths, so the spaces are %20, emojis are written out, etc.

![profile-picture.jpeg](John%20a10958b569844bf9bc44097757e559f8/profile-picture.jpeg)

The result is that the tool throws

❌ ERROR: attachment (path) for page (page name) does not exist 

Am I doing something wrong here, or do I just need to pump these through some script to convert the file names and paths to URL-encoded ones? At this point I'm not sure if this is a bug or a feature request. :)

iamjackg commented 1 year ago

Fixed by #75 :)