mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-31 14:34:40 +00:00
Actor: Adding input document URL validation
Signed-off-by: Václav Vančura <commit@vancura.dev>
This commit is contained in:
parent
1ba5aeefdc
commit
39bcc52c1b
@ -58,6 +58,14 @@ case "$OUTPUT_FORMAT" in md | json | html | text | doctags) ;;
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# Validate URL is accessible.
|
||||||
|
echo "Validating document URL..."
|
||||||
|
if ! curl --output /dev/null --silent --head --fail "${DOCUMENT_URL}"; then
|
||||||
|
echo "Error: Unable to access document at URL: ${DOCUMENT_URL}"
|
||||||
|
echo "Please ensure the URL is valid and publicly accessible."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# --- Build Docling command ---
|
# --- Build Docling command ---
|
||||||
|
|
||||||
DOC_CONVERT_CMD="docling --verbose \"${DOCUMENT_URL}\" --to \"${OUTPUT_FORMAT}\""
|
DOC_CONVERT_CMD="docling --verbose \"${DOCUMENT_URL}\" --to \"${OUTPUT_FORMAT}\""
|
||||||
|
Loading…
Reference in New Issue
Block a user