Skip to content
forked from 2anki/server

Easily convert your Notion Toggles to Anki flashcards ⭐️

License

Notifications You must be signed in to change notification settings

mrljdx/Notion-to-Anki

 
 

Repository files navigation

Notion to Anki logo

Netlify Status Discord Twitter

Notion to Anki 💫 is a passion project 🕺🏾💃🏾 We are going to make this a good way to make Anki flashcards easier, better and faster.

  • You can convert your Notion toggle lists to Anki cards easily.
  • No technical skills required and 100% free to use by anyone anywhere 🤗
  • Support for embeds, audio files, images and more.

Sponsors

Scrimba.com

👩🏼‍🎓👨‍🎓️👨‍🏫️👩🏽‍🏫 Scrimba - the mind-blowing way to to code!

🎁 Support the Project

This project is brought to you by our amazing patrons and GitHub sponsors 🤩 Thank you!

Patreon ko-fi Buy Me A Coffee

GitHub Sponsor Paypal

You can also support the project financially and receive exclusive member benefits like ✨

  • Access to my Facebook messenger so you can DM me 24/7📱
  • Your name will be added to the BACKERS file on GitHub 🔝
  • Exclusive access to a private channel for supporters 💬
  • Early access to the updates feed on the development 📰
  • Lots of encouragement on your learning journey
  • Personal recorded thank you video 🤳🏾

How it works

We treats toggle lists on the top level as Anki flashcards. The toggle list line is the front of the card and everything inside in the details is the back. That's the main feature but you can customize the behaviour via card options.

Considering how powerful cloze deletions are, they are the default note type. To see how this works in action check out this video by Alp Kaan: How to use cloze deletions in notion2anki 🤩

You can use the card type to flip which creates a mix of the cards. Basic (front & back), basic + reversed and just reversed.

So by default we are reading in the Notion styles which does not necessarily look good on all devices. Especially on iOS you can see some weird text alignment issues. Those can be solved by adding this to your card template:

body {
  padding: 1rem;
  text-align: left;
}

Background

This project was hacked together after seeing this post on Reddit by jacksong97:

Hey guys just need a little help with something.

I have a whole bunch of questions that I've written for myself within Notion (nested toggle questions). I was hoping I could transfer them into Anki cards fairly painlessly. I have done some just copying and pasting each side separately but it just took too long.

Is there a way to import directly or copy and paste into a txt file or something that will create the cards for me?

Thanks!

Edit: if I were to just turn them into a text file, how do I set which text goes to the back of the card? I’ve been able to get them all into seperate cards but just the fronts

https://www.reddit.com/r/Anki/comments/g29mzk/cards_imported_from_notion/

Roadmap

The dream is to have a powerful and easy to use process for producing high quality flashcards. Notion is super easy to use and Notion 2 Anki is just going to make the importing process and controlling the look of the cards / decks smooth. This project is a complement to Anki and Notion.

You can purpose changes via the Suggestions page.

Development

If you prefer using Visual Studio Code, there is a code tour available in the repository.

There are two directories [web][./web] and [server][./server]. The web is a React application and the server is a Express.js application.

We are assuming you have Node.js already installed, if not then see their website on how install it https://nodejs.org/en/

While not required, nvm is a good tool to make sure you are using the correct Node.js version.

First make sure you have the dependencies installed

yarn --cwd server install
yarn --cwd web install

An extra dependency on the server is python3 and the genanki module, make sure you install them.

pip3 install -r server/genanki/requirements.txt

Running

Depending on wether you want to run the web interface or backend server the command look a little bit different. Note that commands will continously build the project. So open up your code editor and start writing code ;-)

Running the Backend Server

cd server
yarn dev

Running the Web Server

cd web
yarn start

To actually see the app running you need to either visit the local url in a browser or launch the app with

Frontend: http://localhost:3000 Backend: http://localhost:2020

Credits

Special thanks to following developers / artistans


Alexander Alemayhu

💻 👀 📖 📹

Alp Kaan Aksu

💻 📹

Mads Cordes

💻

Guillem Palau-Salvà

💬 🤔

Marcel Walk

💻

License

Unless otherwise specified in the source:

The code is licensed under the MIT Copyright (c) 2020, Alexander Alemayhu

The MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

Easily convert your Notion Toggles to Anki flashcards ⭐️

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 58.0%
  • CSS 23.9%
  • HTML 11.3%
  • Python 6.2%
  • Dockerfile 0.3%
  • Makefile 0.2%
  • Shell 0.1%