{"id":22826096,"url":"https://github.com/muhimasri/aws-textract-helper","last_synced_at":"2025-04-23T08:16:53.016Z","repository":{"id":42905020,"uuid":"247682335","full_name":"muhimasri/aws-textract-helper","owner":"muhimasri","description":"Aws Textract Helper","archived":false,"fork":false,"pushed_at":"2023-07-18T21:29:18.000Z","size":264,"stargazers_count":12,"open_issues_count":3,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-23T08:16:49.561Z","etag":null,"topics":["aws","aws-textract","javascript","nodejs","textract"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/muhimasri.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":"2020-03-16T11:13:51.000Z","updated_at":"2024-12-12T07:16:47.000Z","dependencies_parsed_at":"2024-06-21T15:23:05.335Z","dependency_job_id":"02e850ae-580a-4488-a4d3-d466dd86c4c8","html_url":"https://github.com/muhimasri/aws-textract-helper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhimasri%2Faws-textract-helper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhimasri%2Faws-textract-helper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhimasri%2Faws-textract-helper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/muhimasri%2Faws-textract-helper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/muhimasri","download_url":"https://codeload.github.com/muhimasri/aws-textract-helper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250395285,"owners_count":21423400,"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":["aws","aws-textract","javascript","nodejs","textract"],"created_at":"2024-12-12T17:14:18.322Z","updated_at":"2025-04-23T08:16:52.997Z","avatar_url":"https://github.com/muhimasri.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AWS Textract Helper\nThis is a JavaScript library that provides an easy to use methods for extracting structured data from Amazon Textract APIs.\n\n## Prerequisites\nYou need to have a basic knowledge of AWS and Textract APIs. For a quick introduction, please refere to [this article](https://levelup.gitconnected.com/convert-a-form-image-to-an-html-form-using-amazon-textract-and-nodejs-d4d7c1a2b0c5) and [repository example](https://github.com/muhimasri/aws-textract-app) to help you getting started.\n\n## Installation\n```\nnpm i aws-textract-helper\n```\n\n## Documentation\n| Method        | Description   |\n| ------------- | ------------- |\n| createForm    | Analyze blocks returned by Textract and creates a key-value object that represents a form in an image |\n| createTables  | Analyze blocks returned by Textract and creates an array of tables that represents all the tables in an image |\n\n## Examples\n\n### Create a form\n![alt text](https://livecords-dev.s3.us-west-2.amazonaws.com/form-application-small.jpg-1585509821204 \"Members Table\")\n```\nconst textractHelper = require('aws-textract-helper')\nconst form = textractHelper.createForm(dataFromTextract)\n```\nIt will analyze all blocks and return a JSON object representing a form\n```\n{\n    \"First Name\": \"Muhi\",\n    \"Last Name\": \"Masri\",\n    \"Address\": \"Planet Earth\"\n}\n```\n### Create tables\n![alt text](https://livecords-dev.s3.us-west-2.amazonaws.com/member-table.PNG-1585509527854 \"Members Table\")\n```\nconst textractHelper = require('aws-textract-helper')\nconst tables = textractHelper.createTables(dataFromTextract)\n```\nIt will analyze all blocks and return an array of tables\n```\n[{\n\t\"1\": {\n\t\t\"1\": \"Memberld\",\n\t\t\"2\": \"First Name\",\n\t\t\"3\": \"Last Name\",\n\t\t\"4\": \"Address\"\n\t},\n\t\"2\": {\n\t\t\"1\": \"111\",\n\t\t\"2\": \"Muhi\",\n\t\t\"3\": \"Masri\",\n\t\t\"4\": \"Planet Earth\"\n\t},\n\t\"3\": {\n\t\t\"1\": \"222\",\n\t\t\"2\": \"John\",\n\t\t\"3\": \"Smith\",\n\t\t\"4\": \"Planet Mars\"\n\t}\n}]\n```\n\n## Extra options\nYou can use a trimChar config option to remove unwanted characters in form keys such as a colon or extra spaces\n```\nconst form = textractHelper.createForm(dataFromTextract, { trimChars: [':', ' '] })\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhimasri%2Faws-textract-helper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmuhimasri%2Faws-textract-helper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmuhimasri%2Faws-textract-helper/lists"}