{"id":21358384,"url":"https://github.com/danzigerrr/anki-flashcards-generator","last_synced_at":"2025-06-26T16:35:53.139Z","repository":{"id":258384025,"uuid":"873827010","full_name":"Danzigerrr/Anki-Flashcards-Generator","owner":"Danzigerrr","description":"Generate Anki Flashcards Decks Using Genanki","archived":false,"fork":false,"pushed_at":"2024-10-18T08:00:43.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-16T06:16:52.755Z","etag":null,"topics":["anki-flashcards","automation","mit-license","python"],"latest_commit_sha":null,"homepage":"","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/Danzigerrr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-16T19:35:35.000Z","updated_at":"2024-10-18T08:00:46.000Z","dependencies_parsed_at":"2024-10-18T18:51:09.547Z","dependency_job_id":"bfaee2f6-2a54-47be-a6b4-560f9a4cd6da","html_url":"https://github.com/Danzigerrr/Anki-Flashcards-Generator","commit_stats":null,"previous_names":["danzigerrr/anki-flashcards-generator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Danzigerrr/Anki-Flashcards-Generator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danzigerrr%2FAnki-Flashcards-Generator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danzigerrr%2FAnki-Flashcards-Generator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danzigerrr%2FAnki-Flashcards-Generator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danzigerrr%2FAnki-Flashcards-Generator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Danzigerrr","download_url":"https://codeload.github.com/Danzigerrr/Anki-Flashcards-Generator/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Danzigerrr%2FAnki-Flashcards-Generator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262103074,"owners_count":23259384,"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-flashcards","automation","mit-license","python"],"created_at":"2024-11-22T05:16:01.110Z","updated_at":"2025-06-26T16:35:53.073Z","avatar_url":"https://github.com/Danzigerrr.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Flashcard Generator\n\n![Python](https://img.shields.io/badge/python-3.8%2B-blue.svg)\n![License](https://img.shields.io/badge/license-MIT-brightgreen.svg)\n\nThis project is a simple flashcard generator that reads a CSV file containing questions and answers, \ncreates flashcards, and exports them as an Anki deck (`.apkg` file). It uses the [genanki library](https://github.com/kerrickstaley/genanki) \nto create the deck and notes for studying.\n\nThe generated flashcards can be used with the [Anki app](https://apps.ankiweb.net/), which is a program designed to make \nremembering things easy. Anki is much more efficient than traditional study methods, allowing you to either greatly\ndecrease your time spent studying or significantly increase the amount you learn.\nIt benefits anyone who needs to remember information in their daily life.\n\n## Table of Contents\n   * [Project Structure](#project-structure)\n   * [Requirements](#requirements)\n   * [Setting Up a Virtual Environment](#setting-up-a-virtual-environment)\n   * [Usage](#usage)\n   * [How it Works](#how-it-works)\n   * [License](#license)\n\n### Project Structure:\n- **`main.py`**: The entry point of the application. It reads the CSV data and triggers the flashcard creation process.\n- **`csv_reader.py`**: Contains the `read_csv_file` function, which reads the CSV file and returns a list of dictionaries with questions and answers.\n- **`flashcards_creator.py`**: Contains functions to generate the Anki deck and write it to an `.apkg` file.\n- **`data.csv`**: The CSV file containing the questions and answers. You can edit this file to add more flashcards.\n- **`English to German words.apkg`**: The output Anki deck generated by the program. This file can be imported into Anki.\n- **`requirements.txt`**: Lists the Python dependencies needed for the project.\n\n## Requirements\n\nThis project requires Python 3.8 or higher. To manage dependencies, it's recommended to set up a virtual environment.\n\n## Setting Up a Virtual Environment\n\n1. **Create a virtual environment**:\n\n   ```bash\n   python -m venv .venv\n   ```\n\n2. **Activate the virtual environment**:\n\n    - On Windows:\n\n      ```bash\n      .venv\\Scripts\\activate\n      ```\n\n    - On macOS/Linux:\n\n      ```bash\n      source .venv/bin/activate\n      ```\n\n3. **Install the necessary dependencies**:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n## Usage\n\n1. **Prepare the CSV file**: The `data.csv` file should contain your questions and answers in the following format:\n\n   ```csv\n   question,answer\n   Hallo,Hello\n   Danke,Thank you\n   ```\n\n2. **In `main.py` define `csv_filename`, `csv_delimiter`, and the name of the deck to be created (`deck_name`)**:\n   ```python\n    csv_filename = 'data.csv'\n    csv_delimiter = ','\n    questions_and_answers = read_csv_file(csv_filename, csv_delimiter)\n   \n    deck_name = \"English to German words\"\n    create_flashcards(questions_and_answers, deck_name)\n   ```\n\n3. **Run the Application**:\n   Execute the `main.py` script to generate the Anki flashcards.\n\n   ```bash\n   python main.py\n   ```\n\n4. **Output**: The generated Anki deck with the defined deck name will be saved in the project directory. \nYou can import this file into your Anki app for study.\n\n## How it Works\n\n1. The `main.py` script reads the `data.csv` file using the `read_csv_file` function from `csv_reader.py`.\n2. The questions and answers are passed to the `create_flashcards` function in `flashcards_creator.py`.\n3. Flashcards are created and stored in an Anki deck, which is then exported as an `.apkg` file.\n\nNote: The names of the decks, models, and other elements in the code are just examples. Feel free to modify them as needed.\n\n## License\n\nThis project is licensed under the MIT License. You can view the license [here](https://github.com/Danzigerrr/Anki-Flashcards-Generator?tab=MIT-1-ov-file) and original template [here](https://opensource.org/licenses/MIT).\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanzigerrr%2Fanki-flashcards-generator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanzigerrr%2Fanki-flashcards-generator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanzigerrr%2Fanki-flashcards-generator/lists"}