Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quack
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
commul
Zeit.shift
Quack
Commits
6685c474
Commit
6685c474
authored
11 years ago
by
Toke Eskildsen
Browse files
Options
Downloads
Patches
Plain Diff
Added more comments with explanation of the script
parent
ca6ca5e1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
quack.sh
+18
-7
18 additions, 7 deletions
quack.sh
with
18 additions
and
7 deletions
quack.sh
+
18
−
7
View file @
6685c474
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#
#
#
#
# Quack 1.
0
beta - Quality assurance tool for text scanning projects.
# Quack 1.
1
beta - Quality assurance tool for text scanning projects.
#
#
# Generates zoomable (OpenSeadragon) views of scanned text pages with overlays
# Generates zoomable (OpenSeadragon) views of scanned text pages with overlays
# containing OCR-text from ALTO-files. The views are static HTML pages that
# containing OCR-text from ALTO-files. The views are static HTML pages that
...
@@ -61,26 +61,33 @@ export IMAGE_DISP_QUALITY="95"
...
@@ -61,26 +61,33 @@ export IMAGE_DISP_QUALITY="95"
export
THUMB_IMAGE_SIZE
=
"300x200"
export
THUMB_IMAGE_SIZE
=
"300x200"
# These elements will be grepped from the ALTO-files and shown on the image pages
# These elements will be grepped from the ALTO-files and shown on the image pages
ALTO_ELEMENTS
=
"processingDateTime softwareName"
ALTO_ELEMENTS
=
"processingDateTime softwareName"
# If true, preview-pages will not be regenerated
# If true, preview-pages will not be regenerated if the script is executed a
# second time with the same source and destination.
SKIP_EXISTING_PREVIEWS
=
true
SKIP_EXISTING_PREVIEWS
=
true
# Number of threads used for image processing. Note that histogram generation
# is very memory hungry (~2GB for a 30MP image). Adjust accordingly.
THREADS
=
4
THREADS
=
4
# If true, thumbnails are generated even if they already exists
# If true, thumbnails are generated even if they already exists
FORCE_THUMBNAILS
=
false
FORCE_THUMBNAILS
=
false
# If true, the script attempts to find all alternative versions of the current image
# If true, the script attempts to find all alternative versions of the current image
# based on the file name. Highly Statsbiblioteket-specific!
# in other fulders under source. Suitable for easy switching between alternate scans
# of the same material.
RESOLVE_ALTERNATIVES
=
false
RESOLVE_ALTERNATIVES
=
false
# If the IDNEXT attribute starts with 'ART' it is ignored
# If the IDNEXT attribute starts with 'ART' it is ignored
# Used to avoid visually linking everything on the page
# Used to avoid visually linking everything on the page
# False as Ninestars uses ART for each TextBlock
SKIP_NEXT_ART
=
false
SKIP_NEXT_ART
=
false
# How much of the image to retain, cropping from center, when calculating
# How much of the image to retain, cropping from center, when calculating
# histogram. Empty value = no crop. Valid values: 1-100
# histograms. Empty value = no crop. Valid values: 1-100
# This us usable for generating proper histograms for scans where the border
# is different from the rest of the image. Artifacts from rotations is an example.
# Suggested values are 85-95%.
CROP_PERCENT
=
""
CROP_PERCENT
=
""
# End default settings. User-supplied overrides will be loaded from quack.settings
pushd
`
dirname
$0
`
>
/dev/null
pushd
`
dirname
$0
`
>
/dev/null
ROOT
=
`
pwd
`
ROOT
=
`
pwd
`
if
[
-e
"quack.settings"
]
;
then
if
[
-e
"quack.settings"
]
;
then
echo
"Sourcing settings from quack.settings"
echo
"Sourcing
user
settings from quack.settings"
source
"quack.settings"
source
"quack.settings"
fi
fi
popd
>
/dev/null
popd
>
/dev/null
...
@@ -91,10 +98,14 @@ IMAGE_TEMPLATE="$ROOT/image_template.html"
...
@@ -91,10 +98,14 @@ IMAGE_TEMPLATE="$ROOT/image_template.html"
DRAGON
=
"openseadragon.min.js"
DRAGON
=
"openseadragon.min.js"
function
usage
()
{
function
usage
()
{
echo
"./quack.sh source destination"
echo
"quack 1.1 beta - Quality Assurance oriented ALTO viewer"
echo
""
echo
"Usage: ./quack.sh source destination"
echo
""
echo
""
echo
"source: The top folder for images with ALTO files"
echo
"source: The top folder for images with ALTO files"
echo
"destination: The wanted location of the presentation structure"
echo
"destination: The wanted location of the presentation structure"
echo
""
echo
"See comments in script and README.md for details."
}
}
SOURCE
=
$1
SOURCE
=
$1
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment