Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
9dogs committed Apr 10, 2021
1 parent a35b683 commit 677b737
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 9 deletions.
29 changes: 27 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Anki💗Notion addon

It's an [Anki](https://apps.ankiweb.net/) addon which loads toggle lists from [Notion](https://notion.so) as notes to a specified
deck.
It's an [Anki](https://apps.ankiweb.net/) addon that loads toggle lists from [Notion](https://notion.so) as notes to
a specified deck.

[![Supported versions](https://img.shields.io/badge/python-3.8%20%7C%203.9-blue)](https://github.com/9dogs/notion-anki-sync)
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
Expand All @@ -18,6 +18,10 @@ deck.
Clozes can be added via `code` blocks in toggle titles. Backside will be
ignored (apart from tags).

Synchronization can work in the background or can be triggered manually from the `Notion` submenu in the `Tools`
section. Note that background sync **does not remove** any notes; if you want to remove the obsolete notes, then
trigger `Load and remove obsolete` from the submenu.

## Requirements

### Notion API token
Expand Down Expand Up @@ -54,6 +58,27 @@ Edit plugin config file from Anki: `Tools ➡ Add-ons ➡ NotionAnki ➡ Config`
}
```

## Known issues & limitations

Behind the scenes, the addon initiates Notion pages export to HTML, then parses the HTML into notes. Since non-public
Notion API is used, the addon may break without a warning.

- As for now, LaTeX and plain text cannot be used in the same cloze: Notion puts them in separate `code` tags which
leads to the creation of two cloze blocks.

- Some toggle blocks are empty on export which leads to empty Anki notes. The issue is on the Notion side (and they're
aware of it).

## Configuration parameters

- `debug`: `bool [default: false]` — enable debug logging to file.
- `sync_every_minutes`: `int [default: 30]` — auto sync interval in minutes. Set to 0 to disable auto sync.
- `anki_target_deck`: `str [default: "Notion Sync"]` — the deck loaded notes will be added to.
- `notion_token`: `str [default: None]` — Notion APIv2 token.
- `notion_namespace`: `str [default: None]` — Notion namespace (your username) to form source URLs.
- `notion_pages`: `array [default: [] ]` — List of Notion pages to export notes from.


## Inspiration

This project is inspired by a great [notion2anki](https://github.com/alemayhu/notion2anki).
14 changes: 7 additions & 7 deletions notion_sync_addon/config.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Configuration

- `debug: bool [default: false]` - enable debug logging to file
- `sync_every_minutes: int, default [30]` - auto sync interval in minutes. Set to 0 to disable
- `anki_target_deck: str [default: "Notion Sync"]` - the deck loaded notes will be added to
- `notion_token: str [default: None]` - Notion APIv2 token (see below)
- `notion_namespace: str [default: None]` - Notion namespace (your username) to form source URLs
- `notion_pages: array [default: [] ]` - List of Notion pages to export notes from (see below)
- `debug: bool [default: false]` enable debug logging to file.
- `sync_every_minutes: int [default: 30]` auto sync interval in minutes. Set to 0 to disable auto sync.
- `anki_target_deck: str [default: "Notion Sync"]` the deck loaded notes will be added to.
- `notion_token: str [default: None]` Notion APIv2 token (see below).
- `notion_namespace: str [default: None]` Notion namespace (your username) to form source URLs.
- `notion_pages: array [default: [] ]` List of Notion pages to export notes from (see below).

## Notion token

Expand All @@ -14,7 +14,7 @@ then press `Ctrl+Shift+I` to open Developer Tools, go to the "Application" tab
and find `token_v2` under Cookie on the left.

## Notion pages
`notion_pages` should look like that:
The `notion_pages` section should look like that:
```json
...
"notion_pages": [
Expand Down
Binary file modified tldr.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 677b737

Please sign in to comment.