Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
haskell-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
158
Issues
158
List
Board
Labels
Milestones
Merge Requests
11
Merge Requests
11
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
haskell-gargantext
Commits
ed90539a
Commit
ed90539a
authored
Dec 10, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[export] fix listId for corpus export
parent
f837207a
Pipeline
#2256
passed with stage
in 62 minutes and 6 seconds
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
Export.hs
src/Gargantext/API/Node/Corpus/Export.hs
+11
-7
No files found.
src/Gargantext/API/Node/Corpus/Export.hs
View file @
ed90539a
...
...
@@ -56,12 +56,16 @@ getCorpus cId lId nt' = do
Nothing
->
NgramsTerms
Just
t
->
t
listId
<-
case
lId
of
Nothing
->
defaultList
cId
Just
l
->
pure
l
ns
<-
Map
.
fromList
<$>
map
(
\
n
->
(
_node_id
n
,
n
))
<$>
selectDocNodes
cId
repo
<-
getRepo'
[
fromMaybe
(
panic
"[Gargantext.API.Node.Corpus.Export]"
)
l
Id
]
ngs
<-
getNodeNgrams
cId
lId
nt
repo
repo
<-
getRepo'
[
list
Id
]
ngs
<-
getNodeNgrams
cId
l
ist
Id
nt
repo
let
-- uniqId is hash computed already for each document imported in database
r
=
Map
.
intersectionWith
(
\
a
b
->
Document
{
_d_document
=
a
...
...
@@ -77,14 +81,14 @@ getCorpus cId lId nt' = do
getNodeNgrams
::
HasNodeError
err
=>
CorpusId
->
Maybe
ListId
->
ListId
->
NgramsType
->
NodeListStory
->
Cmd
err
(
Map
NodeId
(
Set
NgramsTerm
))
getNodeNgrams
cId
lId
'
nt
repo
=
do
lId
<-
case
lId'
of
Nothing
->
defaultList
cId
Just
l
->
pure
l
getNodeNgrams
cId
lId
nt
repo
=
do
--
lId <- case lId' of
--
Nothing -> defaultList cId
--
Just l -> pure l
lIds
<-
selectNodesWithUsername
NodeList
userMaster
let
ngs
=
filterListWithRoot
MapTerm
$
mapTermListRoot
[
lId
]
nt
repo
...
...
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