diff options
author | Yann Herklotz <git@yannherklotz.com> | 2023-05-13 21:44:51 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2023-05-13 21:44:51 +0100 |
commit | cc9d36e897065da95f6c85cb8b933dda7afe5ab3 (patch) | |
tree | 7cbebb06472db38d3750512846b20956dd817926 /src/Main.hs | |
parent | 1cdedbb50ed5ff9aea4a5ecf78e512dc52cc03af (diff) | |
download | zk-visual-cc9d36e897065da95f6c85cb8b933dda7afe5ab3.tar.gz zk-visual-cc9d36e897065da95f6c85cb8b933dda7afe5ab3.zip |
Tweak command line a bit
Diffstat (limited to 'src/Main.hs')
-rw-r--r-- | src/Main.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/Main.hs b/src/Main.hs index dd77a2a..99d39a2 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -206,7 +206,7 @@ import Zettel data Options = Options { org :: [FilePath], bibliography :: Maybe FilePath, - csl :: Maybe FilePath, + csl :: FilePath, index :: Maybe FilePath, output :: FilePath } @@ -221,14 +221,12 @@ options = def &= name "b" &= help "Bibliography file path (default: references.bib)" - &= typFile - &= opt (Just ("references.bib" :: FilePath)), + &= typFile, csl = - def + "ieee.csl" &= name "c" &= help "Csl file path (default: ieee.csl)" - &= typFile - &= opt (Just ("ieee.csl" :: FilePath)), + &= typFile, index = def &= name "i" @@ -243,8 +241,10 @@ main :: IO () main = do zkOpts <- cmdArgs options let fl = org zkOpts + verbose <- (== Loud) <$> getVerbosity + _quiet <- (== Quiet) <$> getVerbosity graph' <- parseZettelKasten $ zip [1 ..] fl let graph = transcludeMdAll graph' let linkedGraph = linkAll graph let wrappedGraph = wrapZettelGraph linkedGraph - renderZettelGraphFile (output zkOpts) wrappedGraph + renderZettelGraphFile verbose (csl zkOpts) (bibliography zkOpts) (output zkOpts) wrappedGraph |