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
eb08fe7e
Commit
eb08fe7e
authored
Jul 27, 2016
by
c24b
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new method resourcetype resource_by_name
parent
ebad40b7
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
istex.py
moissonneurs/istex.py
+2
-2
pubmed.py
moissonneurs/pubmed.py
+2
-2
No files found.
moissonneurs/istex.py
View file @
eb08fe7e
...
...
@@ -8,7 +8,7 @@ from traceback import print_tb
from
django.shortcuts
import
redirect
,
render
from
django.http
import
Http404
,
HttpResponseRedirect
,
HttpResponseForbidden
from
gargantext.constants
import
resourcetyp
e
,
QUERY_SIZE_N_MAX
from
gargantext.constants
import
get_resource_by_nam
e
,
QUERY_SIZE_N_MAX
from
gargantext.models.nodes
import
Node
from
gargantext.util.db
import
session
from
gargantext.util.http
import
JsonHttpResponse
...
...
@@ -133,7 +133,7 @@ def save(request , project_id):
if
filename
!=
False
:
# add the uploaded resource to the corpus
corpus
.
add_resource
(
type
=
resourcetype
(
'ISTex'
)
type
=
get_resource_by_name
(
'ISTex [ISI]'
)[
"type"
]
,
path
=
filename
)
dwnldsOK
+=
1
...
...
moissonneurs/pubmed.py
View file @
eb08fe7e
...
...
@@ -18,7 +18,7 @@ from traceback import print_tb
from
django.shortcuts
import
redirect
from
django.http
import
Http404
,
HttpResponseRedirect
,
HttpResponseForbidden
from
gargantext.constants
import
resourcetyp
e
,
QUERY_SIZE_N_MAX
from
gargantext.constants
import
get_resourc
e
,
QUERY_SIZE_N_MAX
from
gargantext.models.nodes
import
Node
from
gargantext.util.db
import
session
from
gargantext.util.db_cache
import
cache
...
...
@@ -134,7 +134,7 @@ def save( request , project_id ) :
print
(
filename
)
if
filename
!=
False
:
# add the uploaded resource to the corpus
corpus
.
add_resource
(
type
=
resourcetype
(
'Pubmed (XML format)'
)
corpus
.
add_resource
(
type
=
get_resource_by_name
(
'Pubmed [XML]'
)[
"type"
]
,
path
=
filename
,
url
=
None
)
...
...
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