Skip to content

Commit

Permalink
Merge main
Browse files Browse the repository at this point in the history
  • Loading branch information
markusweigelt committed Dec 18, 2023
2 parents 38a5d22 + e8c06e0 commit 7f91893
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 5 deletions.
5 changes: 4 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@ MANAGER_IMAGE=ghcr.io/slub/ocrd_manager:latest
MANAGER_HOST=ocrd-manager
MANAGER_PORT_SSH=22
MANAGER_PORT_WEB=4004

MANAGER_ENV_UID=1001
MANAGER_ENV_GID=1001
MANAGER_ENV_UMASK=0002
MANAGER_KEYS=~/.ssh/authorized_keys2
MANAGER_KEY=~/.ssh/id_rsa
MANAGER_DATA=~/
MANAGER_WORKFLOWS=/workflows

MONITOR_DB_ROOT_USER=root
MONITOR_DB_ROOT_USER=root_password

MQ_HOST=kitodo-mq
MQ_PORT=61616
Expand Down
5 changes: 5 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,3 +90,8 @@ ENV VIRTUAL_ENV $PREFIX
ENV HOME /
ENV ASYNC=true
ENV WEBHOOK_RECEIVER_URL=

# install workflow-configuration (for ocrd-make and METS/PAGE XSLT)
RUN git -C /tmp clone https://github.com/bertsky/workflow-configuration.git && \
make -C /tmp/workflow-configuration deps-ubuntu install && \
rm -fr /tmp/workflow-configuration
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 SLUB/ocrd_manager contributors (https://github.com/slub/ocrd_manager/graphs/contributors)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ else
if test -t 0 -a -t 1; then TTY=-i; fi; \
docker exec $$TTY -t -u ocrd $(CONTAINER) $(SCRIPT) $(<F)/mets.xml
endif
diff -u <(docker run --rm -v $(DATA):/data $(TAGNAME) ocrd workspace -d $(<F) find -G FULLTEXT -g PHYS_0017..PHYS_0021) <(for file in FULLTEXT/FULLTEXT_PHYS_00{17..21}.xml; do echo $(PREFIX)/$$file; done)
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

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,3 +237,4 @@ If you have any questions or encounter any problems, please do not hesitate to c

- [Robert Sachunsky](https://github.com/bertsky)
- [Markus Weigelt](https://github.com/markusweigelt)

6 changes: 3 additions & 3 deletions ocrd_lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,18 @@ pre_clone_to_workdir() {
diff -u <(ocrd workspace -m "$METS_PATH" list-page) <(ocrd workspace -d "$WORKDIR" list-page)
else
# we cannot use ocrd workspace clone, because it does not offer copying local files
# (only download all remote or download nothing)
# (only download all remote or download nothing) core#1149
cp -v "$METS_PATH" "$WORKDIR"/mets.xml
rsync -T /tmp --exclude=$(basename "$METS_PATH") -av "$(dirname "$METS_PATH")"/ "$WORKDIR"
# now rename the input file grp to the OCR-D default
# (cannot use ocrd workspace rename-group due to core#913)
#ocrd workspace -d "$WORKDIR" rename-group $IMAGES_GRP OCR-D-IMG
xmlstarlet ed -L -N mods=http://www.loc.gov/mods/v3 -N mets=http://www.loc.gov/METS/ -N xlink=http://www.w3.org/1999/xlink \
-u "/mets:mets/mets:fileSec/mets:fileGrp[@USE='$IMAGES_GRP']/@USE" -v OCR-D-IMG "$WORKDIR/mets.xml"
# broken:
#mets-alias-filegrp -s input=$IMAGES_GRP -s output=OCR-D-IMG -i "$WORKDIR/mets.xml"
# now remove the output file grp, if it exists
ocrd workspace -d "$WORKDIR" remove-group -fr $RESULT_GRP
# workaround for core#485
ocrd workspace -d "$WORKDIR" remove -f FULLDOWNLOAD
fi
}

Expand Down

0 comments on commit 7f91893

Please sign in to comment.