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)