Skip to content

Commit

Permalink
Merge pull request #28 from MohrJonas/develop
Browse files Browse the repository at this point in the history
Merge develop into master
  • Loading branch information
MohrJonas authored Dec 28, 2022
2 parents a05092a + 2f16571 commit d259d8f
Show file tree
Hide file tree
Showing 54 changed files with 13,708 additions and 12,547 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ data.json

# Exclude macOS Finder (System Explorer) View States
.DS_Store
/out/
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,10 +71,21 @@ For the path: check where the binaries are located and add these to "/private/et

##### Arch / Manjaro

###### Manual installation

- Run `sudo pacman -S tesseract imagemagick`
- Install any languages you need by installing the appropriate package (usually named `tesseract-data-<lang>`)

Note - if Obsidian is running via the Flatpak installation (such as provided by default in Pop!_OS) then this plugin
###### Automatic installation

❗The automatic installation features is still in very early development. Expect bugs❗

- Install & enable the plugin
- Under `settings`, press the `automatic install` button

#### Flatpak

If Obsidian is running via the Flatpak installation (such as provided by default in Pop!_OS) then this plugin
will not operate. Flatpak sandboxing will change the filepaths so even providing host access will still be problematic.
If you have a Flatpak installation you will need to reinstall via a different method to successfully use this plugin.

Expand Down Expand Up @@ -130,7 +141,13 @@ By default, tesseract offers two languages to choose from: `eng` and `osd`.
ℹ After switching your language, only newly indexed documents use the new language. You can reindex your already added
documents by using the `Delete all transcripts` command ℹ

###### Lang vs Script

Tesseract supports `langs` and `scripts` for text recognition.
- Langs support a single language
- Scripts support multiple languages with similar characters. Latin, for example, supports all latin-based languages (English, German, Italian, France, ...) except for Vietnamese

#### Custom OCR providers

To add a custom OCR provider, create a new class that extends `OCRProvider` and register it
using `OCRProviderManager.registerOCRProviders(new MyCustomProvider())`
using `OCRProviderManager.registerOCRProviders(new MyCustomProvider())`
Empty file removed decs.d.ts
Empty file.
5 changes: 5 additions & 0 deletions esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ esbuild.build({
logLevel: "info",
sourcemap: prod ? false : "inline",
treeShaking: true,
minify: false,
minifyIdentifiers: false,
minifySyntax: false,
minifyWhitespace: false,
keepNames: true,
outfile: "main.js",
plugins: [inlineWorkerPlugin()]
}).catch(() => process.exit(1));
1 change: 1 addition & 0 deletions manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@
"description": "Add ocr capabilities to obsidian",
"author": "Jonas Mohr",
"authorUrl": "https://github.com/MohrJonas/obsidian-ocr",
"fundingUrl": "https://ko-fi.com/mohrjonas",
"isDesktopOnly": true
}
Loading

0 comments on commit d259d8f

Please sign in to comment.