Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
haskell-gargantext
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
Przemyslaw Kaminski
haskell-gargantext
Commits
9012f930
Commit
9012f930
authored
Dec 22, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Istex] fix getMetadataScroll call
parent
55ae7b50
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
API.hs
src/Gargantext/Core/Text/Corpus/API.hs
+2
-3
Istex.hs
src/Gargantext/Core/Text/Corpus/API/Istex.hs
+2
-1
Parsers.hs
src/Gargantext/Core/Text/Corpus/Parsers.hs
+5
-5
No files found.
src/Gargantext/Core/Text/Corpus/API.hs
View file @
9012f930
...
...
@@ -15,8 +15,7 @@ module Gargantext.Core.Text.Corpus.API
,
Limit
,
get
,
externalAPIs
)
where
)
where
import
Data.Maybe
import
Gargantext.API.Admin.Orchestrator.Types
(
ExternalAPIs
(
..
),
externalAPIs
)
...
...
@@ -42,7 +41,7 @@ get PubMed _la q _l = PUBMED.get q default_limit -- EN only by default
get
HAL
la
q
_l
=
HAL
.
get
la
q
default_limit
get
IsTex
la
q
_l
=
ISTEX
.
get
la
q
default_limit
get
Isidore
la
q
_l
=
ISIDORE
.
get
la
(
fromIntegral
<$>
default_limit
)
(
Just
q
)
Nothing
get
_
_
_
_
=
undefined
get
_
_
_
_
=
undefined
-- | Some Sugar for the documentation
type
Query
=
PUBMED
.
Query
...
...
src/Gargantext/Core/Text/Corpus/API/Istex.hs
View file @
9012f930
...
...
@@ -33,7 +33,8 @@ get la q ml = do
printDebug
"[Istex.get] calling getMetadataScrollProgress for q"
q
printDebug
"[Istex.get] calling getMetadataScrollProgress for ml"
ml
-- The "scroll" expects "d/h/m/s/ms" time interval. Let's set it to "1 month"
eDocs
<-
ISTEX
.
getMetadataScroll
q
((
\
_n
->
pack
$
"1m"
)
<$>
ml
)
Nothing
0
--(fromIntegral <$> ml)
--eDocs <- ISTEX.getMetadataScroll q ((\_n -> pack $ "1m") <$> ml) Nothing 0 --(fromIntegral <$> ml)
eDocs
<-
ISTEX
.
getMetadataScroll
q
"1m"
Nothing
0
--(fromIntegral <$> ml)
printDebug
"[Istex.get] will print length"
(
0
::
Int
)
case
eDocs
of
Left
_
->
pure
()
...
...
src/Gargantext/Core/Text/Corpus/Parsers.hs
View file @
9012f930
...
...
@@ -78,23 +78,23 @@ data FileFormat = WOS | RIS | RisPresse
-- | XML -- Not Implemented / see :
parseFormat
::
FileFormat
->
DB
.
ByteString
->
Either
Prelude
.
String
[
HyperdataDocument
]
parseFormat
CsvGargV3
bs
=
parseCsv'
$
DBL
.
fromStrict
bs
parseFormat
CsvHal
bs
=
parseHal'
$
DBL
.
fromStrict
bs
parseFormat
::
FileFormat
->
DB
.
ByteString
->
IO
(
Either
Prelude
.
String
[
HyperdataDocument
])
parseFormat
CsvGargV3
bs
=
p
ure
$
p
arseCsv'
$
DBL
.
fromStrict
bs
parseFormat
CsvHal
bs
=
p
ure
$
p
arseHal'
$
DBL
.
fromStrict
bs
parseFormat
RisPresse
bs
=
do
let
docs
=
map
(
toDoc
RIS
)
<$>
snd
<$>
enrichWith
RisPresse
$
partitionEithers
$
[
runParser'
RisPresse
bs
]
Right
docs
pure
$
Right
docs
parseFormat
WOS
bs
=
do
let
docs
=
map
(
toDoc
WOS
)
<$>
snd
<$>
enrichWith
WOS
$
partitionEithers
$
[
runParser'
WOS
bs
]
Right
docs
pure
$
Right
docs
parseFormat
ZIP
bs
=
do
path
<-
emptySystemTempFile
"parsed-zip"
DB
.
writeFile
path
bs
...
...
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