Fix(Demerge_pdfs): Fix crash on empty hardcoded PDF, PyPDF2 deprecations, add multi-mode splitting & CLI (#527) - #528
Open
Prayas340 wants to merge 1 commit into
Conversation
…ons, add multi-mode splitting & CLI (ndleah#527) - Resolve crash from hardcoded 0-byte Python.pdf by adding interactive path prompts and CLI arguments - Modernize PDF library adapter with support for pypdf and PyPDF2 (v3.0+ and legacy) - Implement 4 splitting modes: Interactive Wizard, Equal Chunk, Page Ranges, and Burst Mode - Add full CLI argument parsing via argparse (-i, -m, -p, -r, -o, --prefix) - Add safe file resource management and cross-platform filename sanitization - Add automated test suite in test_demerging_pdfs.py - Add requirements.txt and update README.md documentation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This Pull Request refactors and modernizes the
Demerge_pdfsproject:Python.pdffile, adding interactive path prompts with validation as well as full command-line arguments.PDFAdaptercompatible with modernpypdfandPyPDF2(v3+ and legacy versions).1-5, 8, 12-20) or individual pages.argparseflags (-i,-m,-p,-r,-o,--prefix).with open(...)).test_demerging_pdfs.py(5/5 tests passing).requirements.txtand updatesREADME.mdwith usage instructions and examples.Fixes #527
Type of change
Project
Your Project Name: Demerge_pdfs
Short Description: A robust, multi-mode Python utility to split, extract page ranges, or burst PDF documents using an interactive wizard or CLI automation.
Checklist:
README.md, according to the givenREADME_TEMPLATE.test_demerging_pdfs.py.requirements.txt.