Safe Haskell | None |
---|
This modules provides a way to convert document identifiers, such as DOIs, ISBNs, arXiv IDs to bibliographic references.
Each type of identifiers will be converted via internet services
to a bibliographic record of type Reference
, which in
turn can be rendered in various format using citeproc-hs
package
hackage.haskell.org/package/citeproc-hs .
Moreover, the server responses are cached in a local database, making the server load as little as possible.
- resolveEither :: forall m. (MonadIO m, MonadState DB m) => String -> EitherT String m Reference
- resolve :: (MonadIO m, MonadState DB m) => String -> m Reference
Documentation
resolveEither :: forall m. (MonadIO m, MonadState DB m) => String -> EitherT String m ReferenceSource
resolve a document url to a Reference
, or emits a error
message with reason why it fails.
resolve :: (MonadIO m, MonadState DB m) => String -> m ReferenceSource
Resolve a document url to a Reference
. returns an empty reference when someting fails.
prefix the document ID with one of arXiv:, doi:, bibcode: or isbn: .
>>>
do { ref <- resolveDef "arXiv:1204.4779" ; putStrLn $ title ref }
Paraiso: an automated tuning framework for explicit solvers of partial differential equations>>>
do { ref <- resolveDef "doi:10.1088/1749-4699/5/1/015003" ; print $ author ref }
[Takayuki Muranushi]>>>
do { ref <- resolveDef "bibcode:2012CS&D....5a5003M" ; putStrLn $ containerTitle ref }
Computational Science and Discovery>>>
do { ref <- resolveDef "isbn:9784274068850" ; putStrLn $ title ref }
Sugoi hasukeru tanoshiku manabō