Skip to content
Snippets Groups Projects
Commit 002eacb7 authored by Toke Eskildsen's avatar Toke Eskildsen
Browse files

Added sample images and ALTO-files along with script for generating the sample data

parent c709e525
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
#
# Creates the sample images for Quack from originals.
# This script is only relevant if the caller has access
# to the original scanned files. These are not stored
# with the Quack code as their cumulative size is 34MB.
# Contact Toke Eskildsen - te@statsbiblioteket.dk if
# the originals are of interest.
#
# Requires bash & GraphicsMagick
#
ORIGINALS="/mnt/bulk/data/quack_samples"
COMMAND="-geometry 40%x -level 0,1.0,220 -quality 55 -type Grayscale"
FROM_TO="AdresseContoirsEfterretninger-1795-06-16-02-0018B,ACE-17950616-0018B AdresseContoirsEfterretninger-1795-06-16-02-0018B,ACE-17950616-0019A AdresseContoirsEfterretninger-1795-06-16-02-0018B,ACE-17950616-0019B"
# We would like samples from other time periods, but only the 200+ years
# old ones are currently cleared for distribution.
#FROM_TO="AdressecomptoirsEfterretninger-1846-01-20-01-0029A,ACE-18460120-0029A AdressecomptoirsEfterretninger-1846-01-20-01-0031B,ACE-18460120-0031A AdresseContoirsEfterretninger-1795-06-16-02-0018B,ACE-17950616-0018B"
SAMPLES="samples"
if [ ! -d $ORIGINALS ]; then
echo "The originals folder $ORIGINALS does not exist."
if [ ! "te" == `whoami` ]; then
echo "The user name `whoami` indicates you are not Toke Eskildsen."
echo "This implies that you do not have the originals used to regenerate the samples."
echo "Please ensure that the originals are available at ${ORIGINALS}."
fi
exit 2
fi
if [ ! -d $SAMPLES ]; then
mkdir $SAMPLES
fi
for FT in $FROM_TO; do
SRC=`echo "$FT" | cut -d, -f1`
DEST=`echo "$FT" | cut -d, -f2`
echo "Generating sample from ${SRC} to ${DEST}"
gm convert ${ORIGINALS}/${SRC}.png $COMMAND ${SAMPLES}/${DEST}.jpg
cp ${ORIGINALS}/${SRC}.alto.xml ${SAMPLES}/${DEST}.alto.xml
done
echo "Done"
This diff is collapsed.
samples/ACE-17950616-0018B.jpg

168 KiB

This diff is collapsed.
samples/ACE-17950616-0019A.jpg

168 KiB

This diff is collapsed.
samples/ACE-17950616-0019B.jpg

168 KiB

0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment