Giter Site home page Giter Site logo

theraphael0000 / diff_and_merge_raw_translation Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 21 KB

Merge images folders from scanlations and raws mangas, useful when the manga doesn't have an official translation

Python 100.00%
manga scanlation raws mergetool imagehash image-diff diff

diff_and_merge_raw_translation's Introduction

Purpose

The purpose of this script is to take two folder of images (a and b) and merge into another folder (c), in the following way :

  • Every images in (a) and (b) have their order considered (by their filename)
  • Images in (a) and (b) can be compared with a threshold to determine if they are related (considered as the same image).
  • (b) is considered as the reference. We use comparison of imagehash for this task.
  • If images in (a) are not in (b), these images are removed. (Extra image)
  • If images in (b) are not in (a), these images are added. (Missing image)
  • If an image is both in (a) and (b), the image from (a) is kept. (New image)

The script can be used for example to create a new folder of image (c) based on a scanlation of a manga (a) and the original manga (b). (c) will contain the original manga with the page translated but without the images added by the scanlation team.

How to use it ?

Install

git clone https://github.com/TheRaphael0000/diff_and_merge_raw_translation
cd diff_and_merge_raw_translation
pip install -r requirements.txt

Example

python cli.py --help
python cli.py "translation" "raw" "output" -t 17 -y -q

TODO

  • Algorithm
  • CLI
  • Use os.walk instead of os.listfiles when loading images to handle subfolder, and also verify that we only load images without crashes.
  • GUI : to check that the diff&merge is correct and to adapt the threshold
  • README.md : Visual example of the algorithm.
  • Package : Create a proper python package
  • Setuptools : Create the setup.py script (include a script to run the cli and the gui)
  • Pypi : Publish to pypi

diff_and_merge_raw_translation's People

Contributors

dependabot[bot] avatar theraphael0000 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.