From 9d13d4c94493dd743d42e00f4931e17c97657612 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Wed, 24 Jul 2024 11:27:16 -0700 Subject: [PATCH 1/3] Add publication date to JMdict/JMnedict/KANJIDIC title, add revision date to kanjidic --- jmdict.go | 1 + jmnedict.go | 1 + kanjidic.go | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/jmdict.go b/jmdict.go index b7f7bf7..3b82e02 100644 --- a/jmdict.go +++ b/jmdict.go @@ -262,6 +262,7 @@ func jmdictExportDb(inputPath string, outputPath string, languageName string, ti title = "JMdict" } jmdictDate := jmdictPublicationDate(dictionary) + title = title + " [" + jmdictDate + "]" index := dbIndex{ Title: title, diff --git a/jmnedict.go b/jmnedict.go index fff9a6c..77bf594 100644 --- a/jmnedict.go +++ b/jmnedict.go @@ -117,6 +117,7 @@ func jmnedictExportDb(inputPath, outputPath, language, title string, stride int, title = "JMnedict" } jmnedictDate := jmnedictPublicationDate(dictionary) + title = title + "[" + jmnedictDate + "]" index := dbIndex{ Title: title, diff --git a/kanjidic.go b/kanjidic.go index a33c122..aea856c 100644 --- a/kanjidic.go +++ b/kanjidic.go @@ -107,6 +107,8 @@ func kanjidicExportDb(inputPath, outputPath, language, title string, stride int, if title == "" { title = "KANJIDIC2" } + kanjidicDate := dict.Header.DatabaseVersion + title = title + "[" + kanjidicDate + "]" tags := dbTagList{ dbTag{Name: "jouyou", Notes: "included in list of regular-use characters", Category: "frequent", Order: -5}, @@ -161,7 +163,7 @@ func kanjidicExportDb(inputPath, outputPath, language, title string, stride int, index := dbIndex{ Title: title, - Revision: "kanjidic2", + Revision: "kanjidic2." + kanjidicDate, Sequenced: false, Attribution: edrdgAttribution, } From b449151c8965a500fcbe843de1155492f6c19f19 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Wed, 24 Jul 2024 12:53:49 -0700 Subject: [PATCH 2/3] Add date to jmdict forms --- jmdict_forms.go | 1 + 1 file changed, 1 insertion(+) diff --git a/jmdict_forms.go b/jmdict_forms.go index 409eadb..d1cc00f 100644 --- a/jmdict_forms.go +++ b/jmdict_forms.go @@ -238,6 +238,7 @@ func formsExportDb(inputPath, outputPath, languageName, title string, stride int } jmdictDate := jmdictPublicationDate(dictionary) + title = title + " [" + jmdictDate + "]" index := dbIndex{ Title: title, From d9dd1bf0aa2c984e20175f78223723df45a58474 Mon Sep 17 00:00:00 2001 From: MarvNC Date: Wed, 24 Jul 2024 12:55:29 -0700 Subject: [PATCH 3/3] Add space before date --- jmnedict.go | 2 +- kanjidic.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jmnedict.go b/jmnedict.go index 77bf594..adb2fd6 100644 --- a/jmnedict.go +++ b/jmnedict.go @@ -117,7 +117,7 @@ func jmnedictExportDb(inputPath, outputPath, language, title string, stride int, title = "JMnedict" } jmnedictDate := jmnedictPublicationDate(dictionary) - title = title + "[" + jmnedictDate + "]" + title = title + " [" + jmnedictDate + "]" index := dbIndex{ Title: title, diff --git a/kanjidic.go b/kanjidic.go index aea856c..c92f196 100644 --- a/kanjidic.go +++ b/kanjidic.go @@ -108,7 +108,7 @@ func kanjidicExportDb(inputPath, outputPath, language, title string, stride int, title = "KANJIDIC2" } kanjidicDate := dict.Header.DatabaseVersion - title = title + "[" + kanjidicDate + "]" + title = title + " [" + kanjidicDate + "]" tags := dbTagList{ dbTag{Name: "jouyou", Notes: "included in list of regular-use characters", Category: "frequent", Order: -5},