-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/

-- | Haskell bindings to bibutils, the bibliography
--   conversion utilities.
--   
--   Haskell bindings to Chris Putnam's bibutils, a library that
--   interconverts between various bibliography formats using a common
--   MODS-format XML intermediate.
--   
--   hs-bibutils is available under the GNU GPL license. See the LICENSE
--   file for details.
--   
--   For more details about bibutils, please check:
--   http://sourceforge.net/p/bibutils/home/Bibutils/.
--   
--   The original API documentation is available here:
--   http://www.scripps.edu/~cdputnam/software/bibutils/library_specs.html.
--   
--   The package release number refers to the release number of the
--   included bibutils library.
@package hs-bibutils
@version 5.5

-- | Here is a simple program using hs-bibutils to conver a MODS collection
--   into a bibtex file, sending the output to stdout:
--   
--   
--   import Text.Bibutils
--   
--   main :: IO ()
--   main = do
--     bibl  <- bibl_init
--     param <- bibl_initparams mods_in bibtex_out "mods2bibtex"
--     setFormatOpts param [bibout_brackets, bibout_uppercase]
--     setBOM        param
--     setVerbose    param
--     bibl_read     param bibl "/path/to/bibtex.bib"
--     bibl_write    param bibl "-"
--     bibl_free       bibl
--     bibl_freeparams param
--   
module Text.Bibutils

-- | A type for storing the C struct with the bibliography data. Mostly
--   opaque to the Haskell side. See numberOfRefs to retrieve the
--   number of references stored in the struct.
data Bibl

-- | A type for storing the Param C struct. It should be accessed with the
--   functions provided, such as setCharsetIn, etc.
data Param
Param :: CInt -> CInt -> CInt -> CUChar -> CUChar -> CUChar -> CUChar -> CUChar -> CInt -> CUChar -> CUChar -> CUChar -> CUChar -> CUChar -> CInt -> CInt -> CUChar -> CUChar -> CUChar -> Param
[redaformat] :: Param -> CInt
[writeformat] :: Param -> CInt
[charsetin] :: Param -> CInt
[charsetin_src] :: Param -> CUChar
[latexin] :: Param -> CUChar
[utf8in] :: Param -> CUChar
[xmlin] :: Param -> CUChar
[nosplittitle] :: Param -> CUChar
[charsetout] :: Param -> CInt
[charsetout_src] :: Param -> CUChar
[latexout] :: Param -> CUChar
[utf8out] :: Param -> CUChar
[utf8bom] :: Param -> CUChar
[xmlout] :: Param -> CUChar
[format_opts] :: Param -> CInt
[addcount] :: Param -> CInt
[output_raw] :: Param -> CUChar
[verbose] :: Param -> CUChar
[singlerefperfile] :: Param -> CUChar

-- | Initialize the Bibl C struct. Usually the first function being
--   called.
bibl_init :: IO (ForeignPtr Bibl)

-- | Initialize the Param C struct, given the input bibliographic
--   format, the output bibliographic format, and the program name to be
--   used for displaying debugging information.
bibl_initparams :: BiblioIn -> BiblioOut -> String -> IO (ForeignPtr Param)

-- | Given a Param C structure, a Bibl C structure, the path
--   to the input file ("-" for the standard input), read the
--   file, storing the data in the Bibl struct, and report a
--   Status.
bibl_read :: ForeignPtr Param -> ForeignPtr Bibl -> FilePath -> IO Status

-- | Given a Param C structure, a Bibl C structure, the path
--   to an output file ("-" for the standard output), write the
--   file returning a Status.
bibl_write :: ForeignPtr Param -> ForeignPtr Bibl -> FilePath -> IO Status
bibl_readasis :: ForeignPtr Param -> FilePath -> IO ()
bibl_addtoasis :: ForeignPtr Param -> String -> IO ()
bibl_readcorps :: ForeignPtr Param -> FilePath -> IO ()
bibl_addtocorps :: ForeignPtr Param -> String -> IO ()

