Repository navigation
feat(documents): add docling (docling-serve) parsing backend - #1
Closed
yuisheaven wants to merge 2 commits into
Closed
yuisheaven wants to merge 2 commits into
yuisheaven wants to merge 2 commits into
Conversation
yuisheaven
force-pushed
the
claude/nextcloud-docling-integration-vbg9jt
branch
from
July 2, 2026 11:26
378ccf0 to
6e4dd00
Compare
|
Claude encountered an error —— View job I'll analyze this and get back to you. |
Add docling-serve as an OCR-strong document-parsing backend alongside unstructured, for photographed/scanned/handwritten text. - Images auto-route to a new images-only DoclingProcessor (priority 20). - Scanned/no-text-layer PDFs escalate to docling via DOCUMENT_OCR_PROVIDER=docling, reusing the classifier's text-layer detection so born-digital PDFs stay on the cheap local tiers. - nc_webdav_read_file gains a force_processor argument so the caller can re-parse a text-layer PDF (tables / partial text) with docling on demand. One shared docling-serve HTTP client (document_processors/docling_serve.py) backs both the DoclingProcessor and the OCR-tier _DoclingServeBackend. Config: ENABLE_DOCLING, DOCLING_API_URL, DOCLING_TIMEOUT, DOCLING_OCR_LANG, DOCLING_DO_OCR; docling added to the document_ocr_provider enum. New docling docker-compose profile. See docs/ADR-031. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
- convert_file: raise ProcessorError (not JSONDecodeError/AttributeError) on a non-JSON or non-object docling-serve response, honoring the documented contract. - docling OCR backend always sends do_ocr=true (it IS the OCR tier); DOCLING_DO_OCR now tunes only the image processor, so it can't silently no-OCR scanned PDFs. Dropped docling_do_ocr from Settings/env-map (kept in _DEFAULTS for the image path). - Drop the misleading hardcoded docling_status metadata. - Docs: correct the docling image MIME list (add gif/webp) + clarify DOCLING_DO_OCR scope. - Tests: cover convert_file non-dict/non-JSON bodies and the progress-callback path. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
yuisheaven
force-pushed
the
claude/nextcloud-docling-integration-vbg9jt
branch
from
July 2, 2026 11:50
6e4dd00 to
e2ddfc7
Compare
yuisheaven
pushed a commit
that referenced
this pull request
Oct 23, 2026
_encode_dav_url split the URL with urlsplit before quoting the path, which
reads a '#' or '?' in a DAV path as a fragment/query delimiter and drops
everything after it. Both call sites are reachable:
_get_calendar_url("My #1 Calendar")
-> .../calendars/<uid>/My%20 (wrong collection)
a REPORT href for evt%231.ics, which caldav hands back decoded as
evt#1.ics
-> .../personal/evt (truncated event URL)
The second is the dangerous one: str(event.url) is what update_event and
delete_event act on, and what is returned as `href` -- so the truncation
acts on the wrong object, silently.
That is the same spurious-404 failure _encode_dav_path was added to fix in
PR cbcoutinho#891, so delegate to it rather than restating the rule. The docstring
claimed the two were the same rule and they had already diverged. Only the
authority is split off first, so an absolute URL's scheme, host and port
survive.
Also route list_calendars' PROPFIND through the helper. _calendar_home_url
is stored decoded, so that call was relying on the HTTP layer to normalise
a space for us -- the one URL this client still put on the wire unencoded.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RTTQWZeiRyTvLE78ZBatFN
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add docling-serve as an OCR-strong document-parsing backend alongside
unstructured, for photographed/scanned/handwritten text.
DOCUMENT_OCR_PROVIDER=docling, reusing the classifier's text-layer
detection so born-digital PDFs stay on the cheap local tiers.
re-parse a text-layer PDF (tables / partial text) with docling on demand.
One shared docling-serve HTTP client (document_processors/docling_serve.py)
backs both the DoclingProcessor and the OCR-tier _DoclingServeBackend.
Config: ENABLE_DOCLING, DOCLING_API_URL, DOCLING_TIMEOUT, DOCLING_OCR_LANG,
DOCLING_DO_OCR; docling added to the document_ocr_provider enum. New docling
docker-compose profile. See docs/ADR-031.