Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
humanities
gargantext
Commits
3b813f8a
Commit
3b813f8a
authored
Sep 08, 2017
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FIX] removing hard path in code.
parent
775c1232
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
settings.py
gargantext/settings.py
+3
-0
bool2sparql.py
gargantext/util/crawlers/sparql/bool2sparql.py
+2
-1
No files found.
gargantext/settings.py
View file @
3b813f8a
...
@@ -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"
gargantext/util/crawlers/sparql/bool2sparql.py
View file @
3b813f8a
...
@@ -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"
)
...
...
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