Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enexSources does not allow multiple .enex files #464

Open
ecerulm opened this issue Mar 19, 2023 · 4 comments
Open

enexSources does not allow multiple .enex files #464

ecerulm opened this issue Mar 19, 2023 · 4 comments

Comments

@ecerulm
Copy link

ecerulm commented Mar 19, 2023

Using 5.0.11

with the following in the config.json

  "enexSources": [
    "/Users/ecerulm/Downloads/evernote2023-03-18/boardgames.enex",
  ],

it works,
As soon as I add a second file:

  "enexSources": [
    "/Users/ecerulm/Downloads/evernote2023-03-18/boardgames.enex",
    "/Users/ecerulm/Downloads/evernote2023-03-18/macos.enex"
  ],

then it assumes each path is a directory not an ENEX files and fails with

npx -p [email protected] yarle --configFile config_macos.json
...
node:fs:1438
  handleErrorFromBinding(ctx);
  ^

Error: ENOTDIR: not a directory, scandir '/Users/ecerulm/Downloads/evernote2023-03-18/boardgames.enex'
    at Object.readdirSync (node:fs:1438:3)
    at Object.run (/Users/ecerulm/.npm/_npx/cc64087a51a90dbd/node_modules/yarle-evernote-to-md/dist/dropTheRopeRunner.js:51:14)
    at Object.<anonymous> (/Users/ecerulm/.npm/_npx/cc64087a51a90dbd/node_modules/yarle-evernote-to-md/dist/dropTheRope.js:30:19)
    at Module._compile (node:internal/modules/cjs/loader:1275:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1329:10)
    at Module.load (node:internal/modules/cjs/loader:1133:32)
    at Module._load (node:internal/modules/cjs/loader:972:12)
    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:83:12)
    at node:internal/main/run_main_module:23:47 {
  errno: -20,
  syscall: 'scandir',
  code: 'ENOTDIR',
  path: '/Users/ecerulm/Downloads/evernote2023-03-18/boardgames.enex'
}

@akosbalasko
Copy link
Owner

hi @ecerulm ,

Pls try to copy your enex files into a directory and set that directory as enexSources. In this cade Yarle should iterate over the contente of the directory and convert all the enex files in it.

@ecerulm
Copy link
Author

ecerulm commented Mar 19, 2023

yes, I already did that to workaround it but the

yarle/README.md

Line 147 in 62d4e19

|```enexSources```| multiple enex files, or a folder of the enex files(if you specify it via command line) | specifies the exported Evernote notebook(s) as an absolute path|

should be updated to say that it's either a single ENEX file or a list of folders, the current multiple enex files, or a folder of the enex files seems misleading.

@akosbalasko akosbalasko added this to To do in Yarle's Kanban via automation Mar 19, 2023
@akosbalasko
Copy link
Owner

@ecerulm okok, thank you, I'll fix it.

@akosbalasko akosbalasko moved this from To do to In progress in Yarle's Kanban Sep 16, 2023
@akosbalasko akosbalasko moved this from In progress to To do in Yarle's Kanban Jan 6, 2024
@ipcjs
Copy link

ipcjs commented Apr 15, 2024

#628 implemented this feature. 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants