Skip to content

Commit a4f4c31

Browse files
committed
also accept fractional scales in index
1 parent 7b118f3 commit a4f4c31

File tree

2 files changed

+118
-3
lines changed

2 files changed

+118
-3
lines changed

generate-index.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,11 @@ for (const dirEntry of dirEntries) {
5555
for (const subDir of subDirs) {
5656
if (!subDir.isDirectory()) continue
5757

58-
// Check if directory name matches pattern like "1x", "2x", "4x", etc.
59-
const match = subDir.name.match(/^(\d+)x$/)
58+
// Check if directory name matches pattern like "1x", "2x", "0.5x", etc.
59+
const match = subDir.name.match(/^([\d.]+)x$/)
6060
if (!match) continue
6161

62-
const spriteTileScale = parseInt(match[1])
62+
const spriteTileScale = parseFloat(match[1])
6363

6464
const spritePath = path.join(
6565
outputDir,

output/index.html

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,29 @@
4848
<body>
4949
<h1>Allmaps Thumbnail Sprites Test</h1>
5050
<ul>
51+
<li>
52+
<strong>0046a8c125f4a87b</strong> (0.5x tile scale)
53+
<br><small>Source: <a href="https://raw.githubusercontent.com/tu-delft-heritage/watertijdreis-data/refs/heads/main/content/annotations/01-1874-389916-georef.json">https://raw.githubusercontent.com/tu-delft-heritage/watertijdreis-data/refs/heads/main/content/annotations/01-1874-389916-georef.json</a></small>
54+
<br>
55+
Original: <a href="0046a8c125f4a87b/annotations.json">0046a8c125f4a87b/annotations.json</a> |
56+
<a href="https://viewer.allmaps.org/?url=https%3A%2F%2Fpages.allmaps.org%2Fsprite-test%2F0046a8c125f4a87b%2Fannotations.json">Open in Allmaps Viewer</a>
57+
<br>
58+
Sprite:
59+
<a href="./0046a8c125f4a87b/0.5x/sprites.jpg">Image</a> |
60+
<a href="./0046a8c125f4a87b/0.5x/iiif/info.json">info.json</a> |
61+
<a href="./0046a8c125f4a87b/0.5x/annotation.json">Georeference Annotation</a> |
62+
<a href="https://viewer.allmaps.org/?url=https%3A%2F%2Fpages.allmaps.org%2Fsprite-test%2F.%2F0046a8c125f4a87b%2F0.5x%2Fannotation.json">Open in Allmaps Viewer</a>
63+
<table>
64+
<tr>
65+
<th>Image Size</th>
66+
<th>Scale Factors</th>
67+
</tr>
68+
<tr>
69+
<td>1536 × 1639</td>
70+
<td>1, 2</td>
71+
</tr>
72+
</table>
73+
</li>
5174
<li>
5275
<strong>0046a8c125f4a87b</strong> (1x tile scale)
5376
<br><small>Source: <a href="https://raw.githubusercontent.com/tu-delft-heritage/watertijdreis-data/refs/heads/main/content/annotations/01-1874-389916-georef.json">https://raw.githubusercontent.com/tu-delft-heritage/watertijdreis-data/refs/heads/main/content/annotations/01-1874-389916-georef.json</a></small>
@@ -94,6 +117,52 @@ <h1>Allmaps Thumbnail Sprites Test</h1>
94117
</tr>
95118
</table>
96119
</li>
120+
<li>
121+
<strong>821a90b23df9ab8f</strong> (0.25x tile scale)
122+
<br><small>Source: <a href="https://sammeltassen.nl/iiif-manifests/allmaps/top25-1.json">https://sammeltassen.nl/iiif-manifests/allmaps/top25-1.json</a></small>
123+
<br>
124+
Original: <a href="821a90b23df9ab8f/annotations.json">821a90b23df9ab8f/annotations.json</a> |
125+
<a href="https://viewer.allmaps.org/?url=https%3A%2F%2Fpages.allmaps.org%2Fsprite-test%2F821a90b23df9ab8f%2Fannotations.json">Open in Allmaps Viewer</a>
126+
<br>
127+
Sprite:
128+
<a href="./821a90b23df9ab8f/0.25x/sprites.jpg">Image</a> |
129+
<a href="./821a90b23df9ab8f/0.25x/iiif/info.json">info.json</a> |
130+
<a href="./821a90b23df9ab8f/0.25x/annotation.json">Georeference Annotation</a> |
131+
<a href="https://viewer.allmaps.org/?url=https%3A%2F%2Fpages.allmaps.org%2Fsprite-test%2F.%2F821a90b23df9ab8f%2F0.25x%2Fannotation.json">Open in Allmaps Viewer</a>
132+
<table>
133+
<tr>
134+
<th>Image Size</th>
135+
<th>Scale Factors</th>
136+
</tr>
137+
<tr>
138+
<td>2138 × 2165</td>
139+
<td>1, 2, 4</td>
140+
</tr>
141+
</table>
142+
</li>
143+
<li>
144+
<strong>821a90b23df9ab8f</strong> (0.5x tile scale)
145+
<br><small>Source: <a href="https://sammeltassen.nl/iiif-manifests/allmaps/top25-1.json">https://sammeltassen.nl/iiif-manifests/allmaps/top25-1.json</a></small>
146+
<br>
147+
Original: <a href="821a90b23df9ab8f/annotations.json">821a90b23df9ab8f/annotations.json</a> |
148+
<a href="https://viewer.allmaps.org/?url=https%3A%2F%2Fpages.allmaps.org%2Fsprite-test%2F821a90b23df9ab8f%2Fannotations.json">Open in Allmaps Viewer</a>
149+
<br>
150+
Sprite:
151+
<a href="./821a90b23df9ab8f/0.5x/sprites.jpg">Image</a> |
152+
<a href="./821a90b23df9ab8f/0.5x/iiif/info.json">info.json</a> |
153+
<a href="./821a90b23df9ab8f/0.5x/annotation.json">Georeference Annotation</a> |
154+
<a href="https://viewer.allmaps.org/?url=https%3A%2F%2Fpages.allmaps.org%2Fsprite-test%2F.%2F821a90b23df9ab8f%2F0.5x%2Fannotation.json">Open in Allmaps Viewer</a>
155+
<table>
156+
<tr>
157+
<th>Image Size</th>
158+
<th>Scale Factors</th>
159+
</tr>
160+
<tr>
161+
<td>4288 × 4341</td>
162+
<td>1, 2, 4, 8</td>
163+
</tr>
164+
</table>
165+
</li>
97166
<li>
98167
<strong>821a90b23df9ab8f</strong> (1x tile scale)
99168
<br><small>Source: <a href="https://sammeltassen.nl/iiif-manifests/allmaps/top25-1.json">https://sammeltassen.nl/iiif-manifests/allmaps/top25-1.json</a></small>
@@ -117,6 +186,52 @@ <h1>Allmaps Thumbnail Sprites Test</h1>
117186
</tr>
118187
</table>
119188
</li>
189+
<li>
190+
<strong>a5912d5d11a3ef64</strong> (0.25x tile scale)
191+
<br><small>Source: <a href="https://sammeltassen.nl/iiif-manifests/allmaps/bonnebladen-dans-1.json">https://sammeltassen.nl/iiif-manifests/allmaps/bonnebladen-dans-1.json</a></small>
192+
<br>
193+
Original: <a href="a5912d5d11a3ef64/annotations.json">a5912d5d11a3ef64/annotations.json</a> |
194+
<a href="https://viewer.allmaps.org/?url=https%3A%2F%2Fpages.allmaps.org%2Fsprite-test%2Fa5912d5d11a3ef64%2Fannotations.json">Open in Allmaps Viewer</a>
195+
<br>
196+
Sprite:
197+
<a href="./a5912d5d11a3ef64/0.25x/sprites.jpg">Image</a> |
198+
<a href="./a5912d5d11a3ef64/0.25x/iiif/info.json">info.json</a> |
199+
<a href="./a5912d5d11a3ef64/0.25x/annotation.json">Georeference Annotation</a> |
200+
<a href="https://viewer.allmaps.org/?url=https%3A%2F%2Fpages.allmaps.org%2Fsprite-test%2F.%2Fa5912d5d11a3ef64%2F0.25x%2Fannotation.json">Open in Allmaps Viewer</a>
201+
<table>
202+
<tr>
203+
<th>Image Size</th>
204+
<th>Scale Factors</th>
205+
</tr>
206+
<tr>
207+
<td>2816 × 2838</td>
208+
<td>1, 2, 4</td>
209+
</tr>
210+
</table>
211+
</li>
212+
<li>
213+
<strong>a5912d5d11a3ef64</strong> (0.5x tile scale)
214+
<br><small>Source: <a href="https://sammeltassen.nl/iiif-manifests/allmaps/bonnebladen-dans-1.json">https://sammeltassen.nl/iiif-manifests/allmaps/bonnebladen-dans-1.json</a></small>
215+
<br>
216+
Original: <a href="a5912d5d11a3ef64/annotations.json">a5912d5d11a3ef64/annotations.json</a> |
217+
<a href="https://viewer.allmaps.org/?url=https%3A%2F%2Fpages.allmaps.org%2Fsprite-test%2Fa5912d5d11a3ef64%2Fannotations.json">Open in Allmaps Viewer</a>
218+
<br>
219+
Sprite:
220+
<a href="./a5912d5d11a3ef64/0.5x/sprites.jpg">Image</a> |
221+
<a href="./a5912d5d11a3ef64/0.5x/iiif/info.json">info.json</a> |
222+
<a href="./a5912d5d11a3ef64/0.5x/annotation.json">Georeference Annotation</a> |
223+
<a href="https://viewer.allmaps.org/?url=https%3A%2F%2Fpages.allmaps.org%2Fsprite-test%2F.%2Fa5912d5d11a3ef64%2F0.5x%2Fannotation.json">Open in Allmaps Viewer</a>
224+
<table>
225+
<tr>
226+
<th>Image Size</th>
227+
<th>Scale Factors</th>
228+
</tr>
229+
<tr>
230+
<td>5632 × 5676</td>
231+
<td>1, 2, 4, 8</td>
232+
</tr>
233+
</table>
234+
</li>
120235
<li>
121236
<strong>a5912d5d11a3ef64</strong> (1x tile scale)
122237
<br><small>Source: <a href="https://sammeltassen.nl/iiif-manifests/allmaps/bonnebladen-dans-1.json">https://sammeltassen.nl/iiif-manifests/allmaps/bonnebladen-dans-1.json</a></small>

0 commit comments

Comments
 (0)