summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2023-12-28 04:20:58 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2023-12-28 04:20:58 +0100
commite4d83499d71f41e63865b6529edaaaabe8ce0bd5 (patch)
tree478df298ed9bac4acd9ff82939bddf379b0e7ff6
parent490923b96d21c6009d23ec7e78a38a3db1864a87 (diff)
chore: restrict shown tags
-rw-r--r--app/Main.hs15
1 files changed, 14 insertions, 1 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 03a2960..b89e94e 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -379,7 +379,20 @@ printTags doc =
Nothing -> printf "@%s\n" (G.tagKey tag)
Just tagValue -> printf "@%s %s\n" (G.tagKey tag) tagValue
)
- (doc.index.tags `S.union` doc.index.internalTags)
+ ( filter
+ ( \tag ->
+ -- TODO Handle tags hidden by default
+ --
+ -- - Add `list-default-hide-tags` to `Settings`
+ -- - Add `--show-tags`, `--hide-tags` to `List`
+ not ("paperless-ngx." `T.isPrefixOf` G.tagKey tag)
+ && (G.tagKey tag /= "content")
+ && (G.tagKey tag /= "importedFrom")
+ && (G.tagKey tag /= "language")
+ )
+ . S.toList
+ $ doc.index.tags `S.union` doc.index.internalTags
+ )
doRedoIf :: [G.Filter] -> Bool -> IO ()
doRedoIf filters redo =