Extract passages from screenshots and share them


Project He


Amazon doesn’t allow sharing long passages from the Kindle app past a certain limit.


  • Enable capturing long passages from Kindle app.
  • Use native screenshot feature of phones to capture passages.
  • Parse passages from screenshots.
  • Share to social media.


  • Robust because screenshot feature exists on most phones.


  • Parsing passages from screenshots is a hard computer vision problem.


  • Cognitive Services can be used to solve the computer vision problem.
  • Competitors like Liner cannot extract passages from Kindle app.
  • OneShot for iPhone App doesn’t exist anymore.


  • Amazon may shut it down.

Development Environment

How to Setup a LAMP Development Environment

Restore Dependencies


Use Native Screenshot Feature of Phones to Capture Passages

Use form to upload image.

Image Upload
Image Upload

Parse Passages From Screenshots

Build the request and send it. Print out the parsed text alongside the image and raw response to enable validation.

Print text, image, and response
Print text, image, and response

The pictures variable references the input element with the same name.

The tmp_name variable references the path where the file is temporarily stored.

Build the Request

Replace <Subscription Key> with your Cognitive Services subscription key.

Use file_get_contents to get the raw file data. Use application/octet-stream as the request Content-Type to send raw file data.

Print the Passages
Print the Image

Render the image using data:image/jpeg;base64 encoding so we don’t have to permanently store the image on the server.

Further Work

  • Draw bounding box outlines.
  • Format paragraphs.
  • Support sharing.
  • Support multiple screenshots.
  • Host the tool as a service.
  • SEO.
  • AdSense.
Image result for south park underpants gnomes business plan
Business Model

Works Cited

Clean up your local branches after merge and delete in GitHub


Composer – Installation – Linux / Unix / macOS


Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: