Skip to content

Commit

Permalink
Merge pull request #41 from bertsky/patch-2
Browse files Browse the repository at this point in the history
re-use METS basename for output
  • Loading branch information
kba authored Nov 10, 2022
2 parents dd1cfb3 + ba81c44 commit 005f797
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ocrd-fileformat-transform
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ main () {
ocrd__minversion 2.30.0

cd "${ocrd__argv[working_dir]}"
mets_basename=$(basename ${ocrd__argv[mets_file]})
page_id=${ocrd__argv[page_id]:-}
in_file_grp=${ocrd__argv[input_file_grp]}
out_file_grp=${ocrd__argv[output_file_grp]}
Expand Down Expand Up @@ -98,7 +99,7 @@ main () {
if [ "$overwrite" = "true" ];then
options+=(--force)
fi
cat $results/* | sort | ocrd workspace bulk-add "${options[@]}" -
cat $results/* | sort | ocrd workspace -m "$mets_basename" bulk-add "${options[@]}" -
rm -fr $results
}

Expand Down

0 comments on commit 005f797

Please sign in to comment.