jitenbot/bot/yomichan/exporters/factory.py

21 lines
823 B
Python
Raw Normal View History

2023-05-06 21:55:00 +00:00
from bot.targets import Targets
from bot.yomichan.exporters.export import JitenonKokugoExporter
from bot.yomichan.exporters.export import JitenonYojiExporter
from bot.yomichan.exporters.export import JitenonKotowazaExporter
from bot.yomichan.exporters.export import Smk8Exporter
from bot.yomichan.exporters.export import Daijirin2Exporter
2023-07-18 05:43:38 +00:00
from bot.yomichan.exporters.export import Sankoku8Exporter
2023-05-06 21:55:00 +00:00
def new_yomi_exporter(target):
2023-05-06 21:55:00 +00:00
exporter_map = {
Targets.JITENON_KOKUGO: JitenonKokugoExporter,
Targets.JITENON_YOJI: JitenonYojiExporter,
Targets.JITENON_KOTOWAZA: JitenonKotowazaExporter,
Targets.SMK8: Smk8Exporter,
Targets.DAIJIRIN2: Daijirin2Exporter,
2023-07-18 05:43:38 +00:00
Targets.SANKOKU8: Sankoku8Exporter,
2023-05-06 21:55:00 +00:00
}
return exporter_map[target](target)