- PHP 100%
|
Arthur Schiwon
af6cd32ba5
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de> |
||
|---|---|---|
| appinfo | initial commit | |
| docs | docs: add a README and some examples | |
| img | enh: first implementation of a flow based, taskprocessing utilizing ocr | |
| lib | style(PHP): adhere to code style guidelines | |
| .gitignore | add first dev deps | |
| .php-cs-fixer.dist.php | add first dev deps | |
| AGENTS.md | enh: put up a barricade | |
| composer.json | style(PHP): adhere to code style guidelines | |
| composer.lock | style(PHP): adhere to code style guidelines | |
| LICENSE | enh: add license | |
| README.md | doc: very brief contribution section | |
This is handwritten
With Handwritten you can let Nextcloud turn your handwritten note into a text document.
The app is in a very early state, you may encounter rough corners.
It uses AI for the optical character recognition (OCR) of your handwritten note. It requires that you have a working Ollama instance (or API compatible) available, and the model if your choice available. The default model is qwen3.6:27b.
Handwritten also utilizes the Nextcloud Flow approach and registers an operation there. So to configure it, in Nextcloud go to Personal Settings → Flow and add the Recognize handwritten text operation. Fill in your criteria, at the very least require the File MIME type to match Images.
The results are stored in a markdown text file (.md extension) right next to the source image.
The OCR process then happens in the background, using the taskprocessing mechanism of the Nextcloud server. Follow up on the AI task pickup documentation for a better setup.
In my testing on definitely not LLM-suited hardware, I had process time from a few minutes for the Hello World example to up to roughly 45 minutes for a full, crabbed DIN A4 piece of paper. Due to this experience, handwritten connects with a 50minutes time out to the Ollama host. At the moment, this value is hardcoded.
Handwritten is not exposed in the Nextcloud assistant.
Mind, Handwritten is not suited for typed documents, say example printed letters for example. In those cases you are better off using a deterministic approach like tesseract.
Examples
Configuration
At the moment the configuration is not exposed in the web interface. Use the occ commands to configure the app:
Specifying the ollama host
By default, the app tries to connect to http://localhost:11434/. To specify a different host, set the config accordingly:
php occ config:app:set handwritten ollama_host --value="https://my.ollama.srv:12345"
At the moment there is no check whether the host is reachable. When using HTTPS and self-signed certificates, please make sure that they are made known to Nextcloud.
Specifying the LLM model to use
By default, the app attempts to use qwen3.6:27b. To specify a different model, run:
php occ config:app:set handwritten ocr_model --value="my-model:161b"
Unsurprisingly, the model you choose has to accept images as input data.
At the moment there is no check, whether the model is actually available on the host.
Contribution guidelines
Thank you for considering!
There are no strict rules whatsoever, I just assume you know how to get Nextcloud for development running. Other than that, simply open a pull request and we will go from there. Only one thing:
If you feel you have to use an AI agent for development here, please save everybody's time and let it be.