{"id":17110806,"url":"https://github.com/eeddaann/book-version-validator","last_synced_at":"2026-07-04T08:32:14.671Z","repository":{"id":97229436,"uuid":"396423948","full_name":"eeddaann/book-version-validator","owner":"eeddaann","description":"detect changes in pdf via ocr","archived":false,"fork":false,"pushed_at":"2021-10-23T20:52:12.000Z","size":417,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-29T03:02:48.086Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/eeddaann.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}},"created_at":"2021-08-15T16:57:55.000Z","updated_at":"2021-10-23T20:52:15.000Z","dependencies_parsed_at":"2023-03-05T16:15:48.075Z","dependency_job_id":null,"html_url":"https://github.com/eeddaann/book-version-validator","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eeddaann/book-version-validator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeddaann%2Fbook-version-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeddaann%2Fbook-version-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeddaann%2Fbook-version-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeddaann%2Fbook-version-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eeddaann","download_url":"https://codeload.github.com/eeddaann/book-version-validator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eeddaann%2Fbook-version-validator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35115741,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"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":"2024-10-14T16:46:27.145Z","updated_at":"2026-07-04T08:32:14.658Z","avatar_url":"https://github.com/eeddaann.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# book version validator\n\n## background\nWe have a lot of books that being scanned into pdfs these days.\nSometimes we receive updates for these books and have to replace some pages.\nIn order to make sure that the scanned book is up to date, we have to follow the list of the updated pages and verify that they are in the correct version.\n\na sample change table may look like:\n\n\u003cimg src=\"images/table.png\"/\u003e\n\nand page ```ii``` which should be in version 1, will have the following footer:\n\n\u003cimg src=\"images/samplechange.png\"/\u003e\n\nthis project use OCR (Optical character recognition) to reconstruct the table from the actual pdf and should produce the following table:\n\n| page  \t| Change No. \t|\n|-------\t|------------\t|\n| Title \t| 1          \t|\n| A     \t| 1          \t|\n| ii    \t| 1          \t|\n\n(```Change No. 0```, not relevant here..)\n\n## webapp\nThe UI looks like:\n\n\u003cimg src=\"images/webapp1.png\"\u003e\n\nThe user should drag and drop the pdf into the dashed square.\nAfter the upload and the ocr on the server side the UI looks like:\n\n\u003cimg src=\"images/webapp2.png\"\u003e\n\nwhile the table on the left side of the screen contains the constructed table. \n\n*the pdf column contains the page range in the pdf, helpful when the ocr doesn't recognize the page numbers (as happend in the second row)*\n\nOn the right side of the screen there is a basic pdf viewer which allows to view the pdf itself. clicking on cell in the table redirects to that page on the pdf.\n\n## algorithm\n1. break the pdf into sequence of images.\n2. preform ocr on the footer of each image.\n3. if the footer contains the string ```Change ```, store the page number and the version.\n4. group the list of changes into ranges. for example: [1,2,3] =\u003e 1-3\n5. construct and display the table.\n\n## deployment\n\nThe file ```iterate_pages.py``` contains all the logic - so it can be used as a module.\n\nFor our use case we warped it with a flask web app which allows the user to drag a pdf into the webapp and view the result.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feeddaann%2Fbook-version-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feeddaann%2Fbook-version-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feeddaann%2Fbook-version-validator/lists"}