From b78034ad5bf65f1dfe390861f72bed827e2ab1b8 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 28 Nov 2023 16:22:16 +0100 Subject: add furigana to main examples and persist furigana in batches.json --- src/datafiles.rs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/datafiles.rs') diff --git a/src/datafiles.rs b/src/datafiles.rs index 629badf..0e526ef 100644 --- a/src/datafiles.rs +++ b/src/datafiles.rs @@ -12,6 +12,8 @@ pub struct Example { pub ja: String, pub en: String, pub expl: String, + #[serde(default)] + pub furigana: Option, pub id: Option, pub chars: Charset, } @@ -151,6 +153,7 @@ pub fn read_examples(all_kanji: &Charset) -> Result> { expl: b.to_string(), id: Some(id.to_string()), chars: Charset::new(ja).inter(all_kanji), + furigana: None, }); } else { ret.push(Example { @@ -159,6 +162,7 @@ pub fn read_examples(all_kanji: &Charset) -> Result> { expl: b.to_string(), id: None, chars: Charset::new(ja).inter(all_kanji), + furigana: None, }); } } -- cgit v1.2.3