Anki add-on: AnkiOCR

AnkiOCR Anki 2.1 addon to generate OCR text from images inside of Anki notes/cards. Note that this is only designed for computer generated text, not handwritten. The aim of this addon was to generate searchable text for image-heavy notes, it is not intended to produce high quality, perfectly ordered text! Features - Convert many notes at once - Undo changes very easily - Multilanguage support via configuration of detection languages This is currently in beta stage, please submit a bug report on GitHub if bugs are found, or you want to raise a feature request. Installation AnkiOCR depends on the Tesseract OCR library . If you're on Windows or Mac , teseract is bundled with the addon If you're on Linux carefully follow the instructions here Source code available at my GitHub This program is distributed in the hope that it will be useful but WITHOUT ANY WARRANTY. Usage 1. Open the card browser and select the note(s) you want to process. Use the search bar at the top, select tags, decks, etc. 2. On the toolbar at the top, select 'Cards', then 'AnkiOCR', and select 'Run AnkiOCR on selected notes', as shown below 3. After processing, each of the images in the note will have the ocr data embedded in the `title` html tag, viewable as a tooltip: 4. If you want to remove the OCR data from any notes, select them and then use the "Remove OCR data from selected notes" option in the menu shown above If you wish to have the OCR data outputted to a separate 'OCR' field on the note, which will modify your note types in your deck, you can set the `text_output_location` config option to `new_field` If you want to add new languages, you need to download the appropriate language data from here. Known issues - Will not work with handwritten text, this probably wont change as the library its based on is not optimised for handwritten text - Images with differently sized text, and/or images with low resolution text, may not process properly. If you have examples that you think should have been processed, please raise a GitHub issue so I can look into it - Note that for versions of anki prior to 2.1.41, the addon is locked to AnkiOCR version 0.5.3, due to breaking changes in the Anki API Changelog - 0.7.1 - 2021-09-19 - Removing Chinese, German, French and Spanish language data to reduce filesize - Updating readme with link to language data - 0.7.0 - 2021-09-19 - Updating vendorised pytesseract - Updating mac tesseract dependencies - Updated build script for tesseract for mac - The above fixes #27, #28, #29 - 0.6.1 - 2021-09-17 - Attempting to fix error where image does not exist - Improved exception display to end user if processing fails unexpectedly, adding debug info - 0.6.0 - 2021-09-13 - Fixes #26 , thanks @bwhurd for the bug report - Other small fixes to support Anki 2.1.41 and beyond - Drop support for Anki versions prior to 2.1.41, but it should still work. - 0.5.3 - 2021-09-04 - Fix raising of KeyError when img src is not found, thanks @thiswillbeyourgithub for the fix! - 0.5.2 - 2021-05-22 - Fix error on some Linux environments, see https://github.com/cfculhane/AnkiOCR/issues/20 , thanks to user thiswillbeyourgithub for the fix! - 0.5.1 - 2021-05-02 - Hotfix to include accidentally gitignored tesseract mac libs - 0.5.0 - 2021-05-02 - Added bundled tesseract for Mac, no longer any need to install it separately - Split out `tessdata` to its own folder, allowing easier installation of new languages - Change in the way note ID's are processed, no longer limited to 1000 cards - Fixed issue causing a crash in anki versions > 2.1.40 - Added some log text that will appear when invalid notes are encountered during a processing run - 0.4.3 - 2021-01-22 - Hotfix for config.json syntax error - 0.4.2 - 2021-01-19 - Add `num_threads` config option to allow manual setting of number of threads - Add `use_batching` config option to allow disabling of batching for those for which this causes performance issues - Added more unit tests to releasing new versions - Fixed an issue where OCR text containing "::" would break clozes, now cleans duplicate colons in text - 0.4.1 - 2021-01-01 - Reduced batch_size default to 5 to improve the progress bar updating frequency and feel of speed - added total time readout to final message on completion - added ability to cancel during processing - 0.4.0 - 2020-12-31 - Major feature update, now is multithreaded for roughly a 10x speed improvement - Complete refactor of code for readibility and maintability - Addition of basic unit tests for OCR section of codebase - Improved progress bar messaging - 0.3.1 - 2020-10-11 - Config setting for `text_output_location` is now read properly when starting OCR class - More detailed exception readout when exception occurs during processing - 0.3.0 - 2020-10-06 - New method for storing the ocr text, now stores it in title attr of the img html tag - Handle old verions of Anki not having different progressbar.update() - 0.2.6 - 2020-10-06 - Handle old verions of Anki not having different progressbar.update() - 0.2.5 - 2020-10-06 - Add alternate import method for Collection due to API changes in Anki - 0.2.4 - 2020-10-05 - Changed order of operations so that OCR is attempted before notes are modified to eliminate risk of database errors - Updated path to tesseract executable for mac and linux - 0.2.3 - 2020-10-05 - HOTFIX for tesseract cmd path on Mac - 0.2.2 - 2020-10-05 - Removed the install file for Tesseract-OCR for windows, now that the binaries themselves are included. - Updated the initial message the user sees to notify re: the database change message Anki will show. - 0.2.1 - 2020-10-05 - HOTFIX for Fixing tesseract executable detection - 0.2.0 - 2020-10-05 - Now packaged with windows binaries for Tesseract-OCR, no install necessary! - Added flag in config.json to indicate valid tesseract exec - Updates to README to reflect above changes - 0.1.0 - 2020-10-05 - Initial Release

GitHub repository: cfculhane/ankiocr
Repository description: Anki Addon to create searchable text from images in notes, using Tesseract OCR
Languages: C, HTML, Roff, C++, Python, CSS, JavaScript, Ruby, Shell, CMake, Makefile