From e83fd886d0af26e7f0fb526376a20e9ddb2a2949 Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Mon, 31 Jul 2023 15:09:44 +0200 Subject: [PATCH] Helps to pay attention sometimes --- app/Main.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Main.hs b/app/Main.hs index 364dfde..8b8db3f 100644 --- a/app/Main.hs +++ b/app/Main.hs @@ -39,6 +39,7 @@ args = Args <> help "Verbose mode") <*> switch ( long "references" + <> short 'R' <> help "Generate link reference based on first line of document" ) <*> switch ( long "cgi" @@ -53,7 +54,7 @@ main = parseArgs =<< execParser opts <> header "Generate a gemini page index") parseArgs :: Args -> IO() -parseArgs (Args t dir h v c r) = do +parseArgs (Args t dir h v r c) = do if c then do putStr success putStrLn $ "# " ++ t @@ -66,7 +67,7 @@ parseArgs (Args t dir h v c r) = do mkIndex :: Bool -> FilePath -> IO () mkIndex True l = do line <- readFile l - putStrLn $ "=> " ++ l ++ (head . lines $ line) + putStrLn $ "=> " ++ l ++ " " ++ (head . lines $ line) mkIndex False l = putStrLn $ "=> " ++ l --compose = (++) <$> ("=> " ++) <*> (show . length) <*> (head . lines =<< readFile)