summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2024-07-25 18:25:35 +0200
committerThomas Voss <mail@thomasvoss.com> 2024-07-25 18:25:35 +0200
commit35920b11c9dfdc001eea7d3b2582c58aa3aa381b (patch)
tree8e30789b91a9651ea61abf3ff499cbc8155dbb96
parentfc1385dc7a6e788e5dcdb25169c77f93eb56b10a (diff)
Fix mintmark display for German extras table
-rw-r--r--data/extras6
-rw-r--r--lib.m44
-rwxr-xr-xscripts/gen-ecoin8
3 files changed, 11 insertions, 7 deletions
diff --git a/data/extras b/data/extras
index 7aa13d9..484df18 100644
--- a/data/extras
+++ b/data/extras
@@ -1,6 +1,6 @@
-DE 2007 D €2.00 @ ‘Mecklenburg-Vorpommern’ Circulated Proof
-DE 2012 J €2.00 X @a href="https://forum.emuenzen.de/threads/wer-ist-jk-der-die-m%C3%BCnzen-punzt-wir-untersuchen-ein-ph%C3%A4nomen.94119/" target="_blank" {=‘Euro Cash’ with ‘JK’ Engraving}
-DE 2015 A €2.00 @ ‘Hessen’ Circulated Proof
+DE 2007 D €2.00 @ ‘Mecklenburg-Vorpommern’ Circulated Proof
+DE 2012 J €2.00 X @a href="https://forum.emuenzen.de/threads/wer-ist-jk-der-die-m%C3%BCnzen-punzt-wir-untersuchen-ein-ph%C3%A4nomen.94119/" target="_blank" {=‘Euro Cash’ with ‘JK’ Engraving}
+DE 2015 A €2.00 @ ‘Hessen’ Circulated Proof
FI 1999 €2.00 X @span style="color: black; font-variant: diagonal-fractions" {-1/3} ‘9’s filled
FI 1999 €2.00 X @span style="color: black; font-variant: diagonal-fractions" {-2/3} ‘9’s filled
MC 2007 €1.00 X 2,991 Mintage No-Mintmark Variety
diff --git a/lib.m4 b/lib.m4
index d15a05d..02ae9ef 100644
--- a/lib.m4
+++ b/lib.m4
@@ -4,14 +4,12 @@ m4_changequote([,])
m4_dnl Output ‘$2’ if the country code matches ‘$1’
m4_define(__ifcode, [m4_ifelse(__code, [$1], [$2])])
+m4_dnl Output ‘$1’ if the country with code ‘__code’ has extra coins
m4_define(__ifextra, [
m4_syscmd(grep -iq '^__code' data/extras)
m4_ifelse(m4_sysval, 0, [$1])
])
-m4_dnl Expand ‘$3’ if ‘$1’ is a substring of ‘$2’
-m4_define(__ifhas, [m4_ifelse(m4_index([$2], [$1]), -1, [], [$3])])
-
m4_dnl Execute the script ‘$1’ in the ‘scripts/’ directory
m4_define(__esyscmd, [m4_esyscmd([scripts/$1])])
diff --git a/scripts/gen-ecoin b/scripts/gen-ecoin
index 18512b8..190725a 100755
--- a/scripts/gen-ecoin
+++ b/scripts/gen-ecoin
@@ -9,6 +9,12 @@ BEGIN {
}
$1 == CC {
- printf "tr {td{-%s} td{-%s} td .%s colspan=\"5\" {-%s}}", $2, $3, getcls($4), $5
+ if (split($2, a, " ") == 1) {
+ printf "tr {td{-%s} td{-%s} td .%s colspan=\"5\" {-%s}}", \
+ $2, $3, getcls($4), $5
+ } else {
+ printf "tr {td{-%s @sup{-%s}} td{-%s} td .%s colspan=\"5\" {-%s}}", \
+ a[1], a[2], $3, getcls($4), $5
+ }
}
' data/extras