GitXplorerGitXplorer
w

anki-thai

public
10 stars
1 forks
1 issues

Commits

List of commits on branch master.
Verified
8522e8757f4ed8ddaf5d5fbaa119a5afed13f7ef

Create LICENSE.txt

wwaf committed 3 years ago
Verified
2bc6fb5c5b05abfe2d2ac51eac7566b6619c1761

update readme

wwaf committed 5 years ago
Verified
9da69d1f6c128210fd0e1d2dad847061040ee9c2

switch to genanki library

wwaf committed 5 years ago
Verified
d60500f037f4f1ee94465722c554d4599b4f7f51

remove "to be" from adjective translations

wwaf committed 5 years ago
Verified
babaf9a78c8882881a186b314a35188572e11ecd

Minor clean up and removal of rarely used words

wwaf committed 6 years ago
Unverified
1c52dd65a062b97449732d7611cdf2c9793f1274

update readme with category list

wwaf committed 8 years ago

README

The README file for this repository.

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