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
36cc157c
Commit
36cc157c
authored
Jul 22, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] Gargantext.Core.Mail
parent
82c5b42e
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
56 additions
and
23 deletions
+56
-23
gargantext.ini_toModify
gargantext.ini_toModify
+11
-1
package.yaml
package.yaml
+5
-0
Annuaire.hs
src/Gargantext/API/Node/Corpus/Annuaire.hs
+0
-19
Mail.hs
src/Gargantext/Core/Mail.hs
+37
-0
Learn.hs
src/Gargantext/Database/Action/Learn.hs
+2
-2
stack.yaml
stack.yaml
+1
-1
No files found.
gargantext.ini_toModify
View file @
36cc157c
...
...
@@ -4,9 +4,18 @@ MASTER_USER = gargantua
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = PASSWORD_TO_CHANGE
# Frames
FRAME_WRITE_URL = URL_TO_CHANGE
FRAME_CALC_URL = URL_TO_CHANGE
[network]
# Emails From address (sent by smtp)
MAIL = username@gargantext.org
HOST = localhost
# if remote smtp host
# HOST_USER = user
# HOST_password = password
[database]
# PostgreSQL access
DB_HOST = 127.0.0.1
...
...
@@ -14,7 +23,8 @@ DB_PORT = 5432
DB_NAME = gargandbV5
DB_USER = gargantua
DB_PASS = PASSWORD_TO_CHANGE
# Logs
[logs]
LOG_FILE = /var/log/gargantext/backend.log
LOG_LEVEL = DEBUG
LOG_FORMATTER = verbose
package.yaml
View file @
36cc157c
...
...
@@ -208,6 +208,11 @@ library:
-
servant-xml
-
simple-reflect
-
singletons
# (IGraph)
# for mail
-
smtp-mail
-
mime-mail
-
split
-
stemmer
-
string-conversions
...
...
src/Gargantext/API/Node/Corpus/Annuaire.hs
View file @
36cc157c
...
...
@@ -74,30 +74,11 @@ addToAnnuaireWithForm _cid (AnnuaireWithForm ft _d _l) logStatus = do
printDebug
"ft"
ft
-- let
-- parse = case ft of
-- CSV_HAL -> Parser.parseFormat Parser.CsvHal
-- CSV -> Parser.parseFormat Parser.CsvGargV3
-- WOS -> Parser.parseFormat Parser.WOS
-- PresseRIS -> Parser.parseFormat Parser.RisPresse
-- docs <- liftBase
-- $ splitEvery 500
-- <$> take 1000000
-- <$> parse (cs d)
logStatus
JobLog
{
_scst_succeeded
=
Just
1
,
_scst_failed
=
Just
0
,
_scst_remaining
=
Just
1
,
_scst_events
=
Just
[]
}
-- cid' <- flowCorpus "user1"
-- (Right [cid])
-- (Multi $ fromMaybe EN l)
-- (map (map toHyperdataDocument) docs)
-- printDebug "cid'" cid'
pure
JobLog
{
_scst_succeeded
=
Just
2
,
_scst_failed
=
Just
0
,
_scst_remaining
=
Just
0
...
...
src/Gargantext/Core/Mail.hs
0 → 100644
View file @
36cc157c
{-|
Module : Gargantext.Core.Mail
Description :
Copyright : (c) CNRS, 2017-Present
License : AGPL + CECILL v3
Maintainer : team@gargantext.org
Stability : experimental
Portability : POSIX
-}
{-# LANGUAGE OverloadedStrings #-}
module
Gargantext.Core.Mail
(
gargMail
)
where
import
Data.Maybe
import
Network.Mail.SMTP
hiding
(
htmlPart
)
import
Gargantext.Prelude
import
Network.Mail.Mime
(
plainPart
)
-- | TODO add parameters
gargMail
::
IO
()
gargMail
=
sendMail
"localhost"
mail
where
mail
=
simpleMail
from
to
cc
bcc
subject
[
body
]
from
=
Address
(
Just
"François Rabelais"
)
"francois.rabelais@gargantext.org"
to
=
[
Address
(
Just
"Anoe"
)
"alexandre@localhost"
]
cc
=
[]
bcc
=
[]
subject
=
"email subject"
body
=
plainPart
"email body"
src/Gargantext/Database/Action/Learn.hs
View file @
36cc157c
...
...
@@ -34,9 +34,9 @@ data FavOrTrash = IsFav | IsTrash
moreLike
::
CorpusId
->
Maybe
Offset
->
Maybe
Limit
->
Maybe
OrderBy
->
FavOrTrash
->
Cmd
err
[
FacetDoc
]
moreLike
cId
o
l
order
ft
=
do
moreLike
cId
o
_
l
order
ft
=
do
priors
<-
getPriors
ft
cId
moreLikeWith
cId
o
l
order
ft
priors
moreLikeWith
cId
o
(
Just
3
)
order
ft
priors
---------------------------------------------------------------------------
getPriors
::
FavOrTrash
->
CorpusId
->
Cmd
err
(
Events
Bool
)
...
...
stack.yaml
View file @
36cc157c
...
...
@@ -85,5 +85,5 @@ extra-deps:
-
ghc-byteorder-4.11.0.0.10@sha256:5ee4a907279bfec27b0f9de7b8fba4cecfd34395a0235a7784494de70ad4e98f,1535
# Matrix Computation
-
accelerate-1.2.0.1
-
smtp-mail-0.2.0.0@sha256:b91c81f6dbb41a9ceee8c443385118684ecec55006b77f7d3c0e49cffd2468cf,1211
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