{"id":23814490,"url":"https://github.com/stuartpb/debrochure-pdf","last_synced_at":"2025-10-26T23:14:56.543Z","repository":{"id":139970765,"uuid":"104841644","full_name":"stuartpb/debrochure-pdf","owner":"stuartpb","description":"A Bash script that undoes double-sided billfold formatting in PDFs","archived":false,"fork":false,"pushed_at":"2017-09-26T06:02:06.000Z","size":1,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-26T07:07:42.178Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stuartpb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-09-26T05:53:07.000Z","updated_at":"2019-07-26T10:30:16.000Z","dependencies_parsed_at":null,"dependency_job_id":"134a75f0-dad8-49e6-9128-db13c0d73439","html_url":"https://github.com/stuartpb/debrochure-pdf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stuartpb/debrochure-pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fdebrochure-pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fdebrochure-pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fdebrochure-pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fdebrochure-pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stuartpb","download_url":"https://codeload.github.com/stuartpb/debrochure-pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuartpb%2Fdebrochure-pdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281185776,"owners_count":26457824,"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","status":"online","status_checked_at":"2025-10-26T02:00:06.575Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-01-02T03:47:50.861Z","updated_at":"2025-10-26T23:14:56.537Z","avatar_url":"https://github.com/stuartpb.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# debrochure-pdf\n\nThis is a Bash script that takes a PDF formatted for double-printed brochure pages (where the left side of the first page is the back cover, the right side of the first page is the front cover, the left side of the second page is the inside front cover, the right side of the second page is the inside back cover, the left of the third page is the back of the last inside page, the right of the third page is the front of the first inside page, and so on) and reformats it as a document where each in-book page has its own in-PDF page.\n\nIt makes use of two separate tools to accomplish this:\n\n- `mutool` (avalable in the `mupdf-tools` package on Ubuntu), for splitting the pages in half\n- `pdftk` (avalable in the `pdftk` package on Ubuntu), for splitting and re-merging the individual pages into separate files for re-numbering\n\nIdeally, this would all be put into one GhostScript script (maybe using [this StackOverflow answer](https://stackoverflow.com/a/14497102/34799) as a base), rather than calling out to tools from *two separate PDF manipulation packages* to accomplish what is, all things considered, a pretty simple task. However, figuring out just how to do that would require more time learning about PDF manipulation toolchains than I really care to spend.\n\n## Usage\n\n```sh\n./debrochure-pdf brochure.pdf\n```\n\nThis will create a new file called `brochure-sp.pdf`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuartpb%2Fdebrochure-pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuartpb%2Fdebrochure-pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuartpb%2Fdebrochure-pdf/lists"}