-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to API v8 due to removal of v7 API at the end of august, fix s…
…ome pylint warnings and explain the email/pw workaround in the README.
- Loading branch information
Showing
11 changed files
with
38 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,19 +38,21 @@ Early version - enough for basic use, but not tested under every possible scenar | |
|
||
## Usage examples | ||
|
||
Create a backup from Todoist's servers, including attachments: | ||
Create a backup from Todoist's servers, without including attachments: | ||
|
||
``python3 __main__.py download --with-attachments --token 0123456789abcdef`` | ||
``python3 __main__.py download --token 0123456789abcdef`` | ||
|
||
Create a backup from Todoist's servers, without including attachments, and with tracing/progress info: | ||
Create a backup from Todoist's servers, including attachments, and with tracing/progress info: | ||
|
||
``python3 __main__.py --verbose download --token 0123456789abcdef`` | ||
``python3 __main__.py --verbose download --with-attachments --token 0123456789abcdef --email [email protected] --password P4ssW0rD`` | ||
|
||
**NOTE:** The email and password is **required** to download the attachments, as a workaround due to security restriction introduced by Todoist in 2018 (see [issue #1](https://github.com/joanbm/full-offline-backup-for-todoist/issues/1)). As of today, there is no official way provided by Todoist to automate attachment download, and the current workaround may break at any time. | ||
|
||
Print full help: | ||
|
||
``python3 __main__.py -h`` | ||
|
||
**IMPORTANT:** To use this tool you will need to replace the "0123456789abcdef" string above with your Todoist API token. | ||
**IMPORTANT:** To use this tool you will need to replace the "0123456789abcdef" string above with your Todoist API token (and similarly for your email and password). | ||
|
||
## How to get my Todoist API token? | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,12 +20,13 @@ def __add_authorization_group(parser): | |
token_group.add_argument("--token-file", type=str, | ||
help="file containing the todoist API token") | ||
parser.add_argument("--email", type=str, | ||
help="todoist email address for authorization") | ||
help="todoist email address for attachment download authorization") | ||
parser.add_argument("--password", type=str, | ||
help="todoist email address for authorization") | ||
help="todoist password for attachment download authorization") | ||
|
||
def __parse_command_line_args(self, prog, arguments): | ||
example1_str = "Example: {} download --token 0123456789abcdef --email [email protected] --password P4ssW0rD".format(prog) | ||
example1_str = ("Example: {} download --token 0123456789abcdef " | ||
"--email [email protected] --password P4ssW0rD").format(prog) | ||
parser = argparse.ArgumentParser(prog=prog, formatter_class=argparse.RawTextHelpFormatter, | ||
epilog=example1_str) | ||
parser.add_argument("--verbose", action="store_true", help="print details to console") | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters