Skip to content

cambrian-dk/vocabgenerator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vocabgenerator

Vocabgenerator is a python utility that scrapes thai-language.com to make Anki flashcards with voiceovers of words.

Installation

Clone this repo to your device

This project uses poetry as its dependency manager, so have that installed

pip install poetry

In the main folder, run poetry install to install all required packages and dependencies

Sign up for Google Cloud, and create a project. Create a JSON key for TTS and add it to the root folder.

Next, figure out the directory where Anki stores all media for flashcards

In the main folder, create a config.yml file as follows:

gcloud:
  filename: SERVICE_ACCOUNT_JSON_LOCATION

user:
  media-location: ANKI_MEDIA_LOCATION

Usage

Vocabgenerator takes a .txt file containing line-separated words to process, or manual entry of words.

example .txt file

แอปเปิ้ล
ส้ม
กล้วย
poetry run python bot.py words.txt

poetry run python bot.py

The created flashcards will be stored in ./results, and are output as a csv of [word, transliteration, definition, example]

Then, import the deck into Anki. A sample card type:

Front:
{{Front}}

Back:
{{FrontSide}}
<br>
{{Translit}}

<hr id=answer>
{{Back}}

<hr>
{{Back2}}

License

MIT

About

Scraping thai-language.com for Anki flashcards

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages