Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pubmed
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
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
pubmed
Commits
7adf6bd4
Verified
Commit
7adf6bd4
authored
Jun 28, 2023
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[license] fix licensing for the project
parent
234ad423
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
1298 additions
and
35 deletions
+1298
-35
LICENSE
LICENSE
+1236
-30
crawlerPubMed.cabal
crawlerPubMed.cabal
+6
-2
package.yaml
package.yaml
+1
-1
PUBMED.hs
src/PUBMED.hs
+13
-2
Client.hs
src/PUBMED/Client.hs
+11
-0
Parser.hs
src/PUBMED/Parser.hs
+11
-0
ServantClientLogging.hs
src/PUBMED/ServantClientLogging.hs
+9
-0
Types.hs
src/PUBMED/Types.hs
+11
-0
No files found.
LICENSE
View file @
7adf6bd4
This diff is collapsed.
Click to expand it.
crawlerPubMed.cabal
View file @
7adf6bd4
cabal-version:
1.1
2
cabal-version:
2.
2
-- This file has been generated from package.yaml by hpack version 0.35.2.
--
...
...
@@ -12,7 +12,7 @@ bug-reports: https://github.com/gitlab/crawlerPubMed/issues
author: CNRS Gargantext
maintainer: contact@gargantext.org
copyright: 2019 CNRS/IMT
license:
BSD3
license:
AGPL-3.0-or-later
license-file: LICENSE
build-type: Simple
extra-source-files:
...
...
@@ -32,6 +32,8 @@ library
PUBMED.Types
other-modules:
Paths_crawlerPubMed
autogen-modules:
Paths_crawlerPubMed
hs-source-dirs:
src
default-extensions:
...
...
@@ -108,6 +110,8 @@ test-suite crawlerPubMed-test
main-is: Spec.hs
other-modules:
Paths_crawlerPubMed
autogen-modules:
Paths_crawlerPubMed
hs-source-dirs:
test
default-extensions:
...
...
package.yaml
View file @
7adf6bd4
name
:
crawlerPubMed
version
:
0.1.0.0
github
:
"
gitlab/crawlerPubMed"
license
:
BSD3
license
:
AGPL-3.0-or-later
author
:
"
CNRS
Gargantext"
maintainer
:
"
contact@gargantext.org"
copyright
:
"
2019
CNRS/IMT"
...
...
src/PUBMED.hs
View file @
7adf6bd4
{-|
Module : PUBMED
Description : PubMed API integration
Copyright : (c) CNRS, 2019
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
module
PUBMED
where
import
Conduit
...
...
@@ -71,10 +82,10 @@ getMetadataWithC = do
getPage
::
Offset
->
Env
[
PubMed
]
getPage
pageNum
=
do
(
Config
{
perPage
=
mPerPage
,
query
})
<-
ask
(
Config
{
apiKey
,
perPage
=
mPerPage
,
query
})
<-
ask
let
perPage
=
fromMaybe
defaultPerPage
mPerPage
let
offset
=
fromIntegral
$
pageNum
*
perPage
liftIO
$
print
$
"[getPage] getting page "
<>
show
pageNum
<>
", offset: "
<>
show
offset
<>
", perPage: "
<>
show
perPage
<>
", query: "
<>
T
.
unpack
query
liftIO
$
print
$
"[getPage] getting page "
<>
show
pageNum
<>
", offset: "
<>
show
offset
<>
", perPage: "
<>
show
perPage
<>
", query: "
<>
T
.
unpack
query
<>
", apiKey: "
<>
show
apiKey
eDocs
<-
runSimpleFindPubmedAbstractRequest
(
Just
offset
)
case
eDocs
of
Left
err
->
panic
$
"[getPage] error: "
<>
show
err
...
...
src/PUBMED/Client.hs
View file @
7adf6bd4
{-|
Module : PUBMED.Client
Description : PubMed API integration
Copyright : (c) CNRS, 20198
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
module
PUBMED.Client
where
import
Data.ByteString.Lazy
(
ByteString
)
...
...
src/PUBMED/Parser.hs
View file @
7adf6bd4
{-# LANGUAGE LambdaCase #-}
{-|
Module : PUBMED.Parser
Description : PubMed API integration
Copyright : (c) CNRS, 20198
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
module
PUBMED.Parser
where
import
Control.Lens
((
^?
),
(
^.
),
(
^..
),
only
,
to
,
ix
,
prism'
,
Prism
'
,
Traversal
'
)
...
...
src/PUBMED/ServantClientLogging.hs
View file @
7adf6bd4
{-|
Module : PUBMED.ServantClientLogging
Description : PubMed API integration
Copyright : (c) CNRS, 20198
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
module
PUBMED.ServantClientLogging
where
import
qualified
Data.Binary.Builder
as
DBB
...
...
src/PUBMED/Types.hs
View file @
7adf6bd4
{-|
Module : PUBMED.Types
Description : PubMed API integration
Copyright : (c) CNRS, 20198
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
module
PUBMED.Types
where
import
Control.Monad.Reader
(
ReaderT
)
...
...
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