]> Git — Sourcephile - gargantext.git/blob - bin/gargantext-admin/Main.hs
[DOC] Defaut hyperdata position
[gargantext.git] / bin / gargantext-admin / Main.hs
1 {-|
2 Module : Main.hs
3 Description : Gargantext Admin tools
4 Copyright : (c) CNRS, 2017-Present
5 License : AGPL + CECILL v3
6 Maintainer : team@gargantext.org
7 Stability : experimental
8 Portability : POSIX
9
10
11
12 -}
13
14 {-# LANGUAGE Strict #-}
15
16 module Main where
17
18 import Gargantext.API.Dev (withDevEnv, runCmdDev)
19 import Gargantext.API.Prelude (GargError)
20 import Gargantext.Database.Action.User.New (newUsers)
21 import Gargantext.Database.Prelude (Cmd'')
22 import Gargantext.Prelude
23 import System.Environment (getArgs)
24 import Gargantext.API.Admin.EnvTypes (DevEnv)
25
26 main :: IO ()
27 main = do
28 (iniPath:mails) <- getArgs
29
30 withDevEnv iniPath $ \env -> do
31 x <- runCmdDev env ((newUsers $ map cs mails) :: Cmd'' DevEnv GargError Int64)
32 putStrLn $ show x
33 pure ()