-- | Free the Bibl C struct.
bibl_free :: ForeignPtr Bibl -> IO ()

-- | Free the Param C struct.
bibl_freeparams :: ForeignPtr Param -> IO ()
bibl_reporterr :: Status -> IO ()

-- | Retrieve the number of references from a Bibl C struct.
numberOfRefs :: ForeignPtr Bibl -> IO Int
status :: Status -> CInt

-- | Set fields of the Param C struct directly.
setParam :: ForeignPtr Param -> (Param -> Param) -> IO ()

-- | Set output format specific options. See FormatOpt.
setFormatOpts :: ForeignPtr Param -> [FormatOpt] -> IO ()

-- | Set the input charset. Default is Latin-1 (ISO8859-1). See
--   Charset.
setCharsetIn :: ForeignPtr Param -> Charset -> IO ()

-- | Set the output charset.
setCharsetOut :: ForeignPtr Param -> Charset -> IO ()

-- | Write utf8 byte-order-mark.
setBOM :: ForeignPtr Param -> IO ()
unsetBOM :: ForeignPtr Param -> IO ()

-- | Do not split titles.
setNoSplitTitle :: ForeignPtr Param -> IO ()

-- | Split titles.
unsetNoSplitTitle :: ForeignPtr Param -> IO ()

-- | Write Latex codes.
setLatexOut :: ForeignPtr Param -> IO ()
unsetLatexOut :: ForeignPtr Param -> IO ()

-- | Write characters in XML entities.
setXmlOut :: ForeignPtr Param -> IO ()
unsetXmlOut :: ForeignPtr Param -> IO ()

-- | Add reference count to reference id.
setAddcount :: ForeignPtr Param -> IO ()
unsetAddcount :: ForeignPtr Param -> IO ()

-- | Output a single reference for each file.
setSinglerefperfile :: ForeignPtr Param -> IO ()
unsetSinglerefperfile :: ForeignPtr Param -> IO ()

-- | Verbose output.
setVerbose :: ForeignPtr Param -> IO ()

-- | Suppress verbose output.
unsetVerbose :: ForeignPtr Param -> IO ()
data BiblioIn
mods_in :: BiblioIn
bibtex_in :: BiblioIn
ris_in :: BiblioIn
endnote_in :: BiblioIn
copac_in :: BiblioIn
isi_in :: BiblioIn
medline_in :: BiblioIn
biblatex_in :: BiblioIn
endnotexml_in :: BiblioIn
data BiblioOut
mods_out :: BiblioOut
bibtex_out :: BiblioOut
ris_out :: BiblioOut
endnote_out :: BiblioOut
isi_out :: BiblioOut
word2007_out :: BiblioOut
adsab_out :: BiblioOut
data FormatOpt
bibout_finalcomma :: FormatOpt
bibout_singledash :: FormatOpt
bibout_whitespace :: FormatOpt
bibout_brackets :: FormatOpt
bibout_uppercase :: FormatOpt
bibout_strictkey :: FormatOpt
modsout_dropkey :: FormatOpt
wordout_dropkey :: FormatOpt
data Charset
bibl_charset_unknown :: Charset
bibl_charset_unicode :: Charset
bibl_charset_gb18030 :: Charset
bibl_charset_default :: Charset
data Status
bibl_ok :: Status
bibl_err_badinput :: Status
bibl_err_memerr :: Status
bibl_err_cantopen :: Status
instance GHC.Classes.Eq Text.Bibutils.Charset
instance GHC.Show.Show Text.Bibutils.Status
instance GHC.Classes.Eq Text.Bibutils.Status
instance GHC.Classes.Eq Text.Bibutils.BiblioOut
instance GHC.Classes.Eq Text.Bibutils.BiblioIn
instance GHC.Show.Show Text.Bibutils.Param
instance Foreign.Storable.Storable Text.Bibutils.Bibl
instance Foreign.Storable.Storable Text.Bibutils.Param
