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
1eab1ef8
Commit
1eab1ef8
authored
Jun 18, 2015
by
PkSM3
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[UPDATE] i've recovered all my lost changes
parent
24b538af
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
35 deletions
+14
-35
urls.py
gargantext_web/urls.py
+6
-4
ISTex.py
parsing/FileParsers/ISTex.py
+3
-3
documents.html
templates/corpus/documents.html
+1
-0
journals.html
templates/corpus/journals.html
+2
-0
terms.html
templates/corpus/terms.html
+0
-26
views.py
tests/ngramstable/views.py
+2
-2
No files found.
gargantext_web/urls.py
View file @
1eab1ef8
...
@@ -54,9 +54,9 @@ urlpatterns = patterns('',
...
@@ -54,9 +54,9 @@ urlpatterns = patterns('',
url
(
r'^project/(\d+)/corpus/(\d+)/journals/journals.json$'
,
corpus_views
.
test_journals
),
url
(
r'^project/(\d+)/corpus/(\d+)/journals/journals.json$'
,
corpus_views
.
test_journals
),
url
(
r'^project/(\d+)/corpus/(\d+)/journals'
,
corpus_views
.
get_journals
),
url
(
r'^project/(\d+)/corpus/(\d+)/journals'
,
corpus_views
.
get_journals
),
# Terms view
#
#
Terms view
url
(
r'^project/(\d+)/corpus/(\d+)/terms/ngrams.json$'
,
corpus_views
.
test_ngrams
),
#
url(r'^project/(\d+)/corpus/(\d+)/terms/ngrams.json$', corpus_views.test_ngrams),
url
(
r'^project/(\d+)/corpus/(\d+)/terms'
,
corpus_views
.
get_ngrams
),
#
url(r'^project/(\d+)/corpus/(\d+)/terms', corpus_views.get_ngrams),
# Update corpus
# Update corpus
url
(
r'^project/(\d+)/corpus/(\d+)/(\w+)/update$'
,
views
.
update
),
url
(
r'^project/(\d+)/corpus/(\d+)/(\w+)/update$'
,
views
.
update
),
...
@@ -108,7 +108,9 @@ urlpatterns = patterns('',
...
@@ -108,7 +108,9 @@ urlpatterns = patterns('',
url
(
r'^tests/project/(\d+)/ISTEXquery/go$'
,
pubmedscrapper
.
testISTEX
),
url
(
r'^tests/project/(\d+)/ISTEXquery/go$'
,
pubmedscrapper
.
testISTEX
),
url
(
r'^tests/paginator/corpus/(\d+)/$'
,
views
.
newpaginatorJSON
),
url
(
r'^tests/paginator/corpus/(\d+)/$'
,
views
.
newpaginatorJSON
),
url
(
r'^tests/move2trash/$'
,
views
.
move_to_trash_multiple
),
url
(
r'^tests/move2trash/$'
,
views
.
move_to_trash_multiple
),
url
(
r'^corpus/(\d+)/document/(\d+)/testpage$'
,
samtest
.
test_test
)
url
(
r'^corpus/(\d+)/document/(\d+)/testpage$'
,
samtest
.
test_test
),
url
(
r'^project/(\d+)/corpus/(\d+)/terms/ngrams.json$'
,
samtest
.
test_ngrams
),
url
(
r'^project/(\d+)/corpus/(\d+)/terms'
,
samtest
.
get_ngrams
)
)
)
...
...
parsing/FileParsers/ISTex.py
View file @
1eab1ef8
...
@@ -36,7 +36,7 @@ class ISTex(FileParser):
...
@@ -36,7 +36,7 @@ class ISTex(FileParser):
hyperdata
[
key
]
=
json_doc
[
path
]
hyperdata
[
key
]
=
json_doc
[
path
]
except
:
pass
except
:
pass
# print("|",hyperdata["
publication_date
"])
# print("|",hyperdata["
language_iso3
"])
if
"doi"
in
hyperdata
:
hyperdata
[
"doi"
]
=
hyperdata
[
"doi"
][
0
]
if
"doi"
in
hyperdata
:
hyperdata
[
"doi"
]
=
hyperdata
[
"doi"
][
0
]
...
@@ -75,12 +75,12 @@ class ISTex(FileParser):
...
@@ -75,12 +75,12 @@ class ISTex(FileParser):
if
"genre"
in
hyperdata
:
if
"genre"
in
hyperdata
:
if
len
(
hyperdata
[
"genre"
])
==
0
:
if
len
(
hyperdata
[
"genre"
])
==
0
:
hyperdata
.
pop
(
"genre"
)
hyperdata
.
pop
(
"genre"
)
if
"language_iso3"
in
hyperdata
:
hyperdata
[
"language_iso3"
]
=
hyperdata
[
"language_iso3"
][
0
]
RealDate
=
hyperdata
[
"publication_date"
]
RealDate
=
hyperdata
[
"publication_date"
]
if
"publication_date"
in
hyperdata
:
hyperdata
.
pop
(
"publication_date"
)
if
"publication_date"
in
hyperdata
:
hyperdata
.
pop
(
"publication_date"
)
if
"language_iso3"
in
hyperdata
:
hyperdata
[
"language_iso3"
]
=
hyperdata
[
"language_iso3"
][
0
]
Decision
=
""
Decision
=
""
if
len
(
RealDate
)
>
4
:
if
len
(
RealDate
)
>
4
:
...
...
templates/corpus/documents.html
View file @
1eab1ef8
...
@@ -72,6 +72,7 @@ th a {
...
@@ -72,6 +72,7 @@ th a {
<input
type=
"hidden"
id=
"list_id"
value=
"{{ list_id }}"
></input>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"jumbotron"
>
<div
class=
"jumbotron"
>
...
...
templates/corpus/journals.html
View file @
1eab1ef8
...
@@ -110,6 +110,8 @@ input[type=radio]:checked + label {
...
@@ -110,6 +110,8 @@ input[type=radio]:checked + label {
{% endblock %}
{% endblock %}
<input
type=
"hidden"
id=
"list_id"
value=
"{{ list_id }}"
></input>
{% block content %}
{% block content %}
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"container"
>
...
...
templates/corpus/terms.html
View file @
1eab1ef8
...
@@ -116,32 +116,6 @@ input[type=radio]:checked + label {
...
@@ -116,32 +116,6 @@ input[type=radio]:checked + label {
<input
type=
"hidden"
id=
"list_id"
value=
"{{ list_id }}"
></input>
<input
type=
"hidden"
id=
"list_id"
value=
"{{ list_id }}"
></input>
<div
class=
"container theme-showcase"
role=
"main"
>
<div
class=
"jumbotron"
>
{% if project %}
<h1>
{{ project.name }}, {{ corpus.name }}
</h1>
{% endif %}
{% if corpus %}
<p>
Created on {{ corpus.date }}
</p>
<div
id=
"stats"
></div>
{% endif %}
<!-- <a class="btn btn-primary btn-lg" role="button" href="/admin/documents/corpus/{{ corpus.id }}/">Add file</a> -->
<a
class=
"btn btn-primary btn-lg"
role=
"button"
href=
"/project/{{project.id}}/corpus/{{ corpus.id }}/corpus.csv"
>
Save as
</a>
<a
class=
"btn btn-primary btn-lg"
role=
"button"
href=
"/delete/{{ corpus.id }}"
>
Delete
</a></p>
{% if number == 0 %}
<a
class=
"btn btn-primary btn-lg"
role=
"button"
href=
"/admin/documents/corpus/{{ corpus.id }}/"
>
Add documents
</a></p>
{% endif %}
</div>
</div>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"container"
>
<div
class=
"container"
>
...
...
tests/ngramstable/views.py
View file @
1eab1ef8
...
@@ -100,7 +100,7 @@ def get_ngrams(request , project_id , corpus_id ):
...
@@ -100,7 +100,7 @@ def get_ngrams(request , project_id , corpus_id ):
except
ValueError
:
except
ValueError
:
raise
Http404
()
raise
Http404
()
t
=
get_template
(
'
tests/ngra
ms.html'
)
t
=
get_template
(
'
corpus/ter
ms.html'
)
user
=
cache
.
User
[
request
.
user
.
username
]
.
id
user
=
cache
.
User
[
request
.
user
.
username
]
.
id
date
=
datetime
.
datetime
.
now
()
date
=
datetime
.
datetime
.
now
()
...
@@ -173,7 +173,7 @@ def get_journals(request , project_id , corpus_id ):
...
@@ -173,7 +173,7 @@ def get_journals(request , project_id , corpus_id ):
except
ValueError
:
except
ValueError
:
raise
Http404
()
raise
Http404
()
t
=
get_template
(
'
test
s/journals.html'
)
t
=
get_template
(
'
corpu
s/journals.html'
)
user
=
cache
.
User
[
request
.
user
.
username
]
.
id
user
=
cache
.
User
[
request
.
user
.
username
]
.
id
date
=
datetime
.
datetime
.
now
()
date
=
datetime
.
datetime
.
now
()
...
...
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