This an Anki add on that automatically converts Notion notes into Anki flash cards. Currently in development!

Overview

NotionFlash

This is an Anki add on in development that will allow automatically convert your Notion study notes into Anki flash cards. The Anki deck created will remain synchronised with your notes, removing the need to rehash them into flash cards.

Motivation

NotionFlash was created as an integration between the wonderful document management platform Notion and the excellent open-source flash card utility Anki. The goal is to automate the creation of Anki flash cards derived from selected pages in a Notion workspace.

Installation

You can run this project just like any python script but at this stage in development it does require quite abit of initial setup.

Environment

To run this script requires abit of setup. Download the folder AnkiBots and within it create a .env file with the following variables

NOTION_SECRET=...
DECK=...
PAGE_ONE=...
PAGE_TWO=...
PAGE_THREE=...

The value for NOTION_SECRET is your Notion authentication token. You can find information about this here Notion API Authorisation and how to setup an API endpoint and share your Notion pages to it.

The value for DECK is the name of the ANKI deck you wish to add cards to.

The values for PAGE_ONE, PAGE_TWO, PAGE_THREE, PAGE_XXX and so on are Notion page id's. You can find out about page id's here Notion API Getting Started. You must format your page id as is in the following example

...
PAGE_ONE=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
...

You must then update line 26 in the main file with the page names you have specified in the .env as well as a tag for each respective page. For example

...
DATABASES = [{"Database":os.getenv("PAGE_ONE"), "cardTag": "PageOneTag"}, {"Database":os.getenv("PAGE_TWO"), "cardTag": "PageTwoTag"}, {"Database":os.getenv("PAGE_THREE"), "cardTag": "PageThreeTag"}]
...

AnkiConnect

You must install the Anki add on AnkiConnect and have Anki open when you run the script

How it works

This script leverages the Notion beta API and Notion toggle lists to create simple Question and Answer Anki cards. In order for the script to identify notes that you wish to convert into a card simply create a toggle (/toggle) in your Notion page with the Question as the title and the Answer as the nested content.

The script will run through all the toggle lists on your page and add them to your specified Anki deck. Cards are not duplicated the following formats are supported - numbered lists, bullet points, images.

Contributing

This project is in its infancy any and all ideas are welcome!

Licence

License: MIT

Licensed under the MIT Licence

