Skip to content

Commit

Permalink
Improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweigelt committed Dec 21, 2023
1 parent fffeae6 commit f9503b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ PORT ?= 9022
NETWORK ?= bridge
CONTROLLER_HOST ?= $(shell dig +short $$HOSTNAME)
CONTROLLER_PORT_SSH ?= 8022
ASYNC=true
run: $(DATA)
docker run -d --rm \
-p $(PORT):22 \
Expand All @@ -67,7 +66,6 @@ run: $(DATA)
--mount type=bind,source=$(PRIVATE),target=/id_rsa \
-e UID=$(UID) -e GID=$(GID) -e UMASK=$(UMASK) \
-e CONTROLLER=$(CONTROLLER_HOST):$(CONTROLLER_PORT_SSH) \
-e ASYNC=false \
$(TAGNAME)

$(DATA)/testdata-production:
Expand Down Expand Up @@ -113,8 +111,6 @@ else
endif
diff -u <(docker run --rm -v $(DATA):/data $(TAGNAME) ocrd workspace -d $(<F) find -G FULLTEXT -g PHYS_0017..PHYS_0021 -k url) <(for file in FULLTEXT/FULLTEXT_PHYS_00{17..21}.xml; do echo $(PREFIX)/$$file; done)

test-ocrd-lib: SCRIPT = process_images.sh --proc-id 1 --lang deu --script Fraktur

clean clean-testdata:
$(RM) -r $(DATA)/testdata* $(DATA)/ocr-d/testdata*

Expand Down
4 changes: 3 additions & 1 deletion ocrd_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ init() {

PID=$$

WEBHOOK_RECEIVER_URL=""
WEBHOOK_KEY_DATA=""

cd /data

logger -p user.info -t $TASK "ocr_init initialize variables and directory structure"
Expand All @@ -45,7 +48,6 @@ init() {
# try to be unique here (to avoid clashes)
REMOTEDIR="KitodoJob_${PID}_$(basename $PROCESS_DIR)"

WORKFLOW=$(command -v "$WORKFLOW" || realpath "$WORKFLOW")
if ! test -f "$WORKFLOW"; then
logger -p user.error -t $TASK "invalid workflow '$WORKFLOW'"
exit 3
Expand Down
4 changes: 3 additions & 1 deletion process_mets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ where OPTIONS can be any/all of:
$RESULT_GRP
--url-prefix URL convert result text file refs from local to URL
and prefix them
--webhook-receiver-url url to the webhook receiver (ActiveMQ)
--webhook-receiver-url url to the webhook receiver
--help show this message and exit
and METS is the path of the METS file to process. The script will copy
Expand Down Expand Up @@ -87,6 +87,8 @@ WEBHOOK_KEY_DATA="{\"metsPath\" : $METS_PATH}"
(
init_task

logger -p user.info -t $TASK "after init task"

pre_clone_to_workdir

pre_sync_workdir
Expand Down

0 comments on commit f9503b5

Please sign in to comment.