evernote-backup


Nameevernote-backup JSON
Version 1.9.3 PyPI version JSON
download
home_pagehttps://github.com/vzhd1701/evernote-backup
SummaryBackup & export all Evernote notes and notebooks.
upload_time2023-10-18 17:12:37
maintainer
docs_urlNone
authorvzhd1701
requires_python>=3.8,<4.0
licenseMIT
keywords evernote yinxiang backup export enex
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # evernote-backup

[![PyPI version](https://img.shields.io/pypi/v/evernote-backup?label=version)](https://pypi.python.org/pypi/evernote-backup)
[![Python Version](https://img.shields.io/pypi/pyversions/evernote-backup.svg)](https://pypi.org/project/evernote-backup/)
[![tests](https://github.com/vzhd1701/evernote-backup/actions/workflows/test.yml/badge.svg)](https://github.com/vzhd1701/evernote-backup/actions/workflows/test.yml)
[![codecov](https://codecov.io/gh/vzhd1701/evernote-backup/branch/master/graph/badge.svg)](https://codecov.io/gh/vzhd1701/evernote-backup)

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](https://evernote.com/) and [Yinxiang (印象笔记)](https://yinxiang.com/).

## Installation

### Using portable binary

[**Download the latest release**](https://github.com/vzhd1701/evernote-backup/releases/latest) for your OS.

### With [Homebrew](https://brew.sh/) (Recommended for macOS)

```bash
$ brew install evernote-backup
```

### With [PIPX](https://github.com/pypa/pipx) (Recommended for Linux & Windows)

```shell
$ pipx install evernote-backup
```

### With PIP

```bash
$ pip install --user evernote-backup
```

**Python 3.7 or later required.**

### With Docker

```bash
$ 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:

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

## Usage

### Step 1. Database initialization

To start you need to initialize your database.

```console
$ 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.

```console
$ 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**

```console
$ 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:

```console
$ 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.

### 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](https://github.com/vzhd1701/evernote-backup/issues/new/choose).

If you have a question about the program or have difficulty using it, you are welcome to [the discussions page](https://github.com/vzhd1701/evernote-backup/discussions). You can also mail me directly, I'm always happy to help.

## Dependencies

- [evernote3](https://github.com/evernote/evernote-sdk-python3) - to access Evernote API
- [oauth2](https://github.com/joestump/python-oauth2) - to perform OAuth authentication
- [xmltodict](https://github.com/martinblech/xmltodict) - to convert Evernote internal representation of notes into XML
- [click](https://github.com/pallets/click) - to create a CLI interface
- [click-option-group](https://github.com/click-contrib/click-option-group) - to add mutually exclusive options in сlick

## Alternative tools

**evernote-backup** is basically a clone of Evernote's original **ENScript** but simplified and stripped of its other functions. If you prefer to export your notes using Evernote's original tool, then you will need to take hold of [Evernote's legacy client](https://help.evernote.com/hc/en-us/articles/360052560314-Install-an-older-version-of-Evernote) and run the following commands:

```console
ENScript.exe syncDatabase /d backup.ebx /u your@email.com /p your_password
ENScript.exe exportDatabase /d backup.ebx /f output_dir
```

### Further reading

- [How to export Notebooks in new Evernote client](https://help.evernote.com/hc/en-us/articles/360053159414-Export-notebooks)
- [Backing up and restoring Evernote data (Reference article) (requires registration)](https://discussion.evernote.com/forums/topic/86152-backing-up-and-restoring-evernote-data-reference-article/?tab=comments#comment-367110)
- [Migrating Your Notes from Evernote to Obsidian](https://www.dmuth.org/migrating-from-evernote-to-obisidian/)
- https://github.com/davidedc/A-thousand-notes

## Similar projects

I've also combined a [bigger list](https://github.com/vzhd1701/evernote-backup/blob/master/SIMILAR_PROJECTS.md) where I included all adjacent projects that I could find.

### Export

Project                                                                |  Description                                                                                                      |  Language    |  Stars  |  Last commit
-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|--------------|---------|-------------
[ExportAllEverNote](https://github.com/dong-s/ExportAllEverNote)       |  Export notes in ENEX format driectly from your account                                                           |  Python      |  13     |  2020
[evernote2](https://github.com/JackonYang/evernote2)                   |  Improved version of standard Evernote SDK. Also provides a tool for exporting notes driectly from your account  |  Python      |  1      |  2020
[evernote-to-sqlite](https://github.com/dogsheep/evernote-to-sqlite)   |  Converts ENEX files into SQLite database                                                                         |  Python      |  20     |  2021
[enote](https://github.com/tkjacobsen/enote)                           |  Utility that can backup Evernote notes and notebooks                                                             |  Python      |  12     |  2017
[evernote-exporter](https://github.com/shawndaniel/evernote-exporter)  |  Export notes from old Evernote local database .exb format                                                        |  Python      |  28     |  2016

### Export / Sync

Project                                                                |  Description                                                                                                      |  Language    |  Stars  |  Last commit
-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|--------------|---------|-------------
[SyncToGit](https://github.com/KostyaEsmukov/SyncToGit)                |  Syncs your notes with their resources to the git repository in HTML format                                       |  Python      |  3      |  2020
[evermark](https://github.com/akuma/evermark)                          |  A command line tool for syncing markdown notes to Evernote                                                       |  JavaScript  |  72     |  2018
[eversync](https://github.com/yejianye/eversync)                       |  Sync your local directories with evernote notebooks                                                              |  Python      |  44     |  2017
[EverMark](https://github.com/liuwons/EverMark)                        |  A tool that can sync local markdown/text notes to Evernote                                                       |  Python      |  50     |  2016
[LocalEvernote](https://github.com/lwabish/LocalEvernote)              |  Syncs local directory containing notes in Markdown format with Evernote                                          |  Python      |  0      |  2021

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/vzhd1701/evernote-backup",
    "name": "evernote-backup",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8,<4.0",
    "maintainer_email": "",
    "keywords": "evernote,yinxiang,backup,export,enex",
    "author": "vzhd1701",
    "author_email": "vzhd1701@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/81/04/6da56e51723acf47fa7c9148b80caef1be590ce82e5c1394e3faaff9d345/evernote_backup-1.9.3.tar.gz",
    "platform": null,
    "description": "# evernote-backup\n\n[![PyPI version](https://img.shields.io/pypi/v/evernote-backup?label=version)](https://pypi.python.org/pypi/evernote-backup)\n[![Python Version](https://img.shields.io/pypi/pyversions/evernote-backup.svg)](https://pypi.org/project/evernote-backup/)\n[![tests](https://github.com/vzhd1701/evernote-backup/actions/workflows/test.yml/badge.svg)](https://github.com/vzhd1701/evernote-backup/actions/workflows/test.yml)\n[![codecov](https://codecov.io/gh/vzhd1701/evernote-backup/branch/master/graph/badge.svg)](https://codecov.io/gh/vzhd1701/evernote-backup)\n\nBackup your notes & notebooks from Evernote locally and export them at any time!\n\n## Features\n\n- Quickly sync all your notes into the SQLite database for backup.\n- Export all backed up notes in `*.enex` format, as **notebooks** or **single notes**.\n- Support for both [Evernote](https://evernote.com/) and [Yinxiang (\u5370\u8c61\u7b14\u8bb0)](https://yinxiang.com/).\n\n## Installation\n\n### Using portable binary\n\n[**Download the latest release**](https://github.com/vzhd1701/evernote-backup/releases/latest) for your OS.\n\n### With [Homebrew](https://brew.sh/) (Recommended for macOS)\n\n```bash\n$ brew install evernote-backup\n```\n\n### With [PIPX](https://github.com/pypa/pipx) (Recommended for Linux & Windows)\n\n```shell\n$ pipx install evernote-backup\n```\n\n### With PIP\n\n```bash\n$ pip install --user evernote-backup\n```\n\n**Python 3.7 or later required.**\n\n### With Docker\n\n```bash\n$ docker run --rm -t -v \"$PWD\":/tmp vzhd1701/evernote-backup:latest\n```\n\nTo log in to Evernote using OAuth with Docker, you'll have to forward port 10500 for a callback:\n\n```bash\n$ docker run --rm -t -v \"$PWD\":/tmp -p 10500:10500 vzhd1701/evernote-backup:latest init-db --oauth\n```\n\n## Usage\n\n### Step 1. Database initialization\n\nTo start you need to initialize your database.\n\n```console\n$ evernote-backup init-db\nUsername or Email: user@example.com\nPassword:\nLogging in to Evernote...\nEnter one-time code: 120917\nAuthorizing auth token, evernote backend...\nSuccessfully authenticated as user!\nCurrent login will expire at 2022-03-10 10:22:00.\nInitializing database en_backup.db...\nReading database en_backup.db...\nSuccessfully initialized database for user!\n```\n\nBy default, it will prompt you to enter your account credentials. You can provide them beforehand with `--user` and `--password` options.\n\nIf you log in to Evernote with Google or Apple accounts, you must use the `--oauth` option.\n\nTo connect to **Yinxiang** instead of Evernote, use `--backend china` option. Unfortunately, OAuth is not supported for **Yinxiang** yet.\n\n### Step 2. Downloading Evernote data\n\nThen you will be able to sync your account data.\n\n```console\n$ evernote-backup sync\nReading database en_backup.db...\nAuthorizing auth token, evernote backend...\nSuccessfully authenticated as user!\nCurrent login will expire at 2022-03-10 10:22:00.\nSyncing latest changes...\n  [####################################]  6763/6763\n566 notes to download...\n  [####################################]  566/566\nUpdated or added notebooks: 23\nUpdated or added notes: 566\nExpunged notebooks: 0\nExpunged notes: 0\nSynchronization completed!\n```\n\nYou can interrupt this process at any point. It will continue from where it's left off when you will rerun `evernote-backup sync`.\n\n**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.\n\n### Step 3. Exporting `*.enex` files\n\nFinally, you can export your data into specified **output directory**\n\n```console\n$ evernote-backup export output_dir/\nReading database en_backup.db...\nExporting notes...\n  [####################################]  23/23\nAll notes have been exported!\n```\n\nBy 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.\n\nTo also include **trashed** notes in export, use the `--include-trash` flag.\n\nExporting is performed wholly offline, and does not require access to the Evernote Cloud API to convert the notes.\n\nThat's it! So to export all your Evernote data, you will have to run three commands:\n\n```console\n$ evernote-backup init-db\n$ evernote-backup sync\n$ evernote-backup export output_dir/\n```\n\nAfter 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.\n\n### How to refresh expired token\n\nIn 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.\n\n## Getting help\n\nIf you found a bug or have a feature request, please [open a new issue](https://github.com/vzhd1701/evernote-backup/issues/new/choose).\n\nIf you have a question about the program or have difficulty using it, you are welcome to [the discussions page](https://github.com/vzhd1701/evernote-backup/discussions). You can also mail me directly, I'm always happy to help.\n\n## Dependencies\n\n- [evernote3](https://github.com/evernote/evernote-sdk-python3) - to access Evernote API\n- [oauth2](https://github.com/joestump/python-oauth2) - to perform OAuth authentication\n- [xmltodict](https://github.com/martinblech/xmltodict) - to convert Evernote internal representation of notes into XML\n- [click](https://github.com/pallets/click) - to create a CLI interface\n- [click-option-group](https://github.com/click-contrib/click-option-group) - to add mutually exclusive options in \u0441lick\n\n## Alternative tools\n\n**evernote-backup** is basically a clone of Evernote's original **ENScript** but simplified and stripped of its other functions. If you prefer to export your notes using Evernote's original tool, then you will need to take hold of [Evernote's legacy client](https://help.evernote.com/hc/en-us/articles/360052560314-Install-an-older-version-of-Evernote) and run the following commands:\n\n```console\nENScript.exe syncDatabase /d backup.ebx /u your@email.com /p your_password\nENScript.exe exportDatabase /d backup.ebx /f output_dir\n```\n\n### Further reading\n\n- [How to export Notebooks in new Evernote client](https://help.evernote.com/hc/en-us/articles/360053159414-Export-notebooks)\n- [Backing up and restoring Evernote data (Reference article) (requires registration)](https://discussion.evernote.com/forums/topic/86152-backing-up-and-restoring-evernote-data-reference-article/?tab=comments#comment-367110)\n- [Migrating Your Notes from Evernote to Obsidian](https://www.dmuth.org/migrating-from-evernote-to-obisidian/)\n- https://github.com/davidedc/A-thousand-notes\n\n## Similar projects\n\nI've also combined a [bigger list](https://github.com/vzhd1701/evernote-backup/blob/master/SIMILAR_PROJECTS.md) where I included all adjacent projects that I could find.\n\n### Export\n\nProject                                                                |  Description                                                                                                      |  Language    |  Stars  |  Last commit\n-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|--------------|---------|-------------\n[ExportAllEverNote](https://github.com/dong-s/ExportAllEverNote)       |  Export notes in ENEX format driectly from your account                                                           |  Python      |  13     |  2020\n[evernote2](https://github.com/JackonYang/evernote2)                   |  Improved version of standard Evernote SDK. Also provides a tool for exporting notes driectly from your account  |  Python      |  1      |  2020\n[evernote-to-sqlite](https://github.com/dogsheep/evernote-to-sqlite)   |  Converts ENEX files into SQLite database                                                                         |  Python      |  20     |  2021\n[enote](https://github.com/tkjacobsen/enote)                           |  Utility that can backup Evernote notes and notebooks                                                             |  Python      |  12     |  2017\n[evernote-exporter](https://github.com/shawndaniel/evernote-exporter)  |  Export notes from old Evernote local database .exb format                                                        |  Python      |  28     |  2016\n\n### Export / Sync\n\nProject                                                                |  Description                                                                                                      |  Language    |  Stars  |  Last commit\n-----------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------|--------------|---------|-------------\n[SyncToGit](https://github.com/KostyaEsmukov/SyncToGit)                |  Syncs your notes with their resources to the git repository in HTML format                                       |  Python      |  3      |  2020\n[evermark](https://github.com/akuma/evermark)                          |  A command line tool for syncing markdown notes to Evernote                                                       |  JavaScript  |  72     |  2018\n[eversync](https://github.com/yejianye/eversync)                       |  Sync your local directories with evernote notebooks                                                              |  Python      |  44     |  2017\n[EverMark](https://github.com/liuwons/EverMark)                        |  A tool that can sync local markdown/text notes to Evernote                                                       |  Python      |  50     |  2016\n[LocalEvernote](https://github.com/lwabish/LocalEvernote)              |  Syncs local directory containing notes in Markdown format with Evernote                                          |  Python      |  0      |  2021\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Backup & export all Evernote notes and notebooks.",
    "version": "1.9.3",
    "project_urls": {
        "Changelog": "https://github.com/vzhd1701/evernote-backup/blob/master/CHANGELOG.md",
        "Homepage": "https://github.com/vzhd1701/evernote-backup",
        "Repository": "https://github.com/vzhd1701/evernote-backup"
    },
    "split_keywords": [
        "evernote",
        "yinxiang",
        "backup",
        "export",
        "enex"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "219f82e718c7b35c656cc4cba129d942707349562830c564837e0789f31983b9",
                "md5": "58a3979c806dc4fe56147e6afa558301",
                "sha256": "4d3df6be36d542ba50f079ae714449862a14f20cccd39d5e2aa34c02c3ab3fe1"
            },
            "downloads": -1,
            "filename": "evernote_backup-1.9.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "58a3979c806dc4fe56147e6afa558301",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8,<4.0",
            "size": 38806,
            "upload_time": "2023-10-18T17:12:36",
            "upload_time_iso_8601": "2023-10-18T17:12:36.073941Z",
            "url": "https://files.pythonhosted.org/packages/21/9f/82e718c7b35c656cc4cba129d942707349562830c564837e0789f31983b9/evernote_backup-1.9.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "81046da56e51723acf47fa7c9148b80caef1be590ce82e5c1394e3faaff9d345",
                "md5": "369e43e01e7d6a9271c167065a9c7a0f",
                "sha256": "5989ab363f8e225486cd7097545073260e52f1459a912ddd415779f0e0538c5f"
            },
            "downloads": -1,
            "filename": "evernote_backup-1.9.3.tar.gz",
            "has_sig": false,
            "md5_digest": "369e43e01e7d6a9271c167065a9c7a0f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8,<4.0",
            "size": 33539,
            "upload_time": "2023-10-18T17:12:37",
            "upload_time_iso_8601": "2023-10-18T17:12:37.860154Z",
            "url": "https://files.pythonhosted.org/packages/81/04/6da56e51723acf47fa7c9148b80caef1be590ce82e5c1394e3faaff9d345/evernote_backup-1.9.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-18 17:12:37",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "vzhd1701",
    "github_project": "evernote-backup",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "evernote-backup"
}
        
Elapsed time: 0.14849s