Commit 1e948a14 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[BIN] psql fun with gargantext ini file

parent 818c1cad
#!/bin/bash
psql postgresql://gargantua:C8kdcUrAQy66U12341@localhost/gargandbV5
if [[ $1 == "" ]]
then echo "USAGE : ./psql gargantext.ini"
fi
getter () {
grep $2 $1 | sed "s/^.*= //"
}
USER=$(getter $1 "DB_USER")
NAME=$(getter $1 "DB_NAME")
PASS=$(getter $1 "DB_PASS")
HOST=$(getter $1 "DB_HOST")
PORT=$(getter $1 "DB_PORT")
psql "postgresql://${USER}:${PASS}@${HOST}:${PORT}/${NAME}"
......@@ -110,7 +110,7 @@ filterByNeighbours threshold distanceMap = filteredMap
$ Map.filter (> 0)
$ Map.filterWithKey (\(from,_) _ -> idx == from) distanceMap
in List.take (round threshold) selected
) indexes
) indexes
doDistanceMap :: Distance
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment