Skip to main content

Backup & export 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.

Installation

$ pip install evernote-backup

Or, since evernote-backup is a standalone tool, it might be more convenient to install it using pipx:

$ pipx install 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!

By default, it will prompt you to enter your account credentials. You can provide them beforehand with --user and --password options.

If you log in to Evernote with Google or Apple accounts, you must use the --oauth option.

To connect to Yinxiang instead of Evernote, use --backend china option. Unfortunately, OAuth is not supported for Yinxiang yet.

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.

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.

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.

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.

Dependencies

  • evernote3 - to access Evernote API
  • oauth2 - to perform OAuth authentication
  • xmltodict - to convert Evernote internal representation of notes into XML
  • click - to create a CLI interface

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.2.0.tar.gz (21.2 kB view details)

Uploaded Source

Built Distribution

evernote_backup-1.2.0-py3-none-any.whl (24.3 kB view details)

Uploaded Python 3

File details

Details for the file evernote-backup-1.2.0.tar.gz.

File metadata

  • Download URL: evernote-backup-1.2.0.tar.gz
  • Upload date:
  • Size: 21.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.4 Linux/5.4.0-1046-azure

File hashes

Hashes for evernote-backup-1.2.0.tar.gz
Algorithm Hash digest
SHA256 5dc34a152076554a8d1cad1fde63636426548e285235e68535e3268f9484ccbd
MD5 c7895c300864db0f314b983c39f7b1b2
BLAKE2b-256 8df2b52e08d3cec581cd30dfd08532e6c25b4f5141ad0b3f5dc5de08ba81f1ab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: evernote_backup-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.9.4 Linux/5.4.0-1046-azure

File hashes

Hashes for evernote_backup-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 065254b6694b18a0a334f1100c1cbc5f665896637a7f25b2fadf06dcae1a2c0d
MD5 368040f5d64bb8ec42385ac898967c2d
BLAKE2b-256 fe3e2aae2522af8e464b8d85cec198dc10512dcd95a8dac39c6df97b164ba222

See more details on using hashes here.

Supported by

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