• Stars
    star
    138
  • Rank 256,928 (Top 6 %)
  • Language
    Haskell
  • License
    Other
  • Created over 4 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Adding OCR support to Notion

Currently unmaintained

notion-ocr: 🖼 to ✍ for Notion

Make your images searchable in Notion!

Notion is a great alternative to Evernote, but one feature that is still greatly missed, is that the text in your images is searchable as well. Notion promises to do this someday, but it's not there yet, so this is the alternative.

This tool allows you to add the words add_ocr below any image in your notion account and it will try to extract the text from the image and put it below the image. Thus making the text searchable.

adding ocr

Install

Prerequisites Tesseract

You'll need tesseract, as it is used for doing the actual ocr in the image.

Mac
brew install tesseract

Without brew check installing tesseract.

Linux
sudo apt install tesseract-ocr

Without apt check installing tesseract.

Make sure tesseract works as a command in the terminal!

Install notion-ocr

Mac

With Homebrew:

brew install yannick-cw/homebrew-tap/notion-ocr

With wget:

wget https://github.com/yannick-cw/notion-ocr/releases/download/0.1.5/notion-ocr_mac.zip \
  && unzip notion-ocr_mac.zip \
  && chmod +x notion-ocr \
  && ./notion-ocr --help

You should see this now

notion-ocr - enrich images with the text in the image
...

You can run it now from the current directory with ./notion-ocr-0.1_mac/bin/notion-ocr

Or just get the latest release from releases.

You can also move the executable into your PATH to make running it more convenient.

Linux

With wget:

wget https://github.com/yannick-cw/notion-ocr/releases/download/0.1.5/notion-ocr_x86_64-linux.zip \
  && unzip notion-ocr_x86_64-linux.zip \
  && chmod +x notion-ocr \
  && ./notion-ocr --help

You should see this now

notion-ocr - enrich images with the text in the image
...

You can run it now from the current directory with ./notion-ocr

Or just get the latest release from releases.

You can also move the executable into your PATH to make running it more convenient.

Running it

  1. Get the token_v2 token from https://www.notion.so/
  • when using chrome here is some info on how to read a cookie

get_cookie

  1. Run notion-ocr with the token
  • notion-ocr -t "token_here" -s 10 or if not in your path ./notion-ocr -t "token_here" -s 10
  • the -s option specifies to scan every x minutes and can also be left out to run just once
  1. In the line right below any image in notion write add_ocr, the next time the tool runs, it replaces that with the text scanned from the image.

Trouble Shooting

  • Did you install tesseract? Is it executable from the terminal?
  • Did you write the line add_ocr exactly in the line below the image?

Known Limitations

  • Does not yet work with handwriting
  • Small images might lead to bad results
  • Not sure if other languages beside English work right now
  • when you get Failed loading language eng you might need to install the tesseract eng language pack, e.g. on Arch I needed to run pacman -S tesseract-data-eng

More Repositories

1

notionfy

Syncing kindle highlights to notion
Scala
138
star
2

sjq

Command-line JSON processor with Scala syntax
Scala
54
star
3

elastic-indexer4s

Stream your stuff into elasticsearch
Scala
18
star
4

scalaSSSS

Scala implementation of shamir's secret-sharing scheme.
Scala
11
star
5

elm-example-chrome-plugin

Project to showcase developing a browser plugin with Elm
JavaScript
5
star
6

elm-akka-http.g8

Giter8 template for an Akka HTTP with Elm frontend
Scala
5
star
7

sane-gen

Providing scalacheck generators for common problems
Scala
5
star
8

spotify-play

Playlist management
Elm
4
star
9

poc_analyzer

Scala
3
star
10

any-golden

Golden/Snapshot tests to detect (breaking) changes in your api layer
Scala
3
star
11

vimzoom

Tmux like zoom in vim
Vim Script
3
star
12

where-to-go

POC heatmap to identify the best area to go for a sport
TypeScript
2
star
13

fuzz-extra

Additional fuzzers for nicer tests
Elm
2
star
14

nyt4s

non blocking, type safe DSL for the New York Times rest api
Scala
2
star
15

haskell_katas

Learning Haskell Katas
Haskell
2
star
16

notion-ocr-plugin

Browser Plugin to enable ocr support in Notion
Haskell
2
star
17

paraglidingin_front_elm

Frontend for the paragliding second hand finder, written in elm + haskell
Elm
2
star
18

http4s-prometheus

Prometheus exporter for http4s
Scala
2
star
19

notionfys

# Moved to https://github.com/yannick-cw/notionfy
Scala
2
star
20

homebrew-tap

Ruby
1
star
21

notion-api

Providing Haskell bindings for notion.so
Haskell
1
star
22

blog

JavaScript
1
star
23

para_scraper

Scraping since 2017
Haskell
1
star
24

para-crawler

Scala
1
star
25

optimize-me

Sports tracker and analyzer in the making
Elm
1
star