Helps to pay attention sometimes
This commit is contained in:
parent
48a785ff97
commit
e83fd886d0
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue