{"id":15017333,"url":"https://github.com/guiferviz/mnemocards","last_synced_at":"2025-04-12T11:43:22.297Z","repository":{"id":39824468,"uuid":"231997037","full_name":"guiferviz/mnemocards","owner":"guiferviz","description":"In addition to helping you memorise, this code helps you do other things that I don't remember...","archived":false,"fork":false,"pushed_at":"2023-07-25T21:18:46.000Z","size":2231,"stargazers_count":39,"open_issues_count":7,"forks_count":9,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T06:33:58.881Z","etag":null,"topics":["anki","anki-flashcards","cards","flashcards","memorization","python"],"latest_commit_sha":null,"homepage":"https://guiferviz.com/mnemocards","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/guiferviz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-06T00:52:07.000Z","updated_at":"2024-05-26T13:08:21.000Z","dependencies_parsed_at":"2023-01-25T05:31:18.874Z","dependency_job_id":null,"html_url":"https://github.com/guiferviz/mnemocards","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guiferviz%2Fmnemocards","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guiferviz%2Fmnemocards/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guiferviz%2Fmnemocards/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/guiferviz%2Fmnemocards/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/guiferviz","download_url":"https://codeload.github.com/guiferviz/mnemocards/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248564035,"owners_count":21125404,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anki","anki-flashcards","cards","flashcards","memorization","python"],"created_at":"2024-09-24T19:50:19.115Z","updated_at":"2025-04-12T11:43:22.273Z","avatar_url":"https://github.com/guiferviz.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://guiferviz.github.io/mnemocards\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://guiferviz.com/mnemocards/images/logo.jpg\"\n             alt=\"Mnemocards logo\"\n             width=\"200\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/guiferviz/mnemocards/actions/workflows/cicd.yaml\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://github.com/guiferviz/mnemocards/actions/workflows/cicd.yaml/badge.svg\"\n             alt=\"Mnemocards CI pipeline status\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://app.codecov.io/gh/guiferviz/mnemocards/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/codecov/c/github/aidictive/mnemocards\"\n             alt=\"Mnemocards coverage status\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/guiferviz/mnemocards/issues\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/issues/guiferviz/mnemocards\"\n             alt=\"Mnemocards issues\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://github.com/aidictive/mnemocards/graphs/contributors\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://img.shields.io/github/contributors/guiferviz/mnemocards\"\n             alt=\"Mnemocards contributors\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/mnemocards/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://pepy.tech/badge/mnemocards\"\n             alt=\"Mnemocards total downloads\"\u003e\n    \u003c/a\u003e\n    \u003ca href=\"https://pypi.org/project/mnemocards/\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://pepy.tech/badge/mnemocards/month\"\n             alt=\"Mnemocards downloads per month\"\u003e\n    \u003c/a\u003e\n    \u003cbr /\u003e\n    In addition to helping you memorise, this code helps you do other things that I don't remember...\n\u003c/p\u003e\n\n---\n\n:books: **Documentation**:\n\u003ca href=\"https://guiferviz.com/mnemocards\" target=\"_blank\"\u003e\n    https://guiferviz.com/mnemocards\n\u003c/a\u003e\n\n:keyboard: **Source Code**:\n\u003ca href=\"https://github.com/guiferviz/mnemocards\" target=\"_blank\"\u003e\n    https://github.com/guiferviz/mnemocards\n\u003c/a\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n    \u003ca href=\"https://guiferviz.github.io/mnemocards\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://guiferviz.com/mnemocards/images/hello_hola_note.png\"\n             alt=\"Mnemocards generated vocabulary card\"\n             width=\"500\"\u003e\n    \u003c/a\u003e\n\u003c/p\u003e\n\n## 🤔 What is this?\n\n**Mnemocards** is a Python package originally intended for creating Anki\nflashcards from text files. It allows users to define a series of steps to read\nflashcards from any source, transform them and export them to different formats\nsuch as Anki APKG packages.\n\nMnemocards is designed to be fully extensible, which means that users can\ncreate their own tasks and customize the card generation process to their\nspecific needs. Indeed, Mnemocards has the versatility to be used for purposes\nbeyond generating Anki decks.\n\n\n## 🏷️ Features\n\n* **Generate Anki APKG packages** that you can later import into the Anki app.\n* Auto **generate pronunciations** from the words that you are learning in any\nlanguage supported by Google Translator.\n* Generate **flashcards from text files** that can be stored in Git\nrepositories. This brings several positive things:\n    * Keep **track of changes**.\n    * Edit cards using your **favourite text editor**. I :heart: VIM.\n    * Easily **share and collaborate with others**. If you know how to work\n    with Git you can create forks and pull requests to existing repositories.\n* **Fully extensible architecture** that allows you to define custom\ntransformations on a list of notes.\n    * Possibility to implement another way of exporting flashcards to other\n      existing flashcards apps. Contributions are welcome.\n    * Possibility to create search indexes, analyze your collection of cards,\n      create visualizations, clustering, analyze how the cards relate to each\n      other... Contributions are welcome.\n\n\n## ⚙️ Installation\n\nTo get started with Mnemocards, you'll need to have Python \u003e= 3.10 installed on\nyour computer. Then, you can install Mnemocards using `pip`:\n\n```cmd\n$ pip install --pre mnemocards\n```\n\nYou can check that the installation went well by executing the following\ncommand:\n\n```cmd\n$ mnemocards --version\n╔╦╗╔╗╔╔═╗╔╦╗╔═╗┌─┐┌─┐┬─┐┌┬┐┌─┐\n║║║║║║║╣ ║║║║ ║│  ├─┤├┬┘ ││└─┐\n╩ ╩╝╚╝╚═╝╩ ╩╚═╝└─┘┴ ┴┴└──┴┘└─┘ X.Y.Z\n╭────────────────────────────────╮\n│ \u003cA super mega funny joke here\u003e │\n╰────────────────────────────────╯\n```\n\nIf the joke made you laugh you can continue with this tutorial, otherwise this\nprogram is not for you and you should consider other alternatives.\n\n\n## ❓How it works?\n\nOnce you have Mnemocards installed, you can start creating your own flashcards.\nLet's start creating our own vocabulary Anki cards.\n\nImagine you are learning Spanish and you have a list of vocabulary like this:\n\nEnglish | Spanish |\n--------|---------|\nHello   | Hola    |\nBye     | Adiós   |\n\nIf you want to use Mnemocards to generate Anki cards for those words the first\nthing you need to do is to create a CSV file like the following:\n\n```csv title=\"vocabulary.csv\"\nyour_language_word,language_you_learn_word,id\nHello,Hola,9a6c9728-7f86-4e3f-9dec-a2f804bd0a76\nBye,Adiós,e600a85a-8a6b-4449-a188-f7401dc69d6b\n```\n\nA CSV file is a text file that represents a table. The first line is the header\nof the table, after that header line we have one line per row. Each column is\nseparated from the other with a column. CSV stands for Comma-Separated Values.\n\nThe first column contains the word in your native language, in this case\nEnglish. The second row is the word in the language you are learning, Spanish.\nThe last column is a randomly generated ID.\n\n!!! question \"Why do we need an ID?\"\n\n    IDs are used to uniquely identify a note in Anki. We can use the Spanish\n    word as an ID, but if you start studing a card and you want to make an edit\n    later the card will be considered as a complete new one, loosing your\n    progress.\n\n    For example, imagine you write *Adios* and after several days of study you\n    realise that your miss the accent. If you chage *Adios* to *Adiós* the\n    ID of that note will be different. To avoid this kind of problems I decided\n    to include an ID column.\n\nMnemocards uses a configuration file named `mnemocards.yaml` to define the\nsteps that will be used to process our flashcards. In this file, you can\nspecify the tasks that you want to use, the order in which they will be\nexecuted, and any necessary parameters.\n\nHere is an example of a simple configuration file that reads in a CSV file\ncontaining vocabulary data, and then generates an Anki APKG package:\n\n```yaml title=\"mnemocards.yaml\"\nsteps:\n  # Read a CSV file with our spanish vocabulary.\n  - type: ReadCsv\n    path: vocabulary.csv\n  # Tag the generated notes and assign them to an Anki deck.\n  - type: mnemocards_anki.Configure\n    tags: spanish, languages\n    deck:\n      name: Spanish\n      id: 429d2604-ca8a-4c0a-9b03-38d1df5b9af7\n    note_type: mnemocards_anki.VocabularyNoteType\n  # Pronounce the spanish words using Google Translator.\n  - type: mnemocards_anki.Pronounce\n    language: es\n    attribute_to_pronounce: language_you_learn_word\n  # Save the Anki package.\n  - type: mnemocards_anki.Package\n  # Show the generated tasks in the terminal.\n  # Do not print the note id, the note_type and the deck to avoid cluttering the terminal.\n  - type: Print\n    ignore_regex: id|note_type|deck\n  # Show some stats of the generation process.\n  - type: Stats\n```\n\nYou can run the configuration file using the following command:\n\n```cmd\n$ mnemocards run mnemocards.yml\n```\n\nThis will execute the steps in the configuration file, and will generate an\nAnki package named `out.apkg` by default. The generated file is in the same\ndirectory as your `mnemocards.yaml`.\n\nIf you import the `apkg` file to Anki you can start studying Spanish:\n\n\u003cimg src=\"https://guiferviz.com/mnemocards/images/hello_hola_note.png\"\n     alt=\"Mnemocards generated vocabulary card\"\n     width=\"400\"\u003e\n\n\n## 🤓 What is next?\n\nIf you have come this far, it is because you may have found this project\ninteresting. Consider visiting the\n[documentation](https://guiferviz.com/mnemocards), in particular the\n[examples](https://guiferviz.com/mnemocards/examples) section to learn more.\n\nAs mentioned above, Mnemocards is fully extensible, so any data source you miss\nor any processing or analysis you want to do on your cards is more than\nwelcome. Feel free to [post your\nidea](https://github.com/guiferviz/mnemocards/discussions/categories/ideas) to\nstart a discussion. Do not worry if you do not know how to program, there may\nbe someone who can do it for you.\n\nEnjoy learning!!!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguiferviz%2Fmnemocards","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fguiferviz%2Fmnemocards","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fguiferviz%2Fmnemocards/lists"}