summaryrefslogtreecommitdiffstats
path: root/app/Settings.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Settings.hs')
-rw-r--r--app/Settings.hs9
1 files changed, 6 insertions, 3 deletions
diff --git a/app/Settings.hs b/app/Settings.hs
index 39e8e35..f4c5811 100644
--- a/app/Settings.hs
+++ b/app/Settings.hs
@@ -23,14 +23,16 @@ import System.Environment.XDG.BaseDir (getSystemConfigFiles, getUserConfigFile)
import Text.RE.TDFA.Text qualified as R
data Settings = Settings
- { suggestedTags :: [SuggestedTag]
+ { suggestedTags :: [SuggestedTag],
+ defaultLanguage :: String
}
deriving (Show, Generic)
instance Semigroup Settings where
a <> b =
Settings
- { suggestedTags = nub (a.suggestedTags <> b.suggestedTags)
+ { suggestedTags = nub (a.suggestedTags <> b.suggestedTags),
+ defaultLanguage = b.defaultLanguage
}
instance Monoid Settings where
@@ -45,7 +47,8 @@ instance Monoid Settings where
-- - perform minor corrections on OCR, ie. parse `0 1.01.1970`
SuggestTagByRE "createdAt" [R.re|[0-9]{2}\.[0-9]{2}\.[0-9]{4}|],
SuggestTagByTags "correspondent"
- ]
+ ],
+ defaultLanguage = "deu+eng"
}
instance A.FromJSON Settings