{"id":20824554,"url":"https://github.com/hadro/nypl-digital-collections-tools","last_synced_at":"2025-07-18T05:08:51.397Z","repository":{"id":88706013,"uuid":"56688026","full_name":"hadro/nypl-digital-collections-tools","owner":"hadro","description":"A set of scripts that do useful things for NYPL Digital Collections materials","archived":false,"fork":false,"pushed_at":"2023-08-17T15:33:45.000Z","size":23,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-12T07:14:14.905Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/hadro.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2016-04-20T13:13:42.000Z","updated_at":"2022-06-25T05:18:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a4d5e29-c4d7-4f1e-81fa-777440ceadc8","html_url":"https://github.com/hadro/nypl-digital-collections-tools","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hadro/nypl-digital-collections-tools","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadro%2Fnypl-digital-collections-tools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadro%2Fnypl-digital-collections-tools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadro%2Fnypl-digital-collections-tools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadro%2Fnypl-digital-collections-tools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hadro","download_url":"https://codeload.github.com/hadro/nypl-digital-collections-tools/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hadro%2Fnypl-digital-collections-tools/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265703631,"owners_count":23814043,"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":[],"created_at":"2024-11-17T22:22:51.999Z","updated_at":"2025-07-18T05:08:51.184Z","avatar_url":"https://github.com/hadro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NYPL Digital Collections Tools\n\nA set of python and bash scripts that do useful things for NYPL Digital Collections materials, such as:\n- Create a basic, small-ish PDF from a UUID (`createPDF.py`)\n- Create a searchable PDF for a text-based Digital Collections item (`OCRmyPDF.sh`)\n\nSome of this is specific to NYPL Digital Library program, but some of it should hopefully be generalizable (and, optimizable -- my coding skills barely rise above copying and pasting from blog posts, so pull requests welcome!).\n\nGenerally, you'll need: \n- Python\n- ImageMagick (for PDF creation and OCR prep)\n- PDFtk (for PDF creation)\n- Tesseract (for OCR)\n- GNU Parallel (optional, but extremely useful for parallel processing image files since Tesseract is a slow but discrete process)\n\nYou'll also need to create a `config.py` file that contains your API key for the Digital Collections API.\n\nIf you want to use GNU Parallel and the `distributed.sh` script, you'll need create a `nodeslist` file based on the `nodeslist.example` files, which will contain the IP address of the machines you will connect to via SSH, and the number of logical cores the machine has. \n\n(Basically, follow the instructions here: https://spectraldifferences.wordpress.com/2015/04/26/execute-commands-on-multiple-computers-using-gnu-parallel-setting-up-a-cluster-on-the-cheap/)\n\n\n## Credit and thanks\nThe original possibility of a multi-layered PDF that balances good OCR with reasonable page-size and image quality came from a script in a comment section here: https://github.com/jbarlow83/OCRmyPDF/issues/8\n\nAlso, more generally, a lot of my process and understanding of these tools in general stems directly from Ryan Baumann's post here: https://ryanfb.github.io/etc/2014/11/13/command_line_ocr_on_mac_os_x.html\n\n(Particularly the small but mighty comment in footnote 3, which sent me down a weeks-long wonderful GNU Parallel rabbit hole!)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadro%2Fnypl-digital-collections-tools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhadro%2Fnypl-digital-collections-tools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhadro%2Fnypl-digital-collections-tools/lists"}