All Projects → henrikh → files2flashcards

henrikh / files2flashcards

Licence: AGPL-3.0 license
Keep your flashcards rooted in the context of your notes

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to files2flashcards

anki-mode
An Emacs major mode for creating anki cards
Stars: ✭ 47 (+67.86%)
Mutual labels:  flashcards, anki
Anki Android
AnkiDroid: Anki flashcards on Android. Your secret trick to achieve superhuman information retention.
Stars: ✭ 4,425 (+15703.57%)
Mutual labels:  flashcards, anki
vocage
A minimalistic spaced-repetion vocabulary trainer (flashcards) for the terminal
Stars: ✭ 68 (+142.86%)
Mutual labels:  flashcards, anki
ForgetMeNot
A flashcard app for Android.
Stars: ✭ 234 (+735.71%)
Mutual labels:  flashcards, anki
mpvacious
Adds mpv keybindings to create Anki cards from movies and TV shows.
Stars: ✭ 286 (+921.43%)
Mutual labels:  flashcards, anki
anki-add-hooks-userscripts
Automate Anki card creation from popular translation websites
Stars: ✭ 17 (-39.29%)
Mutual labels:  flashcards, anki
anki-md
A markdown to anki flash cards converter
Stars: ✭ 22 (-21.43%)
Mutual labels:  flashcards, anki
2anki.net
Server to create Anki flashcards faster, easier and better today ⭐️
Stars: ✭ 190 (+578.57%)
Mutual labels:  flashcards, anki
AnkiSharp
Create anki decks and cards from your C# application
Stars: ✭ 39 (+39.29%)
Mutual labels:  flashcards, anki
mnemocards
In addition to helping you memorise, this code helps you do other things that I don't remember...
Stars: ✭ 34 (+21.43%)
Mutual labels:  flashcards, anki
chinese-support-redux
Anki add-on providing support for Chinese study
Stars: ✭ 88 (+214.29%)
Mutual labels:  flashcards, anki
ScienceNotebooks
Collection of tools and stylesheet for scientific writting and learning (through Anki)
Stars: ✭ 43 (+53.57%)
Mutual labels:  flashcards, anki
Polar Bookshelf
Polar is a personal knowledge repository for PDF and web content supporting incremental reading and document annotation.
Stars: ✭ 4,411 (+15653.57%)
Mutual labels:  flashcards, anki
AnnA Anki neuronal Appendix
Using machine learning on your anki collection to enhance the scheduling via semantic clustering and semantic similarity
Stars: ✭ 39 (+39.29%)
Mutual labels:  flashcards, anki
speed-focus-mode
Speed Focus Mode add-on for Anki
Stars: ✭ 19 (-32.14%)
Mutual labels:  flashcards, anki
ankigenbot
Telegram bot to automatically generate and upload anki cards to ankisrs.net
Stars: ✭ 58 (+107.14%)
Mutual labels:  anki
anki-markdown-notes
Anki add-on to extract notes from markdown files and import them to Anki
Stars: ✭ 34 (+21.43%)
Mutual labels:  anki
obsidian-spaced-repetition
Fight the forgetting curve by reviewing flashcards & entire notes on Obsidian.md
Stars: ✭ 667 (+2282.14%)
Mutual labels:  flashcards
manjaro-fs-arm64
Manjaro rootfs with xfce4 and vncserver preinstalled. Just setup username, password and vnc password. Also one more edition with latest Anki preinstalled.
Stars: ✭ 19 (-32.14%)
Mutual labels:  anki
google-translate-anki
No description or website provided.
Stars: ✭ 28 (+0%)
Mutual labels:  anki

files2flashcards

files2flashcards allows you to extract data from text files and convert it into flashcards in Anki. Keep your flashcards rooted in the context of your notes.

Disclaimer: Early stage of development! Make sure your backups work of both notes and flashcards!

Highlights

  • Specify flashcards using XML / HTML
  • Update your notes and see the changes reflected in existing flashcards
  • Flexible and configurable specification of flashcards including cloze deletions; design your own formats
  • See and edit your flashcards in context with other flashcards and notes
  • Written in Python and well-tested
  • Free and open-source software

Example usage and behavior

Note: You need AnkiConnect installed to use this. It has been tested with Python 3.7.

A flashcard for abbreviations might be specified as this:

<abbr class="h-fcard" title="Low Earth Orbit">LEO</abbr>

A mapping function is then used to extract the content from the HTML element and return a dictionary of field for Anki. This function is passed an ElementTree object.

def extract_abbreviation_basic(root):
    """Simple function for extracting abbreviation data"""

    return {"Back": root.attrib["title"], "Front": root.text}

This mapping function is then added to files2flashcards:

f2f.add_format(
    tag="abbr",
    class_name="h-fcard",
    note_type="Basic",
    mapping_function=extract_abbreviation_basic)

Here we specify that the HTML tag is abbr and the class h-fcard must be present. The note type is Basic and finally the mapping function is supplied. Additional formats can be added and any tag, class, note type and mapping function can in principle be used -- full flexibility!

To run files2flashcards you currently need to make a Python script to call the module. The following should give the basic principle:

import files2flashcards as f2f

# Select which deck is to be used
f2f.AnkiConnectWrapper.deck_name = "Default"

# Write your mapping function
def extract_abbreviation_basic(root):
    """Simple function for extracting abbreviation data"""

    return {"Back": root.attrib["title"], "Front": root.text}

# Add the format so `files2flashcards`
f2f.add_format(
    tag="abbr",
    class_name="h-fcard",
    note_type="Basic",
    mapping_function=extract_abbreviation_basic)

# Process all markdown files in the `notes` directory
f2f.process_folder("./notes/", regex=r'md$')

files2flashcards will edit your notes and insert the note ID from Anki into your notes again.

<abbr class="h-fcard" title="Low Earth Orbit" data-anki-id="13245">LEO</abbr>

This is used for updating notes. If the content of the above element is edited, then files2flashcards will update the corresponding note in Anki.

Cloze deletions

Cloze deletions are supported using the cloze format. In notes, a cloze is specified as the following:

<abbr class="h-fcard e-cloze"><em>This</em> is a <em>cloze</em></abbr>

The em-tags are interpreted as the cloze deletions.

Like all other flashcards generated with files2flashcards, the implementation is stable. Updating the definition of the cloze deletion updates the flashcards in Anki. Adding new cloze deletions preserves learning progress on all existing clozes. This is done by inserting the cloze's ID into the note, in a similar manner as the note IDs are stored.

How can I help? / Contributing

Contributions are welcome, in all kinds:

  • Telling your friends
  • Suggest features
  • Submit bug reports
  • Documentation
  • Fix bugs
  • Implement new features
  • Something I didn't think of!

Please also consult the project goals below.

Project goals

The goal of this project is to give a richer connection between text files and flashcards. Especially in relation to notes where flashcard data might be embedded.

This is sought to be achieved in two ways:

  1. Parsing data from files and mapping to flashcards
  2. Interfacing with flashcard software so the flashcards can be added

Non-goals

Implement flashcard / spaced-repetition software

Anki, Mnemosyne and others already implement this excellently.

Dream features

  • Command line arguments
  • Dry run mode
  • Configuration files
  • Accessible in package managers
  • Multithreaded processing
  • Performance evaluation
  • Error handling
  • Logging
  • Support for adding media to Anki
  • Support for other formats of flashcard data (something else than XML)
  • Support for other flashcard apps
  • Daemon / autorun
  • Documentation
  • Design documentation
  • Testing with hypothesis
  • More build in note types
  • Example uses
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].