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
15296ea7
Commit
15296ea7
authored
8 years ago
by
delanoe
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[FEAT] Scrapers configuration
parent
52c43285
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
15 deletions
+12
-15
urls.py
gargantext/views/api/urls.py
+1
-1
project.html
templates/pages/projects/project.html
+11
-14
No files found.
gargantext/views/api/urls.py
View file @
15296ea7
...
@@ -22,7 +22,7 @@ urlpatterns = [ url(r'^nodes$' , nodes.NodeListResource.as_view()
...
@@ -22,7 +22,7 @@ urlpatterns = [ url(r'^nodes$' , nodes.NodeListResource.as_view()
# aka lexical model
# aka lexical model
,
url
(
r'^scraping$'
,
scraping
.
Target
.
as_view
()
)
#
, url(r'^scraping$' , scraping.Target.as_view() )
# Scraping : getting data from external database
# Scraping : getting data from external database
# Available databases : Pubmed, IsTex, (next: CERN)
# Available databases : Pubmed, IsTex, (next: CERN)
]
]
This diff is collapsed.
Click to expand it.
templates/pages/projects/project.html
View file @
15296ea7
...
@@ -3,16 +3,15 @@
...
@@ -3,16 +3,15 @@
{% block css %}
{% block css %}
{% load staticfiles %}
{% load staticfiles %}
<link
rel=
"stylesheet"
href=
"{% static "
css
/
bootstrap
.
css
"
%}"
>
<link
rel=
"stylesheet"
href=
"{% static "
css
/
bootstrap
.
css
"
%}"
>
<link
rel=
"stylesheet"
href=
"{% static "
css
/
morris
.
css
"
%}"
>
<script
src=
"{% static "
js
/
raphael-min
.
js
"%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
js
/
morris
.
min
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
js
/
jquery
/
jquery
.
min
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
js
/
jquery
/
jquery
.
min
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
js
/
gargantext
/
garganrest
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
js
/
gargantext
/
garganrest
.
js
"
%}"
></script>
<link
rel=
"stylesheet"
href=
"http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"
>
<link
rel=
"stylesheet"
href=
"http://code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"
>
<script
type=
"text/javascript"
src=
"{% static "
js
/
morris
.
min
.
js
"
%}"
></script>
<script
type=
"text/javascript"
src=
"{% static "
js
/
morris
.
min
.
js
"
%}"
></script>
<link
rel=
"stylesheet"
href=
"{% static "
css
/
morris
.
css
"
%}"
>
<script
src=
"{% static "
js
/
raphael-min
.
js
"%}"
></script>
<style
type=
"text/css"
>
<style
type=
"text/css"
>
.ui-autocomplete
{
.ui-autocomplete
{
z-index
:
5000
;
z-index
:
5000
;
...
@@ -204,7 +203,7 @@
...
@@ -204,7 +203,7 @@
<div
id=
"pubmedcrawl"
style=
"visibility: hidden;"
>
<div
id=
"pubmedcrawl"
style=
"visibility: hidden;"
>
Do you have a file already?
Do you have a file already?
<input
type=
"radio"
id=
"file_yes"
name=
"file1"
onclick=
"FileOrNotFile(this.value);"
class=
"file1"
value=
"true"
checked
>
Yes
</input>
<input
type=
"radio"
id=
"file_yes"
name=
"file1"
onclick=
"FileOrNotFile(this.value);"
class=
"file1"
value=
"true"
checked
>
Yes
</input>
<input
type=
"radio"
id=
"file_no"
name=
"file1"
onclick=
"FileOrNotFile(this.value);"
class=
"file1"
value=
"false"
>
No
</input>
<input
type=
"radio"
id=
"file_no"
name=
"file1"
onclick=
"FileOrNotFile(this.value);"
class=
"file1"
value=
"false"
>
No
</input>
</div>
</div>
</td>
</td>
</tr>
</tr>
...
@@ -316,9 +315,7 @@
...
@@ -316,9 +315,7 @@
}
}
}
}
// //
// Scraping functions //
// //
function
getGlobalResults
(
value
){
function
getGlobalResults
(
value
){
console
.
log
(
"in getGlobalResults()"
)
console
.
log
(
"in getGlobalResults()"
)
// AJAX to django
// AJAX to django
...
@@ -332,10 +329,10 @@
...
@@ -332,10 +329,10 @@
var
theType
=
$
(
"#id_type option:selected"
).
html
();
var
theType
=
$
(
"#id_type option:selected"
).
html
();
if
(
theType
==
"Pubmed (xml format)"
)
{
if
(
theType
==
"Pubmed (xml format)"
)
{
$
.
ajax
({
$
.
ajax
({
// contentType: "application/json",
// contentType: "application/json",
url
:
window
.
location
.
origin
+
"/
api/scraping?source=pubmed
"
,
url
:
window
.
location
.
origin
+
"/
tests/pubmedquery
"
,
data
:
formData
,
data
:
formData
,
type
:
'POST'
,
type
:
'POST'
,
beforeSend
:
function
(
xhr
)
{
beforeSend
:
function
(
xhr
)
{
...
@@ -373,10 +370,10 @@
...
@@ -373,10 +370,10 @@
}
}
if
(
theType
==
"ISTex"
)
{
if
(
theType
==
"ISTex"
)
{
console
.
log
(
window
.
location
.
origin
+
"
api/scraping?source=istex
"
)
console
.
log
(
window
.
location
.
origin
+
"
tests/istextquery
"
)
$
.
ajax
({
$
.
ajax
({
// contentType: "application/json",
// contentType: "application/json",
url
:
window
.
location
.
origin
+
"/
api/scraping?source=istex
"
,
url
:
window
.
location
.
origin
+
"/
tests/istextquery
"
,
data
:
formData
,
data
:
formData
,
type
:
'POST'
,
type
:
'POST'
,
beforeSend
:
function
(
xhr
)
{
beforeSend
:
function
(
xhr
)
{
...
...
This diff is collapsed.
Click to expand it.
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