split-manga-pages: a command line utility written in Python that converts your double-page layout manga to single-page layout.

Overview

split-manga-pages

split-manga-pages is a command line utility written in Python that converts your double-page layout manga (or any images in double page layout) to single-page layout. This can make it much easier to read said manga on small screens, such as those found on mobile devices

Installation

To install, you can download the newest executable version for your operating system from the Releases section (recommended for non-tech savvy people). Alterantively, you can build it from source yourself, following the Build Instructions section below. Or, you can follow the instructions just below to download and run the Python script (cross-platform). The advantage of doing this is that the executable takes can take 1-2 seconds to start up while the Python script starts instantly, and you can also easily modify the script yourself without having to rebuild if you know some Python.

Instructions for downloading python script

These steps are not requried if you download the executable from Releases or build from source

  1. Make sure you have python installed:
    1. Open a terminal
    2. Try to run python3 and python
    3. If either one of these give you a prompt saying something like Python 3.8.10 (default, Nov 26 2021...., then you are good to go
    4. If not, install Python
  2. Clone repository: git clone https://github.com/christofferaakre/split_manga_pages.git
  3. cd into directory: cd split_manga_pages
  4. Install dependencies: pip install -r requirements.txt
  5. Try to run the script: python3 split_manga_pages.py (If you are on Windows you might need to type python instead of python3
  6. If you get a message saying something like usage: split_manga_pages.py [-h] [-d DIRECTORY], it was installed correctly. Otherwise, you might need to install Python or the dependencies
  7. For convenience, put the script somewhere in your system path.

Usage

Run the executable from the command line with the appropriate command line arguments

Command line arguments

Argument Required Description
-d DIR, --directory DIR yes Directory containing the image files
-m, --mode yes The mode to be used. See Modes
-nk, --no-keep no Don't keep the original double page spreads when using detect mode
-h, --help no Show help and options for the script

Modes

Support modes are 'all' and 'detect'.

'all'

Treats all images in the directory as double page spreads. Converts them all to single page layouts, i.e. you get twice as many images as you had, and these are put in a directory called split_manga_pages.

'detect'

Uses the resolutions of the images and some simple statistical analysis to determine which images are single page spreads and which are double page. Then splits only the double page images into single page images, and also keeps the original double page image, so you get the original doble page image followed by the two single page images. Images are placed in the orginal directory.

Example

Mode 'all'

I have a folder called manga containing only double page images with names page001.png, page002.png, etc. I run python3 split_manga_pages.py -d manga -m all, and I get a new folder called split_manga_pages containing files page001part1.png1, page001part2.png, page002part1.png, page002part2.png, etc.

Mode 'detect'

I have a folder called manga containing mostly single page images, but every so often there is a double page spread. For example, there are files page001.png, page002.png, and page003.png. page002 is a double spread, whereas the other two are sinlge spread. I run python3 split_manga_pages.py -d manga -m detect, and now in the manga folder I will find files page001.png, page002.png, page002part1.png, page002part2.png, page003.png.

Build instructions

  1. Clone repository and cd into it
  2. run pyinstaller --onefile split-manga-pages.py
  3. The executable should be placed in the dist folder

Note that pyinstaller only builds executables for the current operating system you are on.

You might also like...
A command line utility for tracking a stock market portfolio. Primarily featuring high resolution braille graphs.
A command line utility for tracking a stock market portfolio. Primarily featuring high resolution braille graphs.

A command line stock market / portfolio tracker originally insipred by Ericm's Stonks program, featuring unicode for incredibly high detailed graphs even in a terminal.

📦 A command line utility to put text in a box.
📦 A command line utility to put text in a box.

boxie A command line utility to put text in a box. Installation pip install boxie If you are on Linux you may need to use sudo to access this globally

A handy command-line utility for generating and sending iCalendar events

A handy command-line utility for generating and sending iCalendar events This simple command-line utility is designed to generate an iCalendar event,

Tiny command-line utility for mapping broken keys to other positions.

brokenkey Tiny command-line utility for mapping broken keys to other positions. Installation Clone this repository using git: git clone https://github

This is a CLI utility that allows you to view RedFlagDeals.com on the command line.
This is a CLI utility that allows you to view RedFlagDeals.com on the command line.

RFD Description Motivation Installation Usage View Hot Deals View and Sort Hot Deals Search Advanced View Posts Shell Completion bash zsh Description

img-proof (IPA) provides a command line utility to test images in the Public Cloud

overview img-proof (IPA) provides a command line utility to test images in the Public Cloud (AWS, Azure, GCE, etc.). With img-proof you can now test c

A command-line utility that, given a markdown file, checks whether all its links work.

A command-line utility written in Python that checks validity of links in a markdown file.

slipit is a command line utility for creating archives with path traversal elements.

slipit is a command line utility for creating archives with path traversal elements. It is basically a successor of the famous evilarc utility with an extended feature set and improved base functionality.

Double Pendulum visualised with fetching system information in Python.
Double Pendulum visualised with fetching system information in Python.

Show off your terminal, in style. A nice relaxing double pendulum simulation using ASCII, able to simulate multiple pendulums at once, and provide tra

Releases(v0.1.0)
Owner
Christoffer Aakre
Christoffer Aakre
Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems.

Baselining, on steroids! Baseline is a cross-platform library and command-line utility that creates file-oriented baselines of your systems. The proje

Nelson 4 Dec 9, 2022
Booky - A command line utility for bookmarking files on your terminal!

Booky A command line utility for bookmarking files for quick access With it you can: Bookmark and delete your (aliases of) files at demand Launch them

Pran 1 Sep 11, 2022
A command-line utility that creates projects from cookiecutters (project templates), e.g. Python package projects, VueJS projects.

Cookiecutter A command-line utility that creates projects from cookiecutters (project templates), e.g. creating a Python package project from a Python

null 18.6k Dec 30, 2022
cmsis-pack-manager is a python module, Rust crate and command line utility for managing current device information that is stored in many CMSIS PACKs

cmsis-pack-manager cmsis-pack-manager is a python module, Rust crate and command line utility for managing current device information that is stored i

pyocd 20 Dec 21, 2022
A Python module and command line utility for working with web archive data using the WACZ format specification

py-wacz The py-wacz repository contains a Python module and command line utility for working with web archive data using the WACZ format specification

Webrecorder 14 Oct 24, 2022
A Python module and command-line utility for converting .ANS format ANSI art to HTML

ansipants A Python module and command-line utility for converting .ANS format ANSI art to HTML. Installation pip install ansipants Command-line usage

null 4 Oct 16, 2022
A Python command-line utility for validating that the outputs of a given Declarative Form Azure Portal UI JSON template map to the input parameters of a given ARM Deployment Template JSON template

A Python command-line utility for validating that the outputs of a given Declarative Form Azure Portal UI JSON template map to the input parameters of a given ARM Deployment Template JSON template

Glenn Musa 1 Feb 3, 2022
Library and command-line utility for rendering projects templates.

A library for rendering project templates. Works with local paths and git URLs. Your project can include any file and Copier can dynamically replace v

null 808 Jan 4, 2023
A command line utility to export Google Keep notes to markdown.

Keep-Exporter A command line utility to export Google Keep notes to markdown files with metadata stored as a frontmatter header. Supports exporting: S

Nathan Beals 85 Dec 17, 2022