From 3cbb725cb357283f6bb5051f5dcdfcf0c02cde68 Mon Sep 17 00:00:00 2001 From: Abbe98 Date: Mon, 3 Oct 2022 19:48:40 +0200 Subject: [PATCH] Add Specimen template add {{specimen}} template #108 side effect: removed unused import --- src/pattypan/Settings.java | 43 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 41 insertions(+), 2 deletions(-) diff --git a/src/pattypan/Settings.java b/src/pattypan/Settings.java index c8b7aae..8323884 100644 --- a/src/pattypan/Settings.java +++ b/src/pattypan/Settings.java @@ -35,8 +35,6 @@ import java.util.Properties; import java.util.logging.Level; -import pattypan.Util; - public final class Settings { private Settings() {}; @@ -445,6 +443,47 @@ public final class Settings { ) ); + + TEMPLATES.put("Specimen", + new Template("Specimen", + new TemplateField[]{ + new TemplateField("taxon", "Taxon"), + new TemplateField("authority", "Authority"), + new TemplateField("institution", "Institution"), + new TemplateField("accession number", "Accession number"), + new TemplateField("gender", "Gender"), + new TemplateField("cultivar", "Cultivar"), + new TemplateField("photographer", "Photographer"), + new TemplateField("source", "Source"), + new TemplateField("date", "Date"), + new TemplateField("description", "Description"), + new TemplateField("permission", "Permission"), + }, "=={{int:filedesc}}==\n" + + "{{Specimen\n" + + " |taxon = ${taxon}\n" + + " |authority = ${authority}\n" + + " |institution = ${institution}\n" + + " |accession number = ${accession_number}\n" + + " |gender = ${gender}\n" + + " |cultivar = ${cultivar}\n" + + " |photographer = ${photographer}\n" + + " |source = ${source}\n" + + " |date = ${date}\n" + + " |description = ${description}\n" + + " |permission = ${permission}\n" + + "}}\n\n" + + "=={{int:license-header}}==\n" + + "${license}${partnership}" + + "\n\n" + + "<#if categories ? has_content>\n" + + "<#list categories ? split(\";\") as category>\n" + + "[[Category:${category?trim}]]\n" + + "\n" + + "<#else>{{subst:unc}}\n" + + "" + ) + ); + /* TEMPLATES.put("Name", new Template("Name",