Commit 3b813f8a authored by Alexandre Delanoë's avatar Alexandre Delanoë

[FIX] removing hard path in code.

parent 775c1232
...@@ -203,3 +203,6 @@ USE_I18N = True ...@@ -203,3 +203,6 @@ USE_I18N = True
USE_L10N = True USE_L10N = True
USE_TZ = True USE_TZ = True
# BOOL Interpreter
BOOL_TOOLS_PATH="/srv/gargantext/gargantext/util/crawlers/sparql"
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import subprocess import subprocess
import re import re
from .sparql import Service from .sparql import Service
from gargantext.settings import BOOL_TOOLS_PATH
#from sparql import Service #from sparql import Service
def bool2sparql(rawQuery, count=False, offset=None, limit=None): def bool2sparql(rawQuery, count=False, offset=None, limit=None):
...@@ -12,7 +13,7 @@ def bool2sparql(rawQuery, count=False, offset=None, limit=None): ...@@ -12,7 +13,7 @@ def bool2sparql(rawQuery, count=False, offset=None, limit=None):
See: https://github.com/delanoe/bool2sparql See: https://github.com/delanoe/bool2sparql
""" """
query = re.sub("\"", "\'", rawQuery) query = re.sub("\"", "\'", rawQuery)
bashCommand = ["/srv/gargantext/gargantext/util/crawlers/sparql/bool2sparql-exe","-q",query] bashCommand = [BOOL_TOOLS_PATH + "/bool2sparql-exe","-q",query]
if count is True : if count is True :
bashCommand.append("-c") bashCommand.append("-c")
......
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