{"id":24673738,"url":"https://github.com/lastek/ankiport","last_synced_at":"2026-05-15T23:35:03.045Z","repository":{"id":273797382,"uuid":"920914819","full_name":"Lastek/Ankiport","owner":"Lastek","description":"Takes in Q\u0026A Cards in plaintext and turns them into Anki flashcards.","archived":false,"fork":false,"pushed_at":"2025-01-30T03:37:57.000Z","size":10,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-21T15:52:18.888Z","etag":null,"topics":["anki","anki-cards","college","python","student","studying","studying-tool","text-analysis","text-summarization","tool","useful","utility"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Lastek.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2025-01-23T01:55:19.000Z","updated_at":"2025-01-30T03:52:07.000Z","dependencies_parsed_at":"2025-03-21T15:47:54.702Z","dependency_job_id":"c418cbf0-4507-4c93-9f03-e6f1931be812","html_url":"https://github.com/Lastek/Ankiport","commit_stats":null,"previous_names":["lastek/ankiport"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Lastek/Ankiport","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastek%2FAnkiport","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastek%2FAnkiport/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastek%2FAnkiport/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastek%2FAnkiport/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Lastek","download_url":"https://codeload.github.com/Lastek/Ankiport/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Lastek%2FAnkiport/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33083611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-15T20:25:35.270Z","status":"ssl_error","status_checked_at":"2026-05-15T20:25:34.732Z","response_time":103,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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-cards","college","python","student","studying","studying-tool","text-analysis","text-summarization","tool","useful","utility"],"created_at":"2025-01-26T11:13:47.754Z","updated_at":"2026-05-15T23:35:03.030Z","avatar_url":"https://github.com/Lastek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# File Format and Structure Documentation\n\n\u003e Documentation generated with ChatGPT and edited by Lastek \n\n___\n- [x] See `prompts.txt` for how to generate cards with an LLM. I used deepseek.\n- [x] Check cs430 example files for how it should look and to expect.\n___\n\nThis document explains the file formats and structures required for the Anki card processing program. Follow these guidelines to correctly format input and tag files, and interpret the output.\n\n## How to use it\n```bash\npython ankiport.py \u003cfilename\u003e.txt \u003ctagsfilename\u003e.txt\n```\n\n__I suggest naming your tags `\u003cfilename\u003e_tags.txt` to make things less confusing.__\n\n## Cards File (`\u003cfilename\u003e.txt`)\n\n‼️ Must have `.txt` extension ‼️\n\nPurpose: Contains the question-answer pairs to be processed.\n\nFormat:\n ```\nCard #:\nQ: [Question] for the question.\nA: [Answer] for the answer.\n```\n\n__Multi-line answers should be indented or separated by new lines.__\n\nExample:  \n```\nCard #:\nQ: What is the difference between logical schema and physical schema?  \nA:\n    Logical schema: The overall logical structure of the database (e.g., information about customers and accounts in a bank).  \n    Physical schema: The overall physical structure of the database (how data is stored on disk).  \n```\n            \n## Tags File (`\u003ctagsfilename\u003e.txt`)\n\nPurpose: Maps keywords in answers to corresponding tags.\n\nFormat:\n\n- A Python dictionary structure where:\n\n    - Keys are keywords (case-insensitive).\n\n    - Values are corresponding tags.\n\nExample:\n```python\n{\n    \"database\": \"database\",\n    \"DBMS\": \"DBMS\",\n    \"transaction\": \"transactions\",\n    \"schema\": \"schema\",\n    \"query\": \"query_processing\"\n}\n```\n\n## Output File\nProcessed Cards File (`\u003cfilename\u003e_anki.txt`)\n\nPurpose: Contains the formatted cards ready for Anki import.\n\nFormat:\n\n- Each line represents one card, consisting of three tab-separated fields:\n\n\n| Question | Answer | Tags |\n| ----------- | ----------- | ----------- | \nQuestion | Answer (multi-line content replaced with \u003cbr\u003e tags). | Tags (space-separated). |\n\nExample:\n```\nWhat is a database?   A database is a large, integrated collection of data that models a real-world enterprise, including entities (e.g., students, courses) and relationships (e.g., Lady Gaga is taking CS 430).   database\n```\n\n## How the Program Works\n\nInput:\n\n- The program reads `\u003cfilename\u003e.txt` for card data.\n\n- It reads `\u003cfilename\u003e_tags.txt` for keyword-to-tag mapping.\n\nProcessing:\n\n- Replaces multi-line answers with `\u003cbr\u003e` for Anki compatibility.\n\n- Matches keywords in answers to generate corresponding tags.\n\nOutput:\n\n- Writes the formatted cards with tags to `\u003cfilename\u003e_anki.txt`.\n\n## Usage Instructions\n\n1. Prepare your input files:\n\n2. Create `\u003cfilename\u003e.txt` with question-answer pairs.\n\n3. Create `\u003cfilename\u003e_tags.txt` with the keyword-to-tag dictionary.@\n\n4. Run the program:\n\n   - Ensure the script and files are in the same directory.\n\n    - Ensure the script in a Python environment.\n\n5. Import into Anki:\n\n    - Go into your deck and select File \u003e Import.\n    - Import the generated file and verify everything looks ok.\n\n## Notes\n\n- Modify tags.txt to adapt tags to your specific needs.\n\n- Ensure the input files follow the required structure for accurate processing.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flastek%2Fankiport","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flastek%2Fankiport","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flastek%2Fankiport/lists"}