-- 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:
--   <a>http://sourceforge.net/p/bibutils/home/Bibutils/</a>.
--   
--   The package release number refers to the release number of the
--   included bibutils library.
@package hs-bibutils
@version 6.10.0.0


-- | Here is a simple program using hs-bibutils to conver a MODS collection
--   into a bibtex file, sending the output to stdout:
--   
--   <pre>
--   import Text.Bibutils
--   
--   main :: IO ()
--   main = do
--     bibl  &lt;- bibl_init
--     param &lt;- 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
--   </pre>
module Text.Bibutils

-- | A type for storing the C struct with the bibliography data. Mostly
--   opaque to the Haskell side. See <a>numberOfRefs</a> 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 <a>setCharsetIn</a>, 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 <a>Bibl</a> C struct. Usually the first function being
--   called.
bibl_init :: IO (ForeignPtr Bibl)

-- | Initialize the <a>Param</a> 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 <a>Param</a> C structure, a <a>Bibl</a> C structure, the path
--   to the input file (<tt>"-"</tt> for the standard input), read the
--   file, storing the data in the <a>Bibl</a> struct, and report a
--   <a>Status</a>.
bibl_read :: ForeignPtr Param -> ForeignPtr Bibl -> FilePath -> IO Status

-- | Given a <a>Param</a> C structure, a <a>Bibl</a> C structure, the path
--   to an output file (<tt>"-"</tt> for the standard output), write the
--   file returning a <a>Status</a>.
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 <a>Bibl</a> C struct.
bibl_free :: ForeignPtr Bibl -> IO ()

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

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

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

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

-- | Set the input charset. Default is Latin-1 (ISO8859-1). See
--   <a>Charset</a>.
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 ()

-- | Set the output charset.
setOutputRawOpts :: ForeignPtr Param -> [Raw] -> IO ()

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

-- | Verbose output.
setVerboseLevel :: ForeignPtr Param -> Int -> 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
ebi_in :: BiblioIn
word_in :: BiblioIn
nbib_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
nbib_out :: BiblioOut
data FormatOpt
bibout_finalcomma :: FormatOpt
bibout_singledash :: FormatOpt
bibout_whitespace :: FormatOpt
bibout_brackets :: FormatOpt
bibout_uppercase :: FormatOpt
bibout_strictkey :: FormatOpt
bibout_shorttitle :: FormatOpt
bibout_dropkey :: FormatOpt
modsout_dropkey :: FormatOpt
data Charset
bibl_charset_unknown :: Charset
bibl_charset_unicode :: Charset
bibl_charset_gb18030 :: Charset
bibl_charset_default :: Charset
bibl_charset_utf8_default :: Charset
bibl_charset_bom_default :: Charset
data Status
bibl_ok :: Status
bibl_err_badinput :: Status
bibl_err_memerr :: Status
bibl_err_cantopen :: Status
data Raw
bibl_raw_with_charset_convert :: Raw
bibl_raw_with_make_ref_id :: Raw
instance GHC.Classes.Eq Text.Bibutils.BiblioIn
instance GHC.Classes.Eq Text.Bibutils.BiblioOut
instance GHC.Classes.Eq Text.Bibutils.Charset
instance GHC.Classes.Eq Text.Bibutils.Raw
instance GHC.Classes.Eq Text.Bibutils.Status
instance GHC.Internal.Show.Show Text.Bibutils.Param
instance GHC.Internal.Show.Show Text.Bibutils.Raw
instance GHC.Internal.Show.Show Text.Bibutils.Status
instance GHC.Internal.Foreign.Storable.Storable Text.Bibutils.Bibl
instance GHC.Internal.Foreign.Storable.Storable Text.Bibutils.Param
