Skip to main content

Backup & export all Evernote notes and notebooks.

Project description

evernote-backup

PyPI version Python Version tests codecov

Backup your notes & notebooks from Evernote locally and export them at any time!

Features

  • Quickly sync all your notes into the SQLite database for backup.
  • Export all backed up notes in *.enex format, as notebooks or single notes.
  • Support for both Evernote and Yinxiang (印象笔记).

Installation

Using portable binary

Download the latest release for your OS.

With Homebrew (Recommended for macOS)

$ brew install evernote-backup

With PIPX (Recommended for Linux & Windows)

$ pipx install evernote-backup

With uv

$ uv tool install evernote-backup

With Docker

Docker Image Size (amd64) Docker Image Size (arm64)

$ docker run --rm -t -v "$PWD":/tmp vzhd1701/evernote-backup:latest

To log in to Evernote using OAuth with Docker, you'll have to forward port 10500 for a callback:

$ docker run --rm -t -v "$PWD":/tmp -p 10500:10500 vzhd1701/evernote-backup:latest init-db

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/evernote-backup.git
$ cd evernote-backup/
$ poetry install
$ poetry run evernote-backup

Usage

Step 1. Database initialization

To start you need to initialize your database.

$ evernote-backup init-db
Username or Email: user@example.com
Password:
Logging in to Evernote...
Enter one-time code: 120917
Authorizing auth token, evernote backend...
Successfully authenticated as user!
Current login will expire at 2022-03-10 10:22:00.
Initializing database en_backup.db...
Reading database en_backup.db...
Successfully initialized database for user!

If you log in to Evernote, it will prompt you to complete OAuth login using your browser.

To connect to Yinxiang instead of Evernote, use --backend china option. It will prompt you to enter your account credentials. You can provide them beforehand with --user and --password options. OAuth is not supported for Yinxiang.

Step 2. Downloading Evernote data

Then you will be able to sync your account data.

$ evernote-backup sync
Reading database en_backup.db...
Authorizing auth token, evernote backend...
Successfully authenticated as user!
Current login will expire at 2022-03-10 10:22:00.
Syncing latest changes...
  [####################################]  6763/6763
566 notes to download...
  [####################################]  566/566
Updated or added notebooks: 23
Updated or added notes: 566
Expunged notebooks: 0
Expunged notes: 0
Synchronization completed!

You can interrupt this process at any point. It will continue from where it's left off when you will rerun evernote-backup sync.

evernote-backup keeps track of the sync state and downloads only new changes that have been made since the last run. So every sync will go pretty fast, but you'll have to wait for a bit on the first run if you have a lot of notes in your account. Syncing uses the Evernote Cloud API.

Step 3. Exporting *.enex files

Finally, you can export your data into specified output directory

$ evernote-backup export output_dir/
Reading database en_backup.db...
Exporting notes...
  [####################################]  23/23
All notes have been exported!

By default, evernote-backup will export notes by packing them into notebooks, one *.enex file each. If you want to extract notes as separate files, use the --single-notes flag.

To also include trashed notes in export, use the --include-trash flag.

Exporting is performed wholly offline, and does not require access to the Evernote Cloud API to convert the notes.

That's it! So to export all your Evernote data, you will have to run three commands:

$ evernote-backup init-db
$ evernote-backup sync
$ evernote-backup export output_dir/

After first initialization, you can schedule evernote-backup sync command to keep your local database always up-to-date. However, evernote-backup export will always re-export all notebooks to the specified output directory.

Tasks

To sync tasks & reminders, you will need:

  1. Get the official desktop app authentication token using evertoken
  2. Use it with sync command like so: evernote-backup sync --include-tasks --token "YOUR_TOKEN_HERE"

Sorry for the extra steps, tasks and reminders are not accessible using current public API, so I had to use Evernote's new sync API which is not available for third party apps yet. I have placed a request to grant my app key access to the new API, but I have not received a response yet.

SSL Errors

If you get any SSL errors, please run evernote-backup -v manage ping to check your connection to Evernote server and get full information about the SSL environment.

You can also try using --use-system-ssl-ca flag to make evernote-backup use system Certificate Authority (CA) storage instead of the bundled one.

How to refresh expired token

In case your auth token that you initialized your database with expires, you have an option to re-authorize it by running the evernote-backup reauth command. It has the same options as the init-db command.

Getting help

If you found a bug or have a feature request, please open a new issue.

If you have a question about the program or have difficulty using it, you are welcome to the discussions page. You can also mail me directly, I'm always happy to help.

Further reading

Similar projects

I've also combined a bigger list where I included all adjacent projects that I could find.

Export

Project Description Language
ExportAllEverNote Export notes in ENEX format driectly from your account Python
evernote2 Improved version of standard Evernote SDK. Also provides a tool for exporting notes driectly from your account Python
evernote-to-sqlite Converts ENEX files into SQLite database Python
enote Utility that can backup Evernote notes and notebooks Python
evernote-exporter Export notes from old Evernote local database .exb format Python

Export / Sync

Project Description Language
SyncToGit Syncs your notes with their resources to the git repository in HTML format Python
evermark A command line tool for syncing markdown notes to Evernote JavaScript
eversync Sync your local directories with evernote notebooks Python
EverMark A tool that can sync local markdown/text notes to Evernote Python
LocalEvernote Syncs local directory containing notes in Markdown format with Evernote Python
gnsync Part of Geeknote Python

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

evernote_backup-1.13.1.tar.gz (68.4 kB view details)

Uploaded Source

Built Distribution

evernote_backup-1.13.1-py3-none-any.whl (72.7 kB view details)

Uploaded Python 3

File details

Details for the file evernote_backup-1.13.1.tar.gz.

File metadata

  • Download URL: evernote_backup-1.13.1.tar.gz
  • Upload date:
  • Size: 68.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for evernote_backup-1.13.1.tar.gz
Algorithm Hash digest
SHA256 564c39cd92633e9e9492346363bd3f85175c15a9f73d5c34d35835a2ef05e197
MD5 3df62303f14b1669597e5d8eff2a8fc7
BLAKE2b-256 7709021f30d5e05df5587f0621b4144b687d94af331fefa54f5a14b7cd2d80d1

See more details on using hashes here.

File details

Details for the file evernote_backup-1.13.1-py3-none-any.whl.

File metadata

  • Download URL: evernote_backup-1.13.1-py3-none-any.whl
  • Upload date:
  • Size: 72.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.3 Linux/6.8.0-1021-azure

File hashes

Hashes for evernote_backup-1.13.1-py3-none-any.whl
Algorithm Hash digest
SHA256 562c795b4a99d01e910387fdf3fd6f73e89e122fb9ad0b238e3b0c005f0ab604
MD5 13eea5f036461f34bacc1e0c0ecd6b42
BLAKE2b-256 077fe1c6e131f0c8199a3b65550f6b75e75d6df990d9649f084ce00a81765030

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page