|
Text.Bibutils | Portability | portable | Stability | provisional | Maintainer | andrea.rossato@unitn.it |
|
|
|
|
|
Description |
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
|
|
Synopsis |
|
|
|
|
Basic Functions
|
|
|
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.
| Instances | |
|
|
|
A type for storing the Param C struct. It should be accessed with
the functions provided, such as setCharsetIn, etc.
| Constructors | | Instances | |
|
|
|
Initialize the Bibl C struct. Usually the first function being
called.
|
|
|
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.
|
|
|
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.
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
Free the Bibl C struct.
|
|
|
Free the Param C struct.
|
|
|
|
Auxiliary Functions
|
|
|
Retrieve the number of references from a Bibl C struct.
|
|
|
|
Functions for Setting Parameters
|
|
|
Set fields of the Param C struct directly.
|
|
|
Set output format specific options. See FormatOpt.
|
|
|
Set the input charset. Default is Latin-1 (ISO8859-1). See
Charset.
|
|
|
Set the output charset.
|
|
|
Write utf8 byte-order-mark.
|
|
|
|
|
Do not split titles.
|
|
|
Split titles.
|
|
|
Write Latex codes.
|
|
|
|
|
Write characters in XML entities.
|
|
|
|
|
Add reference count to reference id.
|
|
|
|
|
Output a single reference for each file.
|
|
|
|
|
Verbose output.
|
|
|
Suppress verbose output.
|
|
Input Formats
|
|
|
Instances | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Output Formats
|
|
|
Instances | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Options for Specific Output Formats
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Charsets
|
|
|
Instances | |
|
|
|
|
|
|
|
|
|
|
Return Status
|
|
|
Instances | |
|
|
|
|
|
|
|
|
|
|
Produced by Haddock version 2.4.2 |