This commit is contained in:
MasseR committed 2025-03-27 19:21:46 +02:00
1 parent 9adef88873
commit 05cf5df18f
9 files changed
+269 -52

No files matched your search

+7 -4
View File
@@ -16,10 +16,10 @@ import Data.Text.Strict.Lens (utf8)
import Katip qualified as K
import M
import Options.Generic (Generic, ParseRecord (..), getRecord, unHelpful, type (<?>))
import Streamly.Data.Fold.Prelude qualified as Fold
import Streamly.Data.Stream.Prelude qualified as Stream
import Text.Pandoc (PandocError, def, readHtml, runPure, writeMarkdown)
import Wallabag
import qualified Streamly.Data.Fold.Prelude as Fold
import qualified Streamly.Data.Stream.Prelude as Stream
data Options = Options
{ full :: Bool <?> "Go through all the entries",
@@ -51,8 +51,9 @@ run :: K.Severity -> Scan -> IO ()
run sev scan = initialS sev $ \s -> do
runM s $ do
Stream.fold Fold.drain $
sourceEntries scan & markdownEntry & processableEntries &
Stream.parMapM (Stream.maxThreads 5) doWork
sourceEntries scan
& markdownEntry & processableEntries
& Stream.parMapM (Stream.maxThreads 5) doWork
test :: IO ()
test = run K.DebugS Quick
@@ -110,6 +111,8 @@ hardLabels =
"AI"
]
defaultMain :: IO ()
defaultMain = do
opts <- getRecord "Wallabag tagger"