Giter Site home page Giter Site logo

anki-thai's Introduction

This repository builds a thai.apkg file (for importing into Anki/AnkiDroid) from the JSON file resources/cards.sealang.json. It's built around thai/english language flashcards, but it shouldn't be too hard to repurpose it for other JSON files.

Download

If you just want the Thai flashcards generated by this library, download dist/thai.apkg.

Installation

If you want to generate your own Anki flash card deck (.apkg), clone this repo and modify the python script as required.

Modification

Modify the json-to-anki.py script. The script reads a json file that contains an array of the objects:

{
    "rank":"1",
    "source":"AUA Reader AUA Chapter 01",
    "thai": "ดี",
    "english":"good"
}

If you import this file, it would not have any nested decks in the resulting Anki deck (because it's a flat array of cards). If you want categories (in this case, a category for each chapter), you would design a source map like this:

{
    "AUA Reader AUA Chapter 01": {
        "source": "AUA Lessons::Chapter 01"
    },
    "AUA Reader AUA Chapter 02": {
        "source": "AUA Lessons::Chapter 02"
    }
}

json-to-anki.py

Converts a json file to an APKG file, with support for nested decks.

# generate cards from a source json file
$ ./json-to-anki.py

split-json

A helper script for splitting large JSON files into smaller JSON files.

# list all sources
$ ./split-json.py list

# split source
$ ./split-json.py split $source $outfile

# example
$ ./split-json.py split SEAlang SEAlang.json

SEALang deck

The SEALang deck generated from the cards.sealang.json file contains the following categories ("nested decks"):

  • AUA Lessons
    • Chapter 01
    • ...
    • Chapter 60
  • Common Parts of Speech
    • Adjective Comparisons
    • Adjective Stative Verbs
    • Adjectives
    • Classifiers
    • Nouns
    • Prefixes
    • Prepositions of Location
    • Verbs
  • Phonology
    • Consonants - High Class
    • Consonants - Low Class
    • Consonants - Middle Class
    • Long Vowels
    • Short Vowels
  • Topics
    • Abbreviations
    • Academic Words
    • Alphabet Words
    • Animals
    • Art
    • Astronomy
    • Body
    • Books
    • Buddhism
    • Buildings
    • Business
    • Calendar
    • Cloth
    • Clothes
    • Colors
    • Compass
    • Computer
    • Construction
    • Containers
    • Court
    • Crime
    • Directions
    • Economics
    • Education
    • Elections
    • Emergencies
    • Emotion
    • Environment
    • Everyday Conversation
    • Family
    • Feelings
    • Food
    • Fruits and Vegetables
    • Fuel
    • Geography
    • Government
    • Heart
    • Home
    • Important Places
    • International Relations
    • Job Applications
    • Jobs
    • Maanii Book Vocab
    • Materials
    • Math
    • Measurement
    • Military
    • Ministries and Bureaucracy
    • Miscellaneous
    • Music
    • Narcotics
    • Nature
    • Numbers
    • Paperwork
    • People
    • Personal Information
    • Places
    • Politics
    • Questions
    • Reading Vocabulary
    • Religion
    • School
    • Senses
    • Situation
    • Sports
    • TV and News
    • Terrorism
    • Thai Geography
    • The King and Royal Family
    • Time
    • Transportation
    • Weapons
    • Weather
    • Web
    • Writing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.