parent 1faa92c1
......@@ -38,3 +38,14 @@ main = do
https://api.istex.fr/document/?output=author,title,abstract,publicationDate,refBibs&scroll=1m&q=coffee
FatalError {fatalErrorMessage = "ConnectionError (HttpExceptionRequest Request {\n host = \"api.istex.fr\"\n port = 443\n secure = True\n requestHeaders = [(\"Accept\",\"application/json;charset=utf-8,application/json\")]\n path = \"document\"\n queryString = \"?output=author,title,abstract,publicationDate,refBibs&scroll=1m&q=coffee\"\n method = \"GET\"\n proxy = Nothing\n rawBody = False\n redirectCount = 10\n responseTimeout = ResponseTimeoutDefault\n requestVersion = HTTP/1.1\n}\n ConnectionTimeout)"}
## Nix
You can easily compile the whole project with nix flakes:
```shell
nix run
```
or if you want a development shell:
```shell
nix -L develop
```
......@@ -7,7 +7,7 @@ main :: IO ()
main = do
res <- getMetadataWith "artificial intelligence" (Just 10)
case res of
(Left err) -> print "Error"
(Left err) -> print $ "Error: " <> show err
(Right val) -> do
print $ take 5 $ _documents_hits val
-- print $ _abstract <$> (_hits val)
name: crawlerISTEX
version: 0.1.0.0
github: "garganscript/crawlerISTEX"
license: AGPL
author: "GarganText"
maintainer: "support@gargantext.org"
copyright: "CNRS"
extra-source-files:
- README.md
- ChangeLog.md
# Metadata used when publishing your package
# synopsis: Short description of your package
# category: Web
# To avoid duplicated efforts in documentation and dealing with the
# complications of embedding Haddock markup inside cabal files, it is
# common to point users to the README.md file.
description: Please see the README on GitHub at <https://github.com/Mudada/crawlerISTEX#readme>
dependencies:
- aeson
- base >= 4.7 && < 5
- ghc # Panic
- text
- lens
- servant
- servant-client
- http-client
- http-client-tls
default-extensions:
- DataKinds
- DeriveGeneric
- NamedFieldPuns
- OverloadedStrings
- RecordWildCards
- TypeOperators
library:
source-dirs: src
executables:
crawlerISTEX-exe:
main: Main.hs
source-dirs: app
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- crawlerISTEX
tests:
crawlerISTEX-test:
main: Spec.hs
source-dirs: test
ghc-options:
- -threaded
- -rtsopts
- -with-rtsopts=-N
dependencies:
- crawlerISTEX
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment