summaryrefslogtreecommitdiffstats
path: root/src/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Main.hs')
-rw-r--r--src/Main.hs14
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