Coder Social home page Coder Social logo

kairavkkp / merge-pdf Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 3.0 1.29 MB

My first PyPi Package. Merge Image and PDF files using customizations within a folder using the Command line.

Home Page: https://pypi.org/project/mergemypdf/

License: MIT License

Python 100.00%
pdfs pdf-files merge-pdf merge-images merge-pdf-images epubs hacktoberfest2021 hacktoberfest

merge-pdf's Introduction

Merge-PDF

Build Status PyPI version Downloads License: MIT

Merge PDF files using customizations within a folder using Command line.

How to Install

pip install mergemypdf

How to use

  • Open Terminal
  • Move to the directory where PDFs are present.
  • Run mergemypdf -h for more info.

Usage:

mergemypdf -c <number_of_pdfs> -o <order_of_merging> -f <output_pdf_filename>

Examples:

mergemypdf -c 10 -o 1 -f merged.pdf

mergemypdf -p password -f merged.pdf

mergemypdf -ep 1 -p password

mergemypdf -a 1 -f merged.pdf

Optional arguments:

- s : <pdf_name_starting_with_string> 
- e : <pdf_name_endswith_string> 
- cn: <pdf_name_containing_string>

Note:

  • -c represents number of PDFs needed to merge.
  • -o represents order of merging PDFs, 0 is Ascending, 1 is descending and 2 is Shuffle. Default is Ascending.
  • -s represents start string in PDF file's name.
  • -e represents end string in PDF file's name.
  • -cn represents string containing in PDF file's name.
  • -f represents saved file name. Default names are randomly generated, adviced to specify a name everytime.
  • -i represents the flag if only images need to be merged within a folder. Default is false.
  • -ip represents the flag if both images and pdfs need to be merged within a folder. Default is false.
  • -p represents password used to decrypt PDFs. If the PDFs have individually different passwords omit this and you will be prompted to enter each password.
  • -epub represents the flag if only EPUBs need to be merged within a folder. Default is false.
  • -ep represents the flag if both EPUBs and PDFs need to be merged within a folder. Default is false.
  • -ie represents the flag if both images and EPUBs need to be merged within a folder. Default is false.
  • -a represents the flag if all support file types (PDF, Images and EPUBS) need to be merged within a folder. Default is false.

Usage of Optional Arguments.

  • mergemypdf -s 09 Only merge PDFs starting with 09.
  • mergemypdf -e Derivation Only merge PDFs ending with Derivation.
  • mergemypdf -cn Lecture Only merge PDFs having keyword 'Lecture' in the name.
  • mergemypdf -i 1 Only merge Images from the directory.
  • mergemypdf -ip 1 Merge both Images and PDFs from the directory.
  • mergemypdf -p test123 Merge all PDFs from directory using the supplied password on any encrypted PDFs.
  • mergemypdf -epub 1 Only merge EPUB files from the directory.
  • mergemypdf -ep 1 Merge both EPUBs and PDFs from the directory.
  • mergemypdf -ie 1 Merge both Images and EPUBs from the directory.
  • mergemypdf -a 1 Merge PDFs, Images and EPUBs from the directory.

merge-pdf's People

Contributors

dependabot[bot] avatar isaacvv avatar kairavkkp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

merge-pdf's Issues

Incorporate Pytest to incorporate automated testing

The goal is to have automated tests that would check if the package is working as intended or not. We can add sample files as tests and build them. It would be taken care of by GitHub actions as a part of CI. Let's Do this.

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.