Comments
  • [🐞BUG] Non-nested/Non-indented Toggle Lists not detected

    [🐞BUG] Non-nested/Non-indented Toggle Lists not detected

    ✏️ Describe the Bug

    Toggle list not identified if not nested/indented on Notion page

    💻 To Reproduce

    1. Create toggle list that is not indented or nested under any other block on Notion Page.
    2. Run Script

    🙏 Expected behavior

    Anki Card is created and added to deck

    🖼 Screenshots

    n/a

    🥳Additional context

    (https://github.com/neerajhp/NotionFlash/blob/3f261cc19ff49816312aa5c320f1b53752b99614/NotionFlash/notionservice/service.py#L86)

    bug 
    opened by neerajhp 0
  • Implement Logging Utility

    Implement Logging Utility

    Is your feature request related to a problem? Please describe.

    Current logging utility is limited to spitting out not entirely relevant information to console.

    Describe the solution you'd like

    Implement logging utility to output formatted error messages, time data and the following relevant information

    • Notion page(s) accessed
    • Number of toggles detected
    • Deck(s) added to
    • Number of duplicates detected
    • Number of new cards added

    Describe alternatives you've considered

    n/a

    Additional context

    n/a

    enhancement good first issue 
    opened by neerajhp 0
  • Check for card updates

    Check for card updates

    🔗 Is your feature request related to a problem? Please describe.

    Currently checks for duplicate cards are handled by AnkiConnect.

    AnkiConnect cannot handle checking for card updates resulting in updated cards added to deck.

    💭Describe the solution you'd like

    Handle duplicate checking within main script.

    📚 Describe alternatives you've considered

    n/a

    🥳 Additional context

    n/a

    enhancement 
    opened by neerajhp 0
  • Testing Framework

    Testing Framework

    Is your feature request related to a problem? Please describe.

    Currently no testing is performed on script

    Describe the solution you'd like

    Establish testing framework

    Describe alternatives you've considered

    Additional contex

    enhancement 
    opened by neerajhp 0
  • Get decks from existing

    Get decks from existing

    Is your feature request related to a problem? Please describe.

    Currently users must specify the name of the deck they wish to add cards to as a .env variable

    Describe the solution you'd like

    Allow user to select deck from list of existing or create a new deck to add to

    Describe alternatives you've considered

    n/a

    Additional context

    n/a

    enhancement 
    opened by neerajhp 0
  • Integrate with Anki as Add On

    Integrate with Anki as Add On

    Is your feature request related to a problem? Please describe.

    Make software accessible to individuals through Anki Add on

    Describe the solution you'd like

    n/a

    Describe alternatives you've considered

    n/a

    Additional contex

    n/a

    enhancement 
    opened by neerajhp 0
  • Move Database Array to .env

    Move Database Array to .env

    Is your feature request related to a problem? Please describe.

    Currently users must main script to indicate which Notion pages (specified in .env) they wish to access and what tags they wish to attach to added Anki cards

    Describe the solution you'd like

    Centralise user specified vars in .env

    Describe alternatives you've considered

    n/a

    Additional context

    n/a

    enhancement good first issue 
    opened by neerajhp 0
Owner
Neeraj Patel
Welcome to my Github!
Neeraj Patel
Mnemosyne: efficient learning with powerful digital flash-cards.

Mnemosyne: Optimized Flashcards and Research Project Mnemosyne is: a free, open-source, spaced-repetition flashcard program that helps you learn as ef

null 359 Dec 24, 2022
Anki cards generator for Leetcode

Leetcode Anki card generator Summary By running this script you'll be able to generate Anki cards with all the leetcode problems. I personally use it

Pavel Safronov 150 Dec 25, 2022
Anki Cards for the HSK vocabulary Chinese-German

Anki-HanyuShuipingKaoshi Anki Cards for the HSK vocabulary Chinese-German Das Deck baut auf folgenden Quellen auf: China Endecken Wortschatz von wohok

null 1 Jan 7, 2022
A basic notes app to store your notes.

Notes Webapp A basic notes webapp to keep your notes.You can add, edit and delete notes after signing up. To add a note type your note in the text box

null 2 Oct 23, 2021
Automatically deletes Capital One Eno virtual cards for when you've made a couple too many.

eno-delete Automatically deletes Capital One Eno virtual cards for when you've made a couple too many. Warning: Program will delete ALL virtual cards

h3x 3 Sep 29, 2022
A Python script to convert your favorite TV series into an Anki deck.

Ankiniser A Python3.8 script to convert your favorite TV series into an Anki deck. How to install? Download the script with git or download it manualy

null 37 Nov 3, 2022
This app converts an pdf file into the audio file.

PDF-to-Audio This app takes an pdf as an input and convert it into audio, and the library text-to-speech starts speaking the preffered page given in t

Ojas Barawal 3 Aug 4, 2021
Converts a base copy of Pokemon BDSP's masterdatas into a more readable and editable Pokemon Showdown Format.

Showdown-BDSP-Converter Converts a base copy of Pokemon BDSP's masterdatas into a more readable and editable Pokemon Showdown Format. Download the lat

Alden Mo 2 Jan 2, 2022
It converts ING BANK account historic into a csv file you can import in HomeBank application.

ing2homebank It converts your ING Bank account historic csv file into another csv file you can import in HomeBank application

null 1 Feb 14, 2022
Blender Add-on to Add Metal Materials to Your Scene

Blender QMM (Quick Metal Materials) Blender Addon to Add Metal Materials to Your Scene Installation Download the latest ZIP from Releases. Usage This

Don Schnitzius 27 Dec 26, 2022
Just some mtk tool for exploitation, reading/writing flash and doing crazy stuff

Just some mtk tool for exploitation, reading/writing flash and doing crazy stuff. For linux, a patched kernel is needed (see Setup folder) (except for read/write flash). For windows, you need to install zadig driver and replace pid 0003 / pid 2000 driver.

Bjoern Kerler 1.1k Dec 31, 2022
🎴 LearnQuick is a flashcard application that you can study with decks and cards.

?? LearnQuick is a flashcard application that you can study with decks and cards. The main function of the application is to show the front sides of the created cards to the user and ask them to guess the back of the card. As a result of self-assessment of user's ability to guess the back sides of the displayed cards, the cards that user weak against are shown more often, and the cards that user strong against are shown less frequently.

Mehmet Güdük 7 Aug 21, 2022
Easily Generate Revolut Business Cards

RevBusinessCardGen Easily Generate Revolut Business Cards Prerequisites Before you begin, ensure you have met the following requirements: You have ins

Younes™ 35 Dec 14, 2022
The fastest way to copy to (not from) high speed flash storage.

FastestCopy The fastest way to copy to (not from) high speed flash storage. This is about 3-6x faster than file copy on explorer.exe to usb flash driv

Derek Frombach 0 Nov 3, 2021
A Lego Mindstorm robot for dealing out cards based on a birds-eye view of a poker table and given ArUco fiducial tags.

A Lego Mindstorm robot for dealing out cards based on a birds-eye view of a poker table and given ArUco fiducial tags.

null 4 Dec 6, 2021
Build Xmas cards with user inputs

Automatically build Xmas cards with user inputs

Anand 9 Jan 25, 2022
A tool to guide you for team selection based on mana and ruleset using your owned cards.

Splinterlands_Teams_Guide A tool to guide you for team selection based on mana and ruleset using your owned cards. Built With This project is built wi

Ruzaini Subri 3 Jul 30, 2022
Pyrmanent - Make all your classes permanent in a flash 💾

Pyrmanent A base class to make your Python classes permanent in a flash. Features Easy to use. Great compatibility. No database needed. Ask for new fe

Sergio Abad 4 Jan 7, 2022
A small script I made that takes any standard Decklist of magic the gathering cards and pulls all card images from scryfall at once!

A small script I made that takes any standard Decklist of magic the gathering cards and pulls all card images from scryfall at once!

null 15 Aug 26, 2022