Coder Social home page Coder Social logo

merge-pdf's Introduction

NOTE

The memory management is terrible. So simply use pdfunite instead.


Simple script for combining PDFs and CBRs into a single document. Originally was created to merge manga chapters from ReadmangaGrabber and HakuNeko.

Install

On Linux

chmod +x ./scripts/install.sh && ./scripts/install.sh

Requirements

On Linux

chmod +x ./scripts/setup.sh && ./scripts/setup.sh

On Windows

python -m venv .venv
venv\Scripts\activate
pip install -r requirements.txt

Usage

usage: merge-pdf [-h] [-d] input_folder output_filename

Combines PDFs or comic books into a single PDF document

positional arguments:
  input_folder     Folder in which to search for chapter files.
  output_filename  Output filename. Supported formats are "pdf", "png", "cbr", "cbz".

optional arguments:
  -h, --help       show this help message and exit
  -d, --dry-run    Do not make actual changes.

Sample output

main@hp-laptop:~/Documents/merge-pdf$ merge-pdf -d ./test/ ./test/out.pdf
+ ./test/1/1.pdf (4.1 MB) 4.1 MB in total
+ ./test/1/2.pdf (2.0 MB) 6.1 MB in total
+ ./test/2/1.pdf (2.8 MB) 8.9 MB in total
+ ./test/2/2.pdf (2.9 MB) 11.8 MB in total
Merging files... (dry run) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:06
Total size: 802.9 MB

Notes

Often cache grows too big. Clear it with this command:

sudo sh -c 'echo 1 >  /proc/sys/vm/drop_caches'

merge-pdf's People

Contributors

xfnty avatar

Watchers

 avatar

merge-pdf's Issues

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.