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
cf3697da
Commit
cf3697da
authored
Oct 23, 2014
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEATURE] VIEW PARSING If for each type of bdd.
parent
5b91c3c6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
views.py
gargantext_web/views.py
+15
-8
No files found.
gargantext_web/views.py
View file @
cf3697da
...
...
@@ -21,7 +21,7 @@ from django import forms
from
collections
import
defaultdict
#
from parsing.FileParsers import *
from
parsing.FileParsers
import
*
# SOME FUNCTIONS
...
...
@@ -162,13 +162,20 @@ def project(request, project_id):
node
.
save
()
node
.
resource
.
add
(
resource
)
# try:
# for resource in node.resource.all():
# fileparser = PubmedFileParser.PubmedFileParser(file='/var/www/gargantext/media/' + str(resource.file))
# fileparser.parse(node)
#
# except Exception as error:
# print(error)
try
:
for
resource
in
node
.
resource
.
all
():
print
(
resource
.
bdd_type
.
name
)
if
resource
.
bdd_type
.
name
==
"PubMed"
:
fileparser
=
PubmedFileParser
(
file
=
'/var/www/gargantext/media/'
+
str
(
resource
.
file
))
fileparser
.
parse
(
node
)
elif
resource
.
bdd_type
.
name
==
"Web Of Science (WOS), ISI format"
:
fileparser
=
IsiParser
(
file
=
'/var/www/gargantext/media/'
+
str
(
resource
.
file
))
fileparser
.
parse
(
node
)
elif
node
.
bdd_type
.
name
==
"Europresse"
:
pass
except
Exception
as
error
:
print
(
error
)
return
HttpResponseRedirect
(
'/project/'
+
str
(
project_id
))
else
:
...
...
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