Skip to content

A tool to translate manga/manhua/manhwa from their original language to a selected target language

License

Notifications You must be signed in to change notification settings

cia-ulaval/MangaAutoTranslator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MangaAutoTranslator

A tool to translate manga/manhua/manhwa from their original language to a selected target language

Setting environment up

In order to set up environment, I recommend you to use WSL 2.0 on Windows and install Ubuntu on it. Furthermore, I recommend git installation procedure for linux based environment :

git clone https://github.com/pyenv/pyenv.git ~/.pyenv

pyenv (optional but recommended)

Installation

Follow instructions from official repository.

!! WARNING !!

  • If you use WSL 2.0 or Linux, don't forget to install prerequisites :
sudo apt-get update; sudo apt-get install make build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
  • Add pyenv to path :
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc

Project usage

  • Look for all available python versions :
pyenv install --list | grep " 3\."
  • Install specific version :
pyenv install <python version>

# For example :
pyenv install 3.10.12
  • Choose a specific python version :
# Global python version setting (i.e. by default)
pyenv global <python version>

# Local (for a project)
pyenv local <python version>

poetry

Installation

Follow instructions from official documentation.

!! WARNING !!

  • Add poetry to path :
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc

Project usage

  • Configurations before installing python environment :
# Use active python version (linux command : which python)
poetry config virtualenvs.prefer-active-python true --local

# Create .venv folder instead of installing it into poetry root environments path
poetry config virtualenvs.in-project true --local
  • Install project python environment :
poetry install
  • Use poetry environment in terminal :
poetry shell
  • Run poetry script :
# Further informations will be given later
poetry run <script name>

poe the poet

Last environment installation step ! Simply run :

poe torch-cuda

This is because PyTorch cuda version is not well handled by poetry.

Data

Please download data and store them in data folder. Don't worry, .gitignore file is ignoring every files in this folder but .gitkeep file allows us to keep the folder visible in the repository.

Notebooks

Please use notebooks folder to put all visualization or demo notebooks.

Usage

  • To main project script :
poetry run translate
  • To run unit tests :
# Make sure you are in poetry environment
poetry shell

# Simply run following command in the root project dir
pytest

About

A tool to translate manga/manhua/manhwa from their original language to a selected target language

Resources

License

Stars

Watchers

Forks

Languages