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
043b67b2
Commit
043b67b2
authored
Nov 04, 2014
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'alex'
Modifications from Alex (design mainly)
parents
17de192f
8c31f0ae
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
8 deletions
+24
-8
views.py
gargantext_web/views.py
+8
-2
RisFileParser.py
parsing/FileParsers/RisFileParser.py
+12
-4
exploration.html
templates/exploration.html
+2
-0
project.html
templates/project.html
+1
-1
projects.html
templates/projects.html
+1
-1
No files found.
gargantext_web/views.py
View file @
043b67b2
...
@@ -249,7 +249,13 @@ def corpus(request, project_id, corpus_id):
...
@@ -249,7 +249,13 @@ def corpus(request, project_id, corpus_id):
sources_donut
=
[]
sources_donut
=
[]
try
:
try
:
histo
=
[{
'2001'
:
12
},
{
'2002'
:
13
}]
histo
=
[
{
'to_char'
:
2000
,
'count'
:
13
},
{
'to_char'
:
2001
,
'count'
:
20
},
{
'to_char'
:
2002
,
'count'
:
5
},
{
'to_char'
:
2003
,
'count'
:
130
},
{
'to_char'
:
2004
,
'count'
:
300
},
]
first
=
parse
(
documents
.
first
()
.
metadata
[
'publication_date'
])
first
=
parse
(
documents
.
first
()
.
metadata
[
'publication_date'
])
last
=
parse
(
documents
.
last
()
.
metadata
[
'publication_date'
])
last
=
parse
(
documents
.
last
()
.
metadata
[
'publication_date'
])
...
...
parsing/FileParsers/RisFileParser.py
View file @
043b67b2
...
@@ -5,10 +5,10 @@ from parsing.FileParsers.FileParser import FileParser
...
@@ -5,10 +5,10 @@ from parsing.FileParsers.FileParser import FileParser
class
RisFileParser
(
FileParser
):
class
RisFileParser
(
FileParser
):
_parameters
=
{
_parameters
=
{
b
"
TY
"
:
{
"type"
:
"delimiter"
},
b
"
ER
"
:
{
"type"
:
"delimiter"
},
b
"TI"
:
{
"type"
:
"metadata"
,
"key"
:
"title"
,
"separator"
:
" "
},
b
"TI"
:
{
"type"
:
"metadata"
,
"key"
:
"title"
,
"separator"
:
" "
},
b
"AU"
:
{
"type"
:
"metadata"
,
"key"
:
"authors"
,
"separator"
:
", "
},
b
"AU"
:
{
"type"
:
"metadata"
,
"key"
:
"authors"
,
"separator"
:
", "
},
b
"
DI
"
:
{
"type"
:
"metadata"
,
"key"
:
"doi"
},
b
"
UR
"
:
{
"type"
:
"metadata"
,
"key"
:
"doi"
},
b
"PY"
:
{
"type"
:
"metadata"
,
"key"
:
"publication_year"
},
b
"PY"
:
{
"type"
:
"metadata"
,
"key"
:
"publication_year"
},
b
"PD"
:
{
"type"
:
"metadata"
,
"key"
:
"publication_month"
},
b
"PD"
:
{
"type"
:
"metadata"
,
"key"
:
"publication_month"
},
b
"LA"
:
{
"type"
:
"metadata"
,
"key"
:
"language"
},
b
"LA"
:
{
"type"
:
"metadata"
,
"key"
:
"language"
},
...
@@ -32,8 +32,16 @@ class RisFileParser(FileParser):
...
@@ -32,8 +32,16 @@ class RisFileParser(FileParser):
metadata
[
parameter
[
"key"
]]
=
separator
.
join
(
last_values
)
metadata
[
parameter
[
"key"
]]
=
separator
.
join
(
last_values
)
elif
parameter
[
"type"
]
==
"delimiter"
:
elif
parameter
[
"type"
]
==
"delimiter"
:
#language = self._languages_fullname[metadata["language"].lower()]
#language = self._languages_fullname[metadata["language"].lower()]
try
:
metadata_list
.
append
(
metadata
)
metadata_list
.
append
(
metadata
)
except
:
pass
last_key
=
parameter_key
last_key
=
parameter_key
last_values
=
[]
last_values
=
[]
try
:
last_values
.
append
(
line
[
3
:
-
1
]
.
decode
())
last_values
.
append
(
line
[
3
:
-
1
]
.
decode
())
except
Exception
as
error
:
print
(
error
)
pass
return
metadata_list
return
metadata_list
templates/exploration.html
View file @
043b67b2
...
@@ -17,6 +17,7 @@
...
@@ -17,6 +17,7 @@
<div
class=
"container content"
>
<div
class=
"container content"
>
<div
class=
"graph"
>
<div
class=
"graphWidget"
>
<div
class=
"graphWidget"
>
<h1>
Bees vs. Honey
</h1>
<h1>
Bees vs. Honey
</h1>
<select
name=
"x"
>
<select
name=
"x"
>
...
@@ -31,6 +32,7 @@
...
@@ -31,6 +32,7 @@
</select>
</select>
<div
class=
"graph"
></div>
<div
class=
"graph"
></div>
</div>
</div>
</div>
</div>
</div>
...
...
templates/project.html
View file @
043b67b2
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
{% for corpus in board %}
{% for corpus in board %}
<div class="col-md-4">
<div class="col-md-4">
<h3><a href="/project/{{project.id}}/corpus/{{corpus.id}}">{{corpus.name}}</a>
<h3><a href="/project/{{project.id}}/corpus/{{corpus.id}}">{{corpus.name}}</a>
<button type="button" class="btn btn-xs btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content='<a href="/project/{{ project.id }}/corpus/{{ corpus.id}}/delete">
Delete it!</a>'>Manag
e</button>
<button type="button" class="btn btn-xs btn-default" data-container="body" data-toggle="popover" data-placement="bottom" data-content='<a href="/project/{{ project.id }}/corpus/{{ corpus.id}}/delete">
Yes, I am sure!</a>'>Delet
e</button>
...
...
templates/projects.html
View file @
043b67b2
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
<!--<div class="col-md-offset-7 col-md-4 content" style="background-color:grey">!-->
<!--<div class="col-md-offset-7 col-md-4 content" style="background-color:grey">!-->
<div
class=
"col-md-3 content"
>
<div
class=
"col-md-3 content"
>
<h3><a
href=
"/project/{{ project.id }}"
>
{{ project.name }}
</a>
<h3><a
href=
"/project/{{ project.id }}"
>
{{ project.name }}
</a>
<button
type=
"button"
class=
"btn btn-xs btn-default"
data-container=
"body"
data-toggle=
"popover"
data-placement=
"bottom"
data-content=
'<a href="/project/{{ project.id }}/delete">
Delete it!</a>'
>
Manag
e
</button>
<button
type=
"button"
class=
"btn btn-xs btn-default"
data-container=
"body"
data-toggle=
"popover"
data-placement=
"bottom"
data-content=
'<a href="/project/{{ project.id }}/delete">
Yes, I am sure!</a>'
>
Delet
e
</button>
</h3>
</h3>
<h4>
{{ project.subtitle }}
<h4>
<h4>
{{ project.subtitle }}
<h4>
...
...
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