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

Appends export directory to the call to config.json #1

Open
sh4d0wl3ss opened this issue Jul 11, 2023 · 5 comments
Open

Appends export directory to the call to config.json #1

sh4d0wl3ss opened this issue Jul 11, 2023 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@sh4d0wl3ss
Copy link

For some reason when I run it I get the error: ERROR: The configuration file ../evernote_config.json cannot be found.
(base) MacBook-Pro:evernotes adam$

The config.json file does not get found though the script and the config.json file are both in the same folder. I've run the script from both the directory where the .enex file is and the parent where the script and config.json reside.

What am I doing wrong? I've got the main folder with a subdirectory called "evernotes' where the .enex files are and another subdirectory called "markdown" where I want the result of your program to go. Thanks

Repository owner deleted a comment from RijnBuve-TomTom Jul 12, 2023
@rijnb
Copy link
Owner

rijnb commented Jul 12, 2023

This is caused by the fact the script could not handle space in directory names. It should be solved now. Can you download the latest version and verify?

@rijnb rijnb self-assigned this Jul 12, 2023
@rijnb rijnb added the bug Something isn't working label Jul 12, 2023
@sh4d0wl3ss
Copy link
Author

Tried that. Now I get no error but the script does nothing.

@rijnb
Copy link
Owner

rijnb commented Jul 12, 2023

Made some more fixes and tried to make the script more robust and produce more (debug) output. Tested it with directories and filenames with spaces.

Below is sample output of a test run:

$ evernote-to-obsidian-converter.sh markdown evernote/My\ File.enex ~/source/rijnb/evernote-to-obsidian/personal_tags_hierarchy.txt

Output:

Evernote to Obsidian converter.
Configuration: /Users/rijn/source/rijnb/evernote-to-obsidian/evernote_config.json
Template: /Users/rijn/source/rijnb/evernote-to-obsidian/evernote_converted_note.template
Output: markdown
Tags hierarchy: /Users/rijn/source/rijnb/evernote-to-obsidian/personal_tags_hierarchy.txt
Input path: evernote/My File.enex
Input file (Evernote): My File.enex (evernote)
logfilepath: /Users/rijn/Library/Application Support/yarle-evernote-to-md/conversion.log
clearing log: /Users/rijn/Library/Application Support/yarle-evernote-to-md/conversion.log
Loading config from /Users/rijn/source/rijnb/evernote-to-obsidian/evernote_config.json
clearing log: /Users/rijn/Library/Application Support/yarle-evernote-to-md/conversion.log
Run post-conversion scripts in markdown/notes/My File...
Post-process: My Note.md
Done

If you retry you run with the latest version and the script fails for you, can you post the command and output in the issue please? Thanks for helping.

@sh4d0wl3ss
Copy link
Author

Hi, So I put the .enex file in the same folder and ran: ./evernote-to-obsidian-converter.sh markdown 2022Journal.enex
Got the same message: ERROR: The configuration file ./evernote_config.json cannot be found.
No other output like you got above.
I tried changing in template to hard code the path but no luck.

@RijnBuve-TomTom
Copy link
Contributor

RijnBuve-TomTom commented Jul 14, 2023

Added printing the exact location of the config file so you can see if it points to the right location.
If you run the script now, you should see Configuration: <some_path>. Check if the JSON file is located there.
The script should never be taken out of the cloned repo directory and normally you would not put other files in that directory. Just invoke the script from another directory. Let me know what the output is to see if we can fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants