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
28cb31ce
Commit
28cb31ce
authored
Jan 29, 2018
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'testing' into stable
parents
6622956b
27829aa3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
3 deletions
+26
-3
CHANGELOG.md
CHANGELOG.md
+5
-0
EUROPRESSE.py
gargantext/util/parsers/EUROPRESSE.py
+13
-2
projects.py
gargantext/views/api/projects.py
+7
-0
menu.html
templates/pages/menu.html
+1
-1
No files found.
CHANGELOG.md
View file @
28cb31ce
...
@@ -2,6 +2,11 @@
...
@@ -2,6 +2,11 @@
*
Guided Tour
*
Guided Tour
*
Sources form highlighting crawlers
*
Sources form highlighting crawlers
## Version 3.0.8.1
*
WOS parser date FIX
*
EUROPRESS parser author/text article FIX
*
Backend: each project as user node as parent
## Version 3.0.7
## Version 3.0.7
*
Alembic implemented to manage database migrations
*
Alembic implemented to manage database migrations
...
...
gargantext/util/parsers/EUROPRESSE.py
View file @
28cb31ce
...
@@ -81,8 +81,9 @@ class EuropresseParser(Parser):
...
@@ -81,8 +81,9 @@ class EuropresseParser(Parser):
# "./header/div/p[@class='titreArticleVisu grandTitre']"
# "./header/div/p[@class='titreArticleVisu grandTitre']"
#
#
# title_xpath (chemin plus générique)
# title_xpath (chemin plus générique)
title_xpath
=
"./header//*[contains(@class,'titreArticle')]"
title_xpath
=
"./header//*[contains(@class,'titreArticleVisu rdp__articletitle')]"
text_xpath
=
"./section/div[@class='DocText']//p"
authors_xpath
=
"./header//*[contains(@class,'docAuthors')]"
text_xpath
=
"./section/div[@class='DocText clearfix']//p"
entire_header_xpath
=
"./header"
entire_header_xpath
=
"./header"
# diagnosed during date retrieval and used for rubrique
# diagnosed during date retrieval and used for rubrique
...
@@ -144,6 +145,15 @@ class EuropresseParser(Parser):
...
@@ -144,6 +145,15 @@ class EuropresseParser(Parser):
yield
(
hyperdata
)
yield
(
hyperdata
)
continue
continue
# Authors
# --------
try
:
authors
=
scrap_text
(
html_article
.
xpath
(
authors_xpath
))
hyperdata
[
'authors'
]
=
'; '
.
join
([
author
for
author
in
authors
])
except
:
pass
# FULLTEXT
# FULLTEXT
# --------
# --------
...
@@ -154,6 +164,7 @@ class EuropresseParser(Parser):
...
@@ -154,6 +164,7 @@ class EuropresseParser(Parser):
except
:
except
:
pass
pass
# PUBLICATIONNAME
# PUBLICATIONNAME
# ----------------
# ----------------
try
:
try
:
...
...
gargantext/views/api/projects.py
View file @
28cb31ce
...
@@ -5,6 +5,7 @@ from collections import defaultdict
...
@@ -5,6 +5,7 @@ from collections import defaultdict
from
gargantext.util.toolchain
import
*
from
gargantext.util.toolchain
import
*
import
copy
import
copy
from
gargantext.util.db
import
session
from
gargantext.util.db
import
session
from
gargantext.models
import
UserNode
class
ProjectList
(
APIView
):
class
ProjectList
(
APIView
):
'''API endpoint that represent a list of projects owned by a user'''
'''API endpoint that represent a list of projects owned by a user'''
...
@@ -36,10 +37,16 @@ class ProjectList(APIView):
...
@@ -36,10 +37,16 @@ class ProjectList(APIView):
return
Response
({
"detail"
:
"Project with this name already exists"
,
"url"
:
"/projects/
%
s"
%
str
(
project
.
id
)},
status
=
HTTP_409_CONFLICT
)
return
Response
({
"detail"
:
"Project with this name already exists"
,
"url"
:
"/projects/
%
s"
%
str
(
project
.
id
)},
status
=
HTTP_409_CONFLICT
)
else
:
else
:
user_node
=
session
.
query
(
UserNode
)
.
filter_by
(
user_id
=
request
.
user
.
id
)
.
one_or_none
()
if
user_node
is
None
:
print
(
"??? Can't find UserNode for
%
r to create ProjectNode with name
%
r ???"
%
(
request
.
user
,
name
))
new_project
=
Node
(
new_project
=
Node
(
user_id
=
request
.
user
.
id
,
user_id
=
request
.
user
.
id
,
typename
=
'PROJECT'
,
typename
=
'PROJECT'
,
name
=
name
,
name
=
name
,
parent_id
=
user_node
and
user_node
.
id
,
)
)
session
.
add
(
new_project
)
session
.
add
(
new_project
)
...
...
templates/pages/menu.html
View file @
28cb31ce
...
@@ -367,7 +367,7 @@
...
@@ -367,7 +367,7 @@
<p>
<p>
Gargantext
Gargantext
<span
class=
"glyphicon glyphicon-registration-mark"
aria-hidden=
"true"
></span>
<span
class=
"glyphicon glyphicon-registration-mark"
aria-hidden=
"true"
></span>
, version 3.0.8,
, version 3.0.8
.1
,
<a
href=
"http://www.cnrs.fr"
target=
"blank"
title=
"Institution that enables this project."
>
<a
href=
"http://www.cnrs.fr"
target=
"blank"
title=
"Institution that enables this project."
>
Copyrights
Copyrights
<span
class=
"glyphicon glyphicon-copyright-mark"
aria-hidden=
"true"
></span>
<span
class=
"glyphicon glyphicon-copyright-mark"
aria-hidden=
"true"
></span>
...
...
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