CLI tool to help migrate attachements from Evernote notes to Paperless-NGX. It parses ENEX files and uses the Paperless API to upload the contents.
I've been using Evernote as a filing cabinet with mostly notes containing a single PDF file and various tags. This tool is specifically built to ingest these types of notes from Evernote to Paperless.
What it does:
- Go through an ENEX file, looking for notes containing allowed file types.
- Extract those files and upload them to Paperless
It will recreate the same tags and note title as they were in Evernote.
What it doesn't do:
It will not convert ALL your existing notes. Notes without allowed attachements will be ignored.
Usage:
enex2paperless [file path] [flags]
Flags:
-c, --concurrent int Number of concurrent consumers (default 1)
-h, --help help for enex2paperless
-n, --nocolor Disable colored output
-o, --outputfolder string Output attachements to this folder, NOT paperless.
-v, --verbose Enable verbose logging
-
Export your Notes from Evernote to an ENEX file, e.g.
MyEnexFile.enex
-
Download
enex2paperless.zip
from Releases. -
Extract files to the same location as your ENEX file.
-
Edit
config.yaml
and add your personal information. This depends on your installation of Paperless:
PaperlessAPI: http://paperboy.lan:8000
Username: user
Password: pass
FileTypes:
- pdf
- txt
- jpeg
- png
- webp
- gif
- tiff
- Open
cmd.exe
- Navigate to the folder where you extracted the files, e.g.:
cd C:\Users\JohnDoe\Desktop
- Run
enex2paperless
:
enex2paperless MyEnexFile.enex
You can select which file types should be processed. The MIME type of the Evernote attachements will be compared with the configured file types. If there's no match, the attachement will be ignored. This avoids trying to upload unwanted or unsupported filetypes.
If you want to upload any attachements, regardless, then you can include any
in the list of filetypes, like this:
FileTypes:
- any
The tool is capable of handling multiple uploads concurrently. By default it will process the attachements one by one. You can use the -c
flag to configure multiple workers, like this:
enex2paperless.exe MyEnexFile.enex -c 3
Attention: Depending on your Paperless installation, it might not be able to handle multiple requests at the same time efficiently. In that case, using multiple concurrent uploads would only slow down the process instead of speeding it up.
Optionally it is possible to output all attachements to a specific folder, as opposed to uploading them to Paperless. If you want to use Enex2Paperless in that mode, then you have to provide a foldername:
enex2paperless.exe MyEnexFile.enex -o myfoldername
This disables uploads to Paperless and only outputs files to your provided folder.
If you're running into problems, you can enable a more verbose log output by using the -v
flag. This should help troubleshoot the problems.
If your console doesn't support colored output using ANSI escape codes, the output will look messed up, similar to this:
←[38;2;224;175;104m[08:46:55.211]←[0m [←[38;2;158;206;105m INFO←[0m] ←[38;2;192;202;245mprocessing file←[0m ←[38;2;187;154;247m{"file":"test.pdf"}←[0m
←[38;2;224;175;104m[08:46:56.734]←[0m [←[38;2;158;206;105m INFO←[0m] ←[38;2;192;202;245mENEX processing done←[0m ←[38;2;187;154;247m{"numberOfNotes":1,"totalFiles":1}←[0m
←[38;2;224;175;104m[08:46:56.734]←[0m [←[38;2;158;206;105m INFO←[0m] ←[38;2;192;202;245mall notes processed successfully←[0m
If that's the case, enable the -n
flag to disable colored output.