Skip to content

Commit

Permalink
split manga_translator.py into multiple files
Browse files Browse the repository at this point in the history
  • Loading branch information
frederik-uni committed Nov 16, 2024
1 parent c5feafe commit 2ccd802
Show file tree
Hide file tree
Showing 6 changed files with 916 additions and 887 deletions.
6 changes: 3 additions & 3 deletions manga_translator/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

from .manga_translator import (
MangaTranslator,
MangaTranslatorWeb,
MangaTranslatorWS,
MangaTranslatorAPI,
set_main_logger,
)
from .args import parser
Expand Down Expand Up @@ -71,14 +68,17 @@ async def dispatch(args: Namespace):
await dispatch(args.host, args.port, translation_params=args_dict)

elif args.mode == 'web_client':
from manga_translator.mode.web import MangaTranslatorWeb
translator = MangaTranslatorWeb(args_dict)
await translator.listen(args_dict)

elif args.mode == 'ws':
from manga_translator.mode.ws import MangaTranslatorWS
translator = MangaTranslatorWS(args_dict)
await translator.listen(args_dict)

elif args.mode == 'api':
from manga_translator.mode.api import MangaTranslatorAPI
translator = MangaTranslatorAPI(args_dict)
await translator.listen(args_dict)

Expand Down
Loading

0 comments on commit 2ccd802

Please sign in to comment.