Actor: Normalize key-value store terminology

Signed-off-by: Václav Vančura <commit@vancura.dev>
This commit is contained in:
Václav Vančura 2025-02-07 13:10:41 +01:00 committed by Adam Kliment
parent 7c486ce0cc
commit 5ecd4a48aa
2 changed files with 6 additions and 6 deletions

View File

@ -44,7 +44,7 @@ This Actor wraps the [Docling project](https://ds4sd.github.io/docling/) to prov
- The URL of the document. - The URL of the document.
- Output format (`md`, `json`, `html`, `text`, or `doctags`). - Output format (`md`, `json`, `html`, `text`, or `doctags`).
- OCR boolean toggle. - OCR boolean toggle.
4. The Actor will run and produce its outputs in the default Key-Value Store under the key `OUTPUT_RESULT`. 4. The Actor will run and produce its outputs in the default key-value store under the key `OUTPUT_RESULT`.
### Using Apify API ### Using Apify API

View File

@ -139,11 +139,11 @@ fi
echo "Document successfully processed and exported as '$OUTPUT_FORMAT' to file: $OUTPUT_NAME" echo "Document successfully processed and exported as '$OUTPUT_FORMAT' to file: $OUTPUT_NAME"
# --- Store output and log in Key-Value Store --- # --- Store output and log in key-value store ---
echo "Pushing processed document to Key-Value Store (record key: OUTPUT_RESULT)..." echo "Pushing processed document to key-value store (record key: OUTPUT_RESULT)..."
apify actor:set-value "OUTPUT_RESULT" --contentType "application/$OUTPUT_FORMAT" <"$OUTPUT_NAME" || { apify actor:set-value "OUTPUT_RESULT" --contentType "application/$OUTPUT_FORMAT" <"$OUTPUT_NAME" || {
echo "Error: Failed to push the output document to the Key-Value Store" echo "Error: Failed to push the output document to the key-value store"
exit $ERR_STORAGE_FAILED exit $ERR_STORAGE_FAILED
} }
@ -156,9 +156,9 @@ apify pushData "{\"url\": \"${DOCUMENT_URL}\", \"output_file\": \"${RESULT_URL}\
if [ -f "$LOG_FILE" ]; then if [ -f "$LOG_FILE" ]; then
if [ -s "$LOG_FILE" ]; then if [ -s "$LOG_FILE" ]; then
echo "Log file is not empty, pushing to Key-Value Store (record key: DOCLING_LOG)..." echo "Log file is not empty, pushing to key-value store (record key: DOCLING_LOG)..."
apify actor:set-value "DOCLING_LOG" --contentType "text/plain" <"$LOG_FILE" || { apify actor:set-value "DOCLING_LOG" --contentType "text/plain" <"$LOG_FILE" || {
echo "Warning: Failed to push the log file to the Key-Value Store" echo "Warning: Failed to push the log file to the key-value store"
} }
else else
echo "Warning: docling.log file exists but is empty" echo "Warning: docling.log file exists but is empty"