dmuth / evernote-to-obsidian

Wrapper for the Yarle app to make converting Evernote notebooks to Markdown easier
Apache License 2.0
169 stars 15 forks source link

Incorrect path insertion - can't find template.tmpl #11

Open sh4d0wl3ss opened 1 year ago

sh4d0wl3ss commented 1 year ago

HI,

Struggling with what's wrong here. Problem one is that I'm running a Windows machine and your script is for a bash shell. I have git-bash but it is not working. Somehow, though the template is in the same folder as the shell script when the script runs it is seeking for the template in a path it creates that's no good. Any ideas? The actual path to the script and the template.tmpl files is D:\Documents\evernote-notebooks\dmuthconverter. Thanks for any help you can provide.

$ ./convert-evernote-to-markdown.sh evernote-notebooks/2022Journal.enex

Yarle already installed...

logfilepath: C:\Users\adamp\AppData\Roaming\yarle-evernote-to-md\conversion.log clearing log: C:\Users\adamp\AppData\Roaming\yarle-evernote-to-md\conversion.log Loading config from D:\Documents\evernote-notebooks\dmuthconverter/./config.json clearing log: C:\Users\adamp\AppData\Roaming\yarle-evernote-to-md\conversion.log node:fs:601 handleErrorFromBinding(ctx); ^

Error: ENOENT: no such file or directory, open '/d/Documents/evernote-notebooks/dmuthconverter/template.tmpl' at Object.openSync (node:fs:601:3) at Object.readFileSync (node:fs:469:35) at setOptions (C:\Users\adamp\anaconda3\node_modules\yarle-evernote-to-md\dist\yarle.js:81:71) at Object.dropTheRope (C:\Users\adamp\anaconda3\node_modules\yarle-evernote-to-md\dist\yarle.js:191:5) at Object.run (C:\Users\adamp\anaconda3\node_modules\yarle-evernote-to-md\dist\dropTheRopeRunner.js:59:47) at Object. (C:\Users\adamp\anaconda3\node_modules\yarle-evernote-to-md\dist\dropTheRope.js:30:19) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) { errno: -4058, syscall: 'open', code: 'ENOENT', path: '/d/Documents/evernote-notebooks/dmuthconverter/template.tmpl' }

Node.js v18.16.0

dmuth commented 1 year ago

I'm not running Windows so I can't troubleshoot directly, but it looks like this happened to someone else and the way the path was formatted was an issue:

https://github.com/dmuth/evernote-to-obsidian/issues/9#issuecomment-1520484927

See if that works for you.

Thanks,

-- Doug

sh4d0wl3ss commented 1 year ago

Hi Doug, No joy. I did as the other user did and hardcoded the paths everywhere there was a $DIR$ variable ./convert-evernote-to-markdown.sh evernote-notebooks

Yarle already installed...

logfilepath: C:\Users\adamp\AppData\Roaming\yarle-evernote-to-md\conversion.log clearing log: C:\Users\adamp\AppData\Roaming\yarle-evernote-to-md\conversion.log Loading config from D:\Documents\evernote-notebooks\dmuthconverter/./config.json undefined:3 "D:\Documents\evernote-notebooks\dmuthconverter\evernote-notebooks" ^

SyntaxError: D:\Documents\evernote-notebooks\dmuthconverter\config.json: Unexpected token D in JSON at position 35 at parse () at Module._extensions..json (node:internal/modules/cjs/loader:1322:39) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Module.require (node:internal/modules/cjs/loader:1141:19) at require (node:internal/modules/cjs/helpers:110:18) at Object.run (C:\Users\adamp\anaconda3\node_modules\yarle-evernote-to-md\dist\dropTheRopeRunner.js:47:53) at Object. (C:\Users\adamp\anaconda3\node_modules\yarle-evernote-to-md\dist\dropTheRope.js:30:19) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)

Node.js v18.16.0