Cobertos / md2notion

A better Notion.so Markdown importer
MIT License
654 stars 65 forks source link

Could you give a little more instructions for setup for someone who does not know python. #35

Closed emyrold closed 3 years ago

emyrold commented 3 years ago

Hello, I'm on mac and have several hundred markdown files with image directories that I would like to import into notion using your utility, just not sure where to start.

Cobertos commented 3 years ago

If the .md files have paths that point at the image files properly, you should just be able to use it with command line commands.

If not, then you would need to do something like the example found in the README, which shows how to pass an imagePathFunc to upload(), so that it can transform the paths to a file that is actually found. What sort of structure of .md/image files are you trying to upload?

emyrold commented 3 years ago

Hi,

Here is the path in the MD file, looks like Bears, either stores it in their database with URI encoded or the export runs it through some URI encoding.

Here is the folder path: /Users/emyrold/Desktop/Test-Export/JavaScript Understanding the Weird Parts | Udemy Here is the file name: Screen Shot 2018-03-22 at 9.42.10 PM.png

I have the default Python 2.7 that comes with Mac OS X.

I do not know what setups steps I need to run your script.

Thanks for the reply!

-Erik

On May 21, 2021, at 11:10 PM, Cobertos @.***> wrote:

If the .md files have paths that point at the image files properly, you should just be able to use it with command line commands.

If not, then you would need to do something like the example found in the README, which shows how to pass an imagePathFunc to upload(), so that it can transform the paths to a file that is actually found. What sort of structure of .md/image files are you trying to upload?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Cobertos/md2notion/issues/35#issuecomment-846346110, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADSALYOBQPGV6RJOD6WUV6DTO4VC7ANCNFSM45JK7E2Q.

Cobertos commented 3 years ago

URL encoding is handled by the script. If the path JavaScript%20Understanding%20the%20Weird%20Parts%20%7C%20Udemy/Screen%20Shot%202018-03-22%20at%209.42.10%20PM.png doesn't match a file on your harddrive relative to the .md file, then the script will not be able to find it.

Setup steps are in the README, see screenshot below:

image

You also need at least Python 3.6+ to run