{"id":13599792,"url":"https://github.com/captn3m0/pystitcher","last_synced_at":"2025-04-05T06:09:17.268Z","repository":{"id":44766723,"uuid":"371030483","full_name":"captn3m0/pystitcher","owner":"captn3m0","description":"pystitcher stitches your PDF files together, generating nice customizable bookmarks for you using a declarative markdown file as input","archived":false,"fork":false,"pushed_at":"2022-05-27T07:22:57.000Z","size":164,"stargazers_count":388,"open_issues_count":8,"forks_count":10,"subscribers_count":7,"default_branch":"main","last_synced_at":"2024-04-24T14:37:46.413Z","etag":null,"topics":["pdf-bookmarker","pdf-generation","pdfmerge","python-pdf"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/pystitcher/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/captn3m0.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"ko_fi":"captn3m0","liberapay":"captn3m0","github":"captn3m0"}},"created_at":"2021-05-26T12:44:11.000Z","updated_at":"2024-04-10T11:48:56.000Z","dependencies_parsed_at":"2022-09-08T07:21:14.486Z","dependency_job_id":null,"html_url":"https://github.com/captn3m0/pystitcher","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captn3m0%2Fpystitcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captn3m0%2Fpystitcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captn3m0%2Fpystitcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/captn3m0%2Fpystitcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/captn3m0","download_url":"https://codeload.github.com/captn3m0/pystitcher/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294541,"owners_count":20915340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pdf-bookmarker","pdf-generation","pdfmerge","python-pdf"],"created_at":"2024-08-01T17:01:11.694Z","updated_at":"2025-04-05T06:09:17.244Z","avatar_url":"https://github.com/captn3m0.png","language":"Python","funding_links":["https://ko-fi.com/captn3m0","https://liberapay.com/captn3m0","https://github.com/sponsors/captn3m0"],"categories":["Python"],"sub_categories":[],"readme":"==========\npystitcher\n==========\n\n.. image:: https://img.shields.io/pypi/v/pystitcher\n    :target: https://pypi.org/project/pystitcher/\n    :alt: PyPI Version\n\n.. image:: https://img.shields.io/pypi/l/pystitcher\n    :target: LICENSE.txt\n    :alt: Repository License\n\n.. image:: https://img.shields.io/github/checks-status/captn3m0/pystitcher/main\n    :target: https://github.com/captn3m0/pystitcher/actions?query=branch%3Amain\n    :alt: GitHub branch checks status\n\n.. image:: https://img.shields.io/codecov/c/gh/captn3m0/pystitcher\n    :target: https://app.codecov.io/gh/captn3m0/pystitcher/\n    :alt: Codecov\n\n|\n\npystitcher stitches your PDF files together, generating nice customizable bookmarks for you using a declarative input in the form of a markdown file. It is written in pure python and uses `PyPDF3 \u003chttps://pypi.org/project/PyPDF3/\u003e`_ for reading and writing PDF files.\n\nInstallation\n============\n\nYou can install it easily using `pipx \u003chttps://pypa.github.io/pipx/\u003e`_::\n\n\tpipx install pystitcher\n\t\nThe Wiki has `Alternative Installation Instructions \u003chttps://github.com/captn3m0/pystitcher/wiki/Installation\u003e`_.\n\n\nDescription\n===========\n\npystitcher is a command line tool, with very few cli options::\n\n\tusage: pystitcher [-h] [--version] [-v] [--cleanup | --no-cleanup] spine.md output.pdf\n\n\tStitch PDF files together\n\n\tpositional arguments:\n\t  spine.md              Input markdown file\n\t  output.pdf            Output PDF file\n\n\toptional arguments:\n\t  -h, --help            show this help message and exit\n\t  --version             show program's version number and exit\n\t  -v, --verbose         log more things\n\t  --cleanup, --no-cleanup\n\t                        Delete temporary files (default: True)\n\nGiven this input::\n\n\texisting_bookmarks: remove\n\ttitle: Complete Guide to the Personal Data Protection Bill\n\tauthor: Medianama\n\tkeywords: privacy, surveillance, personal data protection\n\tsubject: Personal Data Protection Bill\n\t# A Complete Guide to the Personal Data Protection Bill\n\n\t- [Cover](cover.pdf)\n\n\t# The Bills\n\n\t- [Personal Data Protection Bill, 2019](https://example.com/2019-bill.pdf)\n\t- [Personal Data Protection Bill, 2018](https://example.com/2018-bill.pdf)\n\n\t# Other key reading material\n\n\t- [Srikrishna Committee Report](2.a.pdf)\n\t- [Dvara Research's Personal Data Protection Bill](2.b.pdf)\n\t- [MP Shashi Tharoor's Data Protection Bill](2.c.pdf)\n\t- [MP Jay Panda's Data Protection Bill](2.d.pdf)\n\t- [SaveOurPrivacy.in bill](2.e.pdf)\n\t- [TRAI recommendations on privacy](2.f1.pdf)\n\t- [Comments on TRAI recommendations on privacy](2.f2.pdf)\n\nWill generate a PDF with proper bookmarks:\n\n.. image:: https://i.imgur.com/qPVpZGt.png\n\nAnd the correct metadata::\n\n\tTitle:          Complete Guide to the Personal Data Protection Bill\n\tSubject:        Personal Data Protection Bill\n\tKeywords:       privacy, surveillance, personal data protection\n\tAuthor:         Medianama\n\tCreator:        pystitcher/1.0.0\n\tProducer:       pystitcher/1.0.0\n\nConfiguration options can be specified with Meta data at the top of the file.\n\n+---------------------+--------------------------------------------------------------------------+\n| Option              | Notes                                                                    |\n+=====================+==========================================================================+\n| fit                 | Default fit of the bookmark. Can be overwritten per bookmark             |\n|                     | See `wiki \u003chttps://github.com/captn3m0/pystitcher/wiki/Zoom-Levels\u003e`_    |\n|                     | for more details.                                                        |\n+---------------------+--------------------------------------------------------------------------+\n| author              | PDF Author                                                               |\n+---------------------+--------------------------------------------------------------------------+\n| keywords            | PDF Keywords                                                             |\n+---------------------+--------------------------------------------------------------------------+\n| subject             | PDF Subject                                                              |\n+---------------------+--------------------------------------------------------------------------+\n| title               | PDF Title. If left unspecified, first Heading (h1)                       |\n|                     | in the document is used.                                                 |\n+---------------------+--------------------------------------------------------------------------+\n| existing_bookmarks  | What to do with existing bookmarks in individual files.                  |\n|                     | Options are ``keep``, ``flatten``, and ``remove``. See                   |\n|                     | `docs \u003chttps://github.com/captn3m0/pystitcher/wiki/Existing-Bookmarks\u003e`_ |\n|                     | for more details.                                                        |\n+---------------------+--------------------------------------------------------------------------+\n\nAdditionally, PDF links specified in markdown can have attributes to alter the PDFs before merging. The below attribute will rotate the second PDF file by 90 degrees clockwise before merging::\n\n\t[Part 1](1.pdf)\n\t[Part 2](2.pdf){: rotate=\"90\"}\n\nAnd the below attribute will merge only pages 2 to 5, both inclusive, from the second PDF file::\n\n\t[Part 1](1.pdf)\n\t[Part 2](2.pdf){: start=2 end=5}\n\nThe list of available attributes are:\n\n+---------------------+-----------------------------------------------+\n| Attribute           | Notes                                         |\n+=====================+===============================================+\n| rotate              | Rotate the PDF. Valid values are 90, 180, 270 |\n+---------------------+-----------------------------------------------+\n| start               | Start page number for PDF page selection      |\n+---------------------+-----------------------------------------------+\n| end                 | End page number for PDF page selection        |\n+---------------------+-----------------------------------------------+\n\nDocumentation\n=============\n\nAdditional documentation is maintained on the `project wiki \u003chttps://github.com/captn3m0/pystitcher/wiki\u003e`_ on GitHub.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptn3m0%2Fpystitcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcaptn3m0%2Fpystitcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcaptn3m0%2Fpystitcher/lists"}