{"action":"created","issue":{"url":"https://api.github.com/repos/kelaberetiv/TagUI/issues/152","repository_url":"https://api.github.com/repos/kelaberetiv/TagUI","labels_url":"https://api.github.com/repos/kelaberetiv/TagUI/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/kelaberetiv/TagUI/issues/152/comments","events_url":"https://api.github.com/repos/kelaberetiv/TagUI/issues/152/events","html_url":"https://github.com/kelaberetiv/TagUI/issues/152","id":320578746,"number":152,"title":"How to do TagUI visual automation using OCR","user":{"login":"kensoh","id":10379601,"avatar_url":"https://avatars0.githubusercontent.com/u/10379601?v=4","gravatar_id":"","url":"https://api.github.com/users/kensoh","html_url":"https://github.com/kensoh","followers_url":"https://api.github.com/users/kensoh/followers","following_url":"https://api.github.com/users/kensoh/following{/other_user}","gists_url":"https://api.github.com/users/kensoh/gists{/gist_id}","starred_url":"https://api.github.com/users/kensoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kensoh/subscriptions","organizations_url":"https://api.github.com/users/kensoh/orgs","repos_url":"https://api.github.com/users/kensoh/repos","events_url":"https://api.github.com/users/kensoh/events{/privacy}","received_events_url":"https://api.github.com/users/kensoh/received_events","type":"User","site_admin":false},"labels":[{"id":495273737,"url":"https://api.github.com/repos/kelaberetiv/TagUI/labels/query","name":"query","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-05-06T09:57:33Z","updated_at":"2018-05-06T09:58:32Z","closed_at":"2018-05-06T09:58:32Z","author_association":"MEMBER","body":"Raising this issue on behalf of user email so that other users can benefit -\r\n\r\n---\r\n\r\nI planning to make a tagui script in recognizing a receipt and was wondering is there tutorials in using visual automation OCR ?\r\n"},"comment":{"url":"https://api.github.com/repos/kelaberetiv/TagUI/issues/comments/386867798","html_url":"https://github.com/kelaberetiv/TagUI/issues/152#issuecomment-386867798","issue_url":"https://api.github.com/repos/kelaberetiv/TagUI/issues/152","id":386867798,"user":{"login":"kensoh","id":10379601,"avatar_url":"https://avatars0.githubusercontent.com/u/10379601?v=4","gravatar_id":"","url":"https://api.github.com/users/kensoh","html_url":"https://github.com/kensoh","followers_url":"https://api.github.com/users/kensoh/followers","following_url":"https://api.github.com/users/kensoh/following{/other_user}","gists_url":"https://api.github.com/users/kensoh/gists{/gist_id}","starred_url":"https://api.github.com/users/kensoh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kensoh/subscriptions","organizations_url":"https://api.github.com/users/kensoh/orgs","repos_url":"https://api.github.com/users/kensoh/repos","events_url":"https://api.github.com/users/kensoh/events{/privacy}","received_events_url":"https://api.github.com/users/kensoh/received_events","type":"User","site_admin":false},"created_at":"2018-05-06T09:58:32Z","updated_at":"2018-05-06T09:58:32Z","author_association":"MEMBER","body":"This part of homepage would cover on the setup and use of the visual recognition - https://github.com/kelaberetiv/TagUI#visual-automation\r\n\r\nIn particular, you probably use something like below -\r\n\r\n```\r\ndclick image_of_pdf_icon.png\r\nwait 5 seconds\r\nread page.png to pdf_contents\r\necho pdf_contents\r\n```\r\n\r\nBreakdown of what the lines above do -\r\n\r\n1. double click on the desktop icon of the pdf file to be opened. note that dclick step is still in [cutting edge version](https://github.com/kelaberetiv/TagUI/archive/master.zip). If you have installed TagUI from the packaged release, you can download the cutting edge version to overwrite your local installation.\r\n\r\n2. wait for a few seconds to make sure pdf file has been opened in pdf viewer on your laptop\r\n\r\n3. the read step captures info from elements to a variable. if used with .png or .bmp as the element, it will look for an element on the screen instead of a webpage. using page.png tells TagUI to scan through the whole screen for text and saves the OCR text captured to variable pdf_contents\r\n\r\n4. do your post-processing to extract whatever info you want from the receipt, using standard JavaScript string manipulation code. after that you can echo or do the other steps with that information. My favorite reference for JS is https://www.w3schools.com/js/default.asp (I usually search for something on google but it almost always goes to this w3 schools).\r\n\r\nNote that the OCR is based on Tesseract which is the standard open-source library for OCR. I think the best state of the art is still lousy for hand-written text. But for printed fonts it should do fairly ok. Try above out and lemme know if you run into issues!"}}
{"actor":{"display_login":"kensoh"}}