doi-0.0.2: Automatic Bibtex and fulltext of scientific articles

Safe HaskellNone
LanguageHaskell2010

DOI

Contents

Synopsis

hard coded global config (bad)

dst :: [Char] Source #

destination folder

pdfSubDir :: [Char] Source #

subdirectory for PDFs

bibFile :: FilePath Source #

BibTeX entries are appended to this file

bibsonomyUrl :: [Char] Source #

Url of the bibsonomy scraper (e.g. their public version of self hosted)

Self hosted: needs to be installed in ROOT app (tested on tomcat8)

  cd /tmp && wget http://dev.bibsonomy.org/maven2/org/bibsonomy/bibsonomy-scrapingservice/3.3.0/bibsonomy-scrapingservice-3.3.0.war && sudo mv bibsonomy-scrapingservice-3.3.0.war /var/lib/tomcat8/webapps/ROOT.war

The types and the program

data Options Source #

Constructors

Options 

Instances

main :: IO () Source #

parseOrError :: SourceName -> Parsec [Char] () c -> [Char] -> c Source #

action :: Options -> IO () Source #

first arg: doi or url second arg: filename for preexisting file (which will be moved to doi location) or value for the file field

merge :: [T] -> T Source #

normalizeDoi :: ([Char], [Char]) -> ([Char], [Char]) Source #

getFile Source #

Arguments

:: String

DOI

-> Maybe String

Existing File if available

-> IO (Maybe FilePath) 

doiUrl :: [Char] -> [Char] Source #

pErr :: HPrintfType r => [Char] -> r Source #

mPdf :: RegexContext Regex source1 String => source1 -> Maybe String Source #

downloadBibTeX :: PrintfArg t => t -> ([Char], t -> IO [Char]) -> IO (Maybe T) Source #

get Location header doi2url url = either (error.show) f $ simpleHTTP (getRequest url) where f = fromMaybe (error $ "No Location Header in "++ url ) . findHeader HdrLocation

sr Source #

Arguments

:: String

regex

-> String

replacement

-> String

input

-> String 

substitute regex