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
10
Merge Requests
10
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
72a457c5
Commit
72a457c5
authored
May 28, 2024
by
Loïc Chapron
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve export (tab and quote)
parent
ca1aa195
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
Export.hs
src/Gargantext/API/Node/Document/Export.hs
+2
-2
No files found.
src/Gargantext/API/Node/Document/Export.hs
View file @
72a457c5
...
...
@@ -13,7 +13,7 @@ module Gargantext.API.Node.Document.Export
import
Control.Lens
(
view
)
import
Data.ByteString.Lazy.Char8
qualified
as
BSC
import
Data.Csv
(
encodeDefaultOrderedByName
)
import
Data.Csv
(
encodeDefaultOrderedByName
With
,
defaultEncodeOptions
,
encDelimiter
,
encQuoting
,
Quoting
(
..
)
)
import
Data.Text
qualified
as
T
import
Data.Text.Encoding
qualified
as
TE
import
Data.Time.Clock.System
(
getSystemTime
,
systemSeconds
)
...
...
@@ -100,7 +100,7 @@ getDocumentsCSV :: NodeId
getDocumentsCSV
userNodeId
pId
=
do
dJSON
<-
getDocumentsJSON
userNodeId
pId
let
DocumentExport
{
_de_documents
}
=
getResponse
dJSON
let
ret
=
TE
.
decodeUtf8
$
BSC
.
toStrict
$
encodeDefaultOrderedByName
_de_documents
let
ret
=
TE
.
decodeUtf8
$
BSC
.
toStrict
$
encodeDefaultOrderedByName
With
(
defaultEncodeOptions
{
encDelimiter
=
fromIntegral
$
ord
'
\t
'
,
encQuoting
=
QuoteAll
})
_de_documents
pure
$
addHeader
(
T
.
concat
[
"attachment; filename=GarganText_DocsList-"
,
T
.
pack
$
show
pId
...
...
Przemyslaw Kaminski
@cgenie
mentioned in commit
5660aec0
·
Oct 08, 2024
mentioned in commit
5660aec0
mentioned in commit 5660aec07ec5a0a0a5468f440092c1a8f57a864e
Toggle commit list
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