summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2023-12-27 03:22:55 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2023-12-27 03:22:55 +0100
commit822fe0e054265ada35a0f9b4a7305fd97a477375 (patch)
treef3444d398ec63be31fda94e7625312f5475d1684
parent99d93cfa07c1d670f3e52a33a32fbe7e0be94318 (diff)
chore: add @topic to issues
-rw-r--r--app/Main.hs2
-rw-r--r--app/Prompt.hs4
-rw-r--r--app/Settings.hs2
3 files changed, 8 insertions, 0 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 5e48c84..7720a80 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -586,6 +586,8 @@ suggestTags settings allDocs doc = do
S.SuggestTagByTags tagName -> do
let tagValues =
-- TODO Cache `probabilityMap`
+ --
+ -- @topic probability-map
probabilityMap allDocs
& filter
( \(word, tag, _) ->
diff --git a/app/Prompt.hs b/app/Prompt.hs
index 0548c80..4a9b725 100644
--- a/app/Prompt.hs
+++ b/app/Prompt.hs
@@ -34,6 +34,8 @@ help h (Choice c _ q as) = Choice c (Just h) q as
help h (String c _ q as) = String c (Just h) q as
-- TODO add `compact`
+--
+-- @topic prompt
compact :: Prompt a -> Prompt a
compact (Choice _ h' q as) = Choice True h' q as
compact (String _ h' q as) = String True h' q as
@@ -49,6 +51,8 @@ instance Promptable String where
prompt :: (Eq a, Promptable a) => Prompt a -> IO a
prompt p@(Choice c h' q as) = do
-- TODO add `help`
+ --
+ -- @topic prompt
let p' = String c Nothing q (map toString (N.toList as))
a' <- fromString <$> prompt p'
if isNothing a' || not (a' `elem` (map Just (N.toList as)))
diff --git a/app/Settings.hs b/app/Settings.hs
index f4c5811..08b40bb 100644
--- a/app/Settings.hs
+++ b/app/Settings.hs
@@ -45,6 +45,8 @@ instance Monoid Settings where
--
-- - date formats that spell out the month name, ie. `1 Januar 1970` or `1 Jan 1970`
-- - perform minor corrections on OCR, ie. parse `0 1.01.1970`
+ --
+ -- @topic suggested-tags
SuggestTagByRE "createdAt" [R.re|[0-9]{2}\.[0-9]{2}\.[0-9]{4}|],
SuggestTagByTags "correspondent"
],