Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arxiv-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
gargantext
crawlers
arxiv-api
Commits
91bce820
Commit
91bce820
authored
Feb 09, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[TYPES] adding ArxivDocument type
parent
260dc8be
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
15 deletions
+36
-15
arxiv-api.cabal
arxiv-api.cabal
+11
-8
package.yaml
package.yaml
+7
-6
Lib.hs
src/Lib.hs
+18
-1
No files found.
arxiv-api.cabal
View file @
91bce820
...
...
@@ -4,17 +4,17 @@ cabal-version: 1.12
--
-- see: https://github.com/sol/hpack
--
-- hash:
9b54afba258889accc35eff3ef449f2a043a780cfc51c974c3e2b0c7768d3bb8
-- hash:
4117de9e11172de2f2e05b5376a7917e5f32b501a9e1d8834ce2c0ff93e586d3
name: arxiv-api
version: 0.1.0.0
description: Please see the README on GitHub at <https://github.com/githubuser/arxiv#readme>
homepage: https://github.com/
githubuser/arxiv
#readme
bug-reports: https://github.com/
githubuser/arxiv
/issues
author: A
uthor name here
maintainer:
example@example.com
copyright: 2021
Author name here
license:
BSD
3
homepage: https://github.com/#readme
bug-reports: https://github.com//issues
author: A
lexandre Delanoë
maintainer:
alexandre+dev@delanoe.org
copyright: 2021
CNRS/A. Delanoë
license:
GPLv
3
license-file: LICENSE
build-type: Simple
extra-source-files:
...
...
@@ -23,7 +23,7 @@ extra-source-files:
source-repository head
type: git
location: https://github.com/
githubuser/arxiv
location: https://github.com/
library
exposed-modules:
...
...
@@ -43,6 +43,7 @@ library
, network
, resourcet
, tagsoup
, text
default-language: Haskell2010
executable arxiv-exe
...
...
@@ -63,6 +64,7 @@ executable arxiv-exe
, network
, resourcet
, tagsoup
, text
default-language: Haskell2010
test-suite arxiv-test
...
...
@@ -84,4 +86,5 @@ test-suite arxiv-test
, network
, resourcet
, tagsoup
, text
default-language: Haskell2010
package.yaml
View file @
91bce820
...
...
@@ -23,16 +23,17 @@ extra-source-files:
description
:
Please see the README on GitHub at <https://github.com/githubuser/arxiv#readme>
dependencies
:
-
base >= 4.7 && < 5
-
arxiv
-
network
-
http-conduit
-
tagsoup
-
base >= 4.7 && < 5
-
bytestring
-
conduit
-
http-conduit
-
http-types
-
mtl
-
network
-
resourcet
-
http-types
-
bytestring
-
tagsoup
-
text
library
:
source-dirs
:
src
...
...
src/Lib.hs
View file @
91bce820
module
Lib
where
import
Data.Text
(
Text
)
import
qualified
Network.Api.Arxiv
as
Ax
import
Network.Api.Arxiv
(
Expression
(
..
),
Field
(
..
),
(
/*/
),
(
/+/
))
...
...
@@ -19,6 +20,21 @@ import Control.Monad.Trans (liftIO)
import
Control.Monad.Trans.Resource
(
MonadResource
)
import
Control.Applicative
((
<$>
))
data
ArxivDocument
=
ArxivDocument
{
title
::
Text
,
date_update
::
Text
,
date_published
::
Text
,
date_year
::
Text
,
summary
::
Text
,
comment
::
Text
,
journal
::
Text
,
doi
::
Text
-- , links :: [Link]
,
pdfLink
::
Maybe
Text
}
search
::
IO
()
search
=
withSocketsDo
(
execQuery
makeQuery
)
...
...
@@ -28,8 +44,9 @@ makeQuery =
t1
=
Exp
$
Ti
[
"quantum"
]
t2
=
Exp
$
Ti
[
"complexity"
]
x
=
au
/*/
(
t1
/+/
t2
)
x'
=
Exp
(
Abs
[
"clustering"
])
/*/
Exp
(
Abs
[
"louvain"
])
in
Ax
.
Query
{
Ax
.
qExp
=
Just
x
,
Ax
.
qExp
=
Just
x
'
,
Ax
.
qIds
=
[]
,
Ax
.
qStart
=
0
,
Ax
.
qItems
=
25
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment