Daily Japanese Lesson¶
How It Works¶
One of the functionality of Maid-chan’s scheduler worker is daily Japanese lesson. Currently, daily Japanese lesson sends a random kanji based on user’s level selection (N1 - N4) and a random vocabulary (same for all levels) every 13:00 UTC+9.

The raw data is parsed from Gakuran and currently stored under data/ directory.
-
maidchan.japanese.
get_kanji
(level, current_pos=1)[source]¶ get_kanji returns a single record of the current_pos line position
level: 1 - 4 (N1 to N4) current_pos: up to number of records
Since the source data follows old format of JLPT test, there are only 4 levels in it: N1 to N4. get_kanji reads a certain line (current_pos) based on level selection from the file and returns it to the caller.
-
maidchan.japanese.
get_vocabulary
(current_pos=1)[source]¶ get_vocabulary returns a single record of the current_pos line position
current_pos: up to number of records
The original data does not distinguish vocabulary based on JLPT levels. Therefore, it only accepts a certain line (current_pos), reads it from the file, and returns it to the caller.
Finally, scheduler calls get_japanese_message to construct a daily lesson message.
How to Run¶
- You can start running scheduler by executing:
$ maidchan_scheduler
- You can subscribe & unsubscribe to Maid-chan’s daily Japanese lesson via subscribe japanese and unsubscribe japanese command in the Messenger.