Import Evernote ENEX files to Notion
Project description
enex2notion
Easy way to import Evernote's *.enex
files to Notion.so
Notion's native Evernote importer doesn't do it for me, so I decided to write my own. Thanks to Cobertos and md2notion for inspiration and Jamie Alexandre for notion-py.
You can either use Evernote native export or try out my other tool, evernote-backup, to export *.enex
files from Evernote.
What is preserved
- Embedded files and images are uploaded to Notion
- nested images will appear after paragraph
- Text formatting (bold, italic, etc) and colors
- Tables are converted to the new format (no colspans though)
- Everything else basically
What is lost
- Paragraph alignment
- Subscript and superscript formatting
- Custom fonts and font sizes
- Tasks
- Encrypted blocks
- just decrypt them before export
- Web Clips
- you'll have better luck converting those to
*.md
and using md2notion
- you'll have better luck converting those to
Installation
Download the latest binary release for your OS.
With PIP
$ pip install enex2notion
Python 3.6 or later required.
Or, since enex2notion is a standalone tool, it might be more convenient to install it using pipx:
$ pipx install enex2notion
From source
This project uses poetry for dependency management and packaging. You will have to install it first. See poetry official documentation for instructions.
$ git clone https://github.com/vzhd1701/enex2notion.git
$ cd enex2notion/
$ poetry install --no-dev
$ poetry run enex2notion
Usage
$ enex2notion --help
usage: enex2notion [-h] [--token TOKEN] [--mode {DB,PAGE}] [--add-meta] [--done-file FILE] [--verbose] [--version] FILE/DIR [FILE/DIR ...]
Uploads ENEX files to Notion
positional arguments:
FILE/DIR ENEX files or directories to upload
optional arguments:
-h, --help show this help message and exit
--token TOKEN Notion token, stored in token_v2 cookie for notion.so [NEEDED FOR UPLOAD]
--mode {DB,PAGE} upload each ENEX as database (DB) or page with children (PAGE) (default: DB)
--add-meta include metadata (created, tags, etc) in notes, makes sense only with PAGE mode
--done-file FILE file for uploaded notes hashes to resume interrupted upload
--verbose output debug information
--version show program's version number and exit
You can pass single *.enex
files or directories. The program will recursively scan directories for *.enex
files.
The upload requires you to have a token_v2
cookie for the Notion website. For information on how to get it, see this article.
The program can run without --token
provided though. It will not make any network requests without it. Executing a dry run with --verbose
is an excellent way to check if your *.enex
files are parsed correctly before uploading.
The upload will take some time since each note is uploaded block-by-block, so you'll probably need some way of resuming it. --done-file
is precisely for that. All uploaded note hashes will be stored there, so the next time you start, the upload will continue from where you left off.
All uploaded notebooks will appear under the automatically created Evernote ENEX Import
page. The program will mark unfinished notes with [UNFINISHED UPLOAD]
text in the title. After successful upload, the mark will be removed.
The --mode
option allows you to choose how to upload your notebooks: as databases or pages. DB
mode is the default since Notion itself uses this mode when importing from Evernote. PAGE
mode makes the tree feel like the original Evernote notebooks hierarchy.
Since PAGE
mode does not benefit from having separate space for metadata, you can still preserve the note's original meta with the --add-meta
option. It will attach a callout block with all meta info as a first block in each note.
Examples
Checking notes before upload
$ enex2notion --verbose my_notebooks/
WARNING: No token provided, dry run mode. Nothing will be uploaded to Notion!
INFO: Processing directory 'my_notebooks'...
INFO: Processing notebook 'Test Notebook'...
DEBUG: Parsing note 'Test note 1'
DEBUG: Parsing note 'Test note 2'
DEBUG: Parsing note 'Test note 3'
DEBUG: Parsing note 'Test note with encrypted block'
WARNING: Skipping encrypted block
Uploading notes from a single notebook
$ enex2notion --token "30d0...9c12" "my_notebooks/Test Notebook.enex"
INFO: 'Evernote ENEX Import' page found
INFO: Processing notebook 'Test Notebook'...
INFO: Creating new page for note 'Test note'
Uploading 'Test note' |#### | 40/304
Dependencies
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file enex2notion-0.1.3.tar.gz
.
File metadata
- Download URL: enex2notion-0.1.3.tar.gz
- Upload date:
- Size: 22.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.9 Linux/5.11.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85b40a637c877402ceda9807b8aaf522e4edddd19c0cd5fee7f19b99e77c7cb0 |
|
MD5 | 3c60a7fb3a8258f211975cdce327d280 |
|
BLAKE2b-256 | 0bc43177507aaf8f74f5a01e2bea2fbbbed11b8da25683831d058f7fd20b7ca8 |
File details
Details for the file enex2notion-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: enex2notion-0.1.3-py3-none-any.whl
- Upload date:
- Size: 26.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.11 CPython/3.9.9 Linux/5.11.0-1021-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af31a463aa5d8b8a67b46edee2e98213a9650db0db0617b120d42379faf77ee7 |
|
MD5 | 08be9618a2f41a2d3029bcf121aab00f |
|
BLAKE2b-256 | de99043c5790343628a5303b52cd61c61bf5879ab602b04ea1d7c01fc3e5f2f2 |