aboutsummaryrefslogtreecommitdiff
path: root/Main.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Main.hs')
-rw-r--r--Main.hs20
1 files changed, 14 insertions, 6 deletions
diff --git a/Main.hs b/Main.hs
index 0e1291983..0e0b4ba26 100644
--- a/Main.hs
+++ b/Main.hs
@@ -154,7 +154,8 @@ data Opt = Opt
, optWrapText :: Bool -- ^ Wrap text
, optSanitizeHTML :: Bool -- ^ Sanitize HTML
#ifdef _CITEPROC
- , optModsFile :: String
+ , optBiblioFile :: String
+ , optBiblioFormat :: String
, optCslFile :: String
#endif
}
@@ -187,7 +188,8 @@ defaultOpts = Opt
, optWrapText = True
, optSanitizeHTML = False
#ifdef _CITEPROC
- , optModsFile = []
+ , optBiblioFile = []
+ , optBiblioFormat = []
, optCslFile = []
#endif
}
@@ -364,11 +366,16 @@ options =
"FORMAT")
"" -- "Print default header for FORMAT"
#ifdef _CITEPROC
- , Option "" ["mods"]
+ , Option "" ["biblio"]
(ReqArg
- (\arg opt -> return opt { optModsFile = arg} )
+ (\arg opt -> return opt { optBiblioFile = arg} )
"FILENAME")
""
+ , Option "" ["biblio-format"]
+ (ReqArg
+ (\arg opt -> return opt { optBiblioFormat = arg} )
+ "STRING")
+ ""
, Option "" ["csl"]
(ReqArg
(\arg opt -> return opt { optCslFile = arg} )
@@ -513,7 +520,8 @@ main = do
, optWrapText = wrap
, optSanitizeHTML = sanitize
#ifdef _CITEPROC
- , optModsFile = modsFile
+ , optBiblioFile = biblioFile
+ , optBiblioFormat = biblioFormat
, optCslFile = cslFile
#endif
} = opts
@@ -566,7 +574,7 @@ main = do
let standalone' = (standalone && not strict) || isNonTextOutput writerName'
#ifdef _CITEPROC
- refs <- if null modsFile then return [] else readModsColletionFile modsFile
+ refs <- if null biblioFile then return [] else readBiblioFile biblioFile biblioFormat
#endif
let startParserState =