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
851fb664
Commit
851fb664
authored
Feb 16, 2015
by
Administrator
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'testing' into stable
parents
f08ee762
7476e4c0
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
180 additions
and
87 deletions
+180
-87
backupdb.py
backupdb.py
+3
-0
urls.py
gargantext_web/urls.py
+1
-0
admin.py
node/admin.py
+2
-2
models.py
node/models.py
+4
-4
PubmedFileParser.py
parsing/FileParsers/PubmedFileParser.py
+20
-13
MedlineFetcherDavid2015.py
scrap_pubmed/MedlineFetcherDavid2015.py
+16
-4
views.py
scrap_pubmed/views.py
+54
-27
project.html
templates/project.html
+80
-37
No files found.
backupdb.py
0 → 100644
View file @
851fb664
import
os
command
=
'export PGPASSWORD=C8kdcUrAQy66U
\n
pg_dump -U alexandre -h localhost gargandb| gzip >
%
s'
%
"mysqldump.db"
os
.
system
(
command
)
gargantext_web/urls.py
View file @
851fb664
...
@@ -70,6 +70,7 @@ urlpatterns = patterns('',
...
@@ -70,6 +70,7 @@ urlpatterns = patterns('',
url
(
r'^tests/mvc$'
,
views
.
tests_mvc
),
url
(
r'^tests/mvc$'
,
views
.
tests_mvc
),
url
(
r'^tests/mvc-listdocuments$'
,
views
.
tests_mvc_listdocuments
),
url
(
r'^tests/mvc-listdocuments$'
,
views
.
tests_mvc_listdocuments
),
url
(
r'^tests/istextquery$'
,
pubmedscrapper
.
getGlobalStatsISTEXT
),
url
(
r'^tests/pubmedquery$'
,
pubmedscrapper
.
getGlobalStats
),
url
(
r'^tests/pubmedquery$'
,
pubmedscrapper
.
getGlobalStats
),
url
(
r'^tests/project/(\d+)/pubmedquery/go$'
,
pubmedscrapper
.
doTheQuery
),
url
(
r'^tests/project/(\d+)/pubmedquery/go$'
,
pubmedscrapper
.
doTheQuery
),
url
(
r'^tests/project/(\d+)/ISTEXquery/go$'
,
pubmedscrapper
.
testISTEX
)
url
(
r'^tests/project/(\d+)/ISTEXquery/go$'
,
pubmedscrapper
.
testISTEX
)
...
...
node/admin.py
View file @
851fb664
...
@@ -125,8 +125,8 @@ class CustomForm(forms.Form):
...
@@ -125,8 +125,8 @@ class CustomForm(forms.Form):
# file_.name = str(datetime.now().microsecond)
# file_.name = str(datetime.now().microsecond)
# # raise forms.ValidationError(_('Come on dude, name too long. Now is:'+file_.name))
# # raise forms.ValidationError(_('Come on dude, name too long. Now is:'+file_.name))
# #File size
# #File size
if
len
(
file_
)
>
104857600
:
#
if len(file_)>104857600:
raise
forms
.
ValidationError
(
_
(
'File to heavy! (<100MB).'
))
#
raise forms.ValidationError(_('File to heavy! (<100MB).'))
## File type:
## File type:
# if file_.content_type == "application/zip":
# if file_.content_type == "application/zip":
# raise forms.ValidationError(_('We need a zip pls.'))
# raise forms.ValidationError(_('We need a zip pls.'))
...
...
node/models.py
View file @
851fb664
...
@@ -81,7 +81,6 @@ class NodeQuerySet(CTENodeManager.CTEQuerySet):
...
@@ -81,7 +81,6 @@ class NodeQuerySet(CTENodeManager.CTEQuerySet):
metadata_cache
=
{
metadata
.
name
:
metadata
for
metadata
in
Metadata
.
objects
.
all
()}
metadata_cache
=
{
metadata
.
name
:
metadata
for
metadata
in
Metadata
.
objects
.
all
()}
data
=
[]
data
=
[]
for
node
in
self
:
for
node
in
self
:
print
(
node
.
id
)
for
key
,
value
in
node
.
metadata
.
items
():
for
key
,
value
in
node
.
metadata
.
items
():
if
key
in
metadata_cache
:
if
key
in
metadata_cache
:
metadata
=
metadata_cache
[
key
]
metadata
=
metadata_cache
[
key
]
...
@@ -249,13 +248,14 @@ class Node(CTENode):
...
@@ -249,13 +248,14 @@ class Node(CTENode):
@
current_app
.
task
(
filter
=
task_method
)
@
current_app
.
task
(
filter
=
task_method
)
def
workflow
(
self
,
keys
=
None
,
ngramsextractorscache
=
None
,
ngramscaches
=
None
,
verbose
=
False
):
def
workflow
(
self
,
keys
=
None
,
ngramsextractorscache
=
None
,
ngramscaches
=
None
,
verbose
=
False
):
import
time
import
time
total
=
0
print
(
"LOG::TIME: In workflow() parse_resources()"
)
print
(
"LOG::TIME: In workflow() parse_resources()"
)
start
=
time
.
time
()
start
=
time
.
time
()
self
.
metadata
[
'Processing'
]
=
1
self
.
metadata
[
'Processing'
]
=
1
self
.
save
()
self
.
save
()
self
.
parse_resources
()
self
.
parse_resources
()
end
=
time
.
time
()
end
=
time
.
time
()
total
+=
(
end
-
start
)
print
(
"LOG::TIME:_ "
+
datetime
.
datetime
.
now
()
.
isoformat
()
+
" parse_resources() [s]"
,(
end
-
start
))
print
(
"LOG::TIME:_ "
+
datetime
.
datetime
.
now
()
.
isoformat
()
+
" parse_resources() [s]"
,(
end
-
start
))
print
(
"LOG::TIME: In workflow() / parse_resources()"
)
print
(
"LOG::TIME: In workflow() / parse_resources()"
)
...
@@ -266,7 +266,7 @@ class Node(CTENode):
...
@@ -266,7 +266,7 @@ class Node(CTENode):
self
.
children
.
filter
(
type_id
=
type_document
.
pk
)
.
extract_ngrams
(
keys
=
[
'title'
,])
self
.
children
.
filter
(
type_id
=
type_document
.
pk
)
.
extract_ngrams
(
keys
=
[
'title'
,])
end
=
time
.
time
()
end
=
time
.
time
()
print
(
"- - - - - - - - - -
\n
"
)
print
(
"- - - - - - - - - -
\n
"
)
print
(
"LOG::TIME: "
,(
end
-
start
)
)
total
+=
(
end
-
start
)
print
(
"LOG::TIME:_ "
+
datetime
.
datetime
.
now
()
.
isoformat
()
+
" extract_ngrams() [s]"
,(
end
-
start
))
print
(
"LOG::TIME:_ "
+
datetime
.
datetime
.
now
()
.
isoformat
()
+
" extract_ngrams() [s]"
,(
end
-
start
))
print
(
"LOG::TIME: In workflow() / extract_ngrams()"
)
print
(
"LOG::TIME: In workflow() / extract_ngrams()"
)
...
@@ -275,9 +275,9 @@ class Node(CTENode):
...
@@ -275,9 +275,9 @@ class Node(CTENode):
from
analysis.functions
import
do_tfidf
from
analysis.functions
import
do_tfidf
do_tfidf
(
self
)
do_tfidf
(
self
)
end
=
time
.
time
()
end
=
time
.
time
()
total
+=
(
end
-
start
)
print
(
"LOG::TIME:_ "
+
datetime
.
datetime
.
now
()
.
isoformat
()
+
" do_tfidf() [s]"
,(
end
-
start
))
print
(
"LOG::TIME:_ "
+
datetime
.
datetime
.
now
()
.
isoformat
()
+
" do_tfidf() [s]"
,(
end
-
start
))
print
(
"LOG::TIME: In workflow() / do_tfidf()"
)
print
(
"LOG::TIME: In workflow() / do_tfidf()"
)
print
(
"In workflow() END"
)
print
(
"In workflow() END"
)
self
.
metadata
[
'Processing'
]
=
0
self
.
metadata
[
'Processing'
]
=
0
self
.
save
()
self
.
save
()
...
...
parsing/FileParsers/PubmedFileParser.py
View file @
851fb664
...
@@ -80,12 +80,19 @@ class PubmedFileParser(FileParser):
...
@@ -80,12 +80,19 @@ class PubmedFileParser(FileParser):
if
len
(
RealDate
)
>
4
:
if
len
(
RealDate
)
>
4
:
if
len
(
RealDate
)
>
8
:
if
len
(
RealDate
)
>
8
:
try
:
Decision
=
datetime
.
strptime
(
RealDate
,
'
%
Y
%
b
%
d'
)
.
date
()
try
:
Decision
=
datetime
.
strptime
(
RealDate
,
'
%
Y
%
b
%
d'
)
.
date
()
except
:
Decision
=
datetime
.
strptime
(
PubmedDate
,
'
%
Y
%
m
%
d'
)
.
date
()
except
:
try
:
Decision
=
datetime
.
strptime
(
PubmedDate
,
'
%
Y
%
m
%
d'
)
.
date
()
except
:
Decision
=
False
else
:
else
:
try
:
Decision
=
datetime
.
strptime
(
RealDate
,
'
%
Y
%
b'
)
.
date
()
try
:
Decision
=
datetime
.
strptime
(
RealDate
,
'
%
Y
%
b'
)
.
date
()
except
:
Decision
=
datetime
.
strptime
(
PubmedDate
,
'
%
Y
%
m
%
d'
)
.
date
()
except
:
else
:
Decision
=
datetime
.
strptime
(
PubmedDate
,
'
%
Y
%
m
%
d'
)
.
date
()
try
:
Decision
=
datetime
.
strptime
(
PubmedDate
,
'
%
Y
%
m
%
d'
)
.
date
()
except
:
Decision
=
False
else
:
try
:
Decision
=
datetime
.
strptime
(
PubmedDate
,
'
%
Y
%
m
%
d'
)
.
date
()
except
:
Decision
=
False
if
Decision
!=
False
:
if
"publication_year"
in
metadata
:
metadata
[
"publication_year"
]
=
str
(
Decision
.
year
)
if
"publication_year"
in
metadata
:
metadata
[
"publication_year"
]
=
str
(
Decision
.
year
)
if
"publication_month"
in
metadata
:
metadata
[
"publication_month"
]
=
str
(
Decision
.
month
)
if
"publication_month"
in
metadata
:
metadata
[
"publication_month"
]
=
str
(
Decision
.
month
)
if
"publication_day"
in
metadata
:
metadata
[
"publication_day"
]
=
str
(
Decision
.
day
)
if
"publication_day"
in
metadata
:
metadata
[
"publication_day"
]
=
str
(
Decision
.
day
)
...
...
scrap_pubmed/MedlineFetcherDavid2015.py
View file @
851fb664
...
@@ -12,6 +12,7 @@ import time
...
@@ -12,6 +12,7 @@ import time
from
lxml
import
etree
from
lxml
import
etree
import
datetime
import
datetime
from
django.core.files
import
File
from
django.core.files
import
File
import
codecs
import
threading
import
threading
from
queue
import
Queue
from
queue
import
Queue
...
@@ -39,6 +40,7 @@ class MedlineFetcher:
...
@@ -39,6 +40,7 @@ class MedlineFetcher:
"Get number of results for query 'query' in variable 'count'"
"Get number of results for query 'query' in variable 'count'"
"Get also 'queryKey' and 'webEnv', which are used by function 'medlineEfetch'"
"Get also 'queryKey' and 'webEnv', which are used by function 'medlineEfetch'"
print
(
query
)
origQuery
=
query
origQuery
=
query
query
=
query
.
replace
(
' '
,
'
%20
'
)
query
=
query
.
replace
(
' '
,
'
%20
'
)
...
@@ -92,10 +94,10 @@ class MedlineFetcher:
...
@@ -92,10 +94,10 @@ class MedlineFetcher:
def
downloadFile
(
self
,
item
):
def
downloadFile
(
self
,
item
):
url
=
item
[
0
]
url
=
item
[
0
]
filename
=
item
[
1
]
filename
=
item
[
1
]
print
(
"
\t
in downloadFile:"
)
print
(
"
\t
in
test_
downloadFile:"
)
print
(
url
,
filename
)
#
print(url,filename)
data
=
urlopen
(
url
)
data
=
urlopen
(
url
)
f
=
open
(
filename
,
'w
'
)
f
=
codecs
.
open
(
filename
,
"w"
,
encoding
=
'utf-8
'
)
myfile
=
File
(
f
)
myfile
=
File
(
f
)
myfile
.
write
(
data
.
read
()
.
decode
(
'utf-8'
)
)
myfile
.
write
(
data
.
read
()
.
decode
(
'utf-8'
)
)
myfile
.
close
()
myfile
.
close
()
...
@@ -104,6 +106,13 @@ class MedlineFetcher:
...
@@ -104,6 +106,13 @@ class MedlineFetcher:
print
(
threading
.
current_thread
()
.
name
,
filename
+
" OK"
)
print
(
threading
.
current_thread
()
.
name
,
filename
+
" OK"
)
return
filename
return
filename
# generic!
def
test_downloadFile
(
self
,
item
):
url
=
item
[
0
]
filename
=
item
[
1
]
print
(
"
\t
in downloadFile:"
)
data
=
urlopen
(
url
)
return
data
# generic!
# generic!
def
do_work
(
self
,
item
):
def
do_work
(
self
,
item
):
...
@@ -123,7 +132,10 @@ class MedlineFetcher:
...
@@ -123,7 +132,10 @@ class MedlineFetcher:
def
worker2
(
self
):
def
worker2
(
self
):
while
True
:
while
True
:
item
=
self
.
q
.
get
()
item
=
self
.
q
.
get
()
self
.
firstResults
.
append
(
self
.
downloadFile
(
item
))
results
=
[]
try
:
result
=
self
.
downloadFile
(
item
)
except
:
result
=
False
self
.
firstResults
.
append
(
result
)
self
.
q
.
task_done
()
self
.
q
.
task_done
()
def
chunks
(
self
,
l
,
n
):
def
chunks
(
self
,
l
,
n
):
...
...
scrap_pubmed/views.py
View file @
851fb664
...
@@ -43,6 +43,32 @@ def getGlobalStats(request ):
...
@@ -43,6 +43,32 @@ def getGlobalStats(request ):
return
JsonHttpResponse
(
data
)
return
JsonHttpResponse
(
data
)
def
getGlobalStatsISTEXT
(
request
):
print
(
request
.
method
)
alist
=
[
"bar"
,
"foo"
]
if
request
.
method
==
"POST"
:
N
=
100
query
=
request
.
POST
[
"query"
]
print
(
"LOG::TIME:_ "
+
datetime
.
datetime
.
now
()
.
isoformat
()
+
" query ="
,
query
)
print
(
"LOG::TIME:_ "
+
datetime
.
datetime
.
now
()
.
isoformat
()
+
" N ="
,
N
)
query_string
=
query
.
replace
(
" "
,
"+"
)
url
=
"http://api.istex.fr/document/?q="
+
query_string
tasks
=
MedlineFetcher
()
filename
=
MEDIA_ROOT
+
'/corpora/
%
s/
%
s'
%
(
request
.
user
,
str
(
datetime
.
datetime
.
now
()
.
isoformat
()))
try
:
thedata
=
tasks
.
test_downloadFile
(
[
url
,
filename
]
)
alist
=
thedata
.
read
()
.
decode
(
'utf-8'
)
except
Exception
as
error
:
alist
=
[
str
(
error
)]
data
=
alist
return
JsonHttpResponse
(
data
)
def
doTheQuery
(
request
,
project_id
):
def
doTheQuery
(
request
,
project_id
):
alist
=
[
"hola"
,
"mundo"
]
alist
=
[
"hola"
,
"mundo"
]
...
@@ -85,10 +111,7 @@ def doTheQuery(request , project_id):
...
@@ -85,10 +111,7 @@ def doTheQuery(request , project_id):
corpus
.
save
()
corpus
.
save
()
try
:
tasks
=
MedlineFetcher
()
tasks
=
MedlineFetcher
()
tasks
.
ensure_dir
(
MEDIA_ROOT
+
'/corpora/'
+
str
(
request
.
user
)
+
"/"
)
# configuring your queue with the event
for
i
in
range
(
8
):
for
i
in
range
(
8
):
t
=
threading
.
Thread
(
target
=
tasks
.
worker2
)
#thing to do
t
=
threading
.
Thread
(
target
=
tasks
.
worker2
)
#thing to do
t
.
daemon
=
True
# thread dies when main thread (only non-daemon thread) exits.
t
.
daemon
=
True
# thread dies when main thread (only non-daemon thread) exits.
...
@@ -97,8 +120,14 @@ def doTheQuery(request , project_id):
...
@@ -97,8 +120,14 @@ def doTheQuery(request , project_id):
filename
=
MEDIA_ROOT
+
'/corpora/
%
s/
%
s'
%
(
request
.
user
,
str
(
datetime
.
datetime
.
now
()
.
isoformat
()))
filename
=
MEDIA_ROOT
+
'/corpora/
%
s/
%
s'
%
(
request
.
user
,
str
(
datetime
.
datetime
.
now
()
.
isoformat
()))
tasks
.
q
.
put
(
[
url
,
filename
])
#put a task in th queue
tasks
.
q
.
put
(
[
url
,
filename
])
#put a task in th queue
tasks
.
q
.
join
()
# wait until everything is finished
tasks
.
q
.
join
()
# wait until everything is finished
dwnldsOK
=
0
for
filename
in
tasks
.
firstResults
:
for
filename
in
tasks
.
firstResults
:
if
filename
!=
False
:
corpus
.
add_resource
(
user
=
request
.
user
,
type
=
resource_type
,
file
=
filename
)
corpus
.
add_resource
(
user
=
request
.
user
,
type
=
resource_type
,
file
=
filename
)
dwnldsOK
+=
1
if
dwnldsOK
==
0
:
return
JsonHttpResponse
([
"fail"
])
# do the WorkFlow
# do the WorkFlow
try
:
try
:
...
@@ -113,9 +142,6 @@ def doTheQuery(request , project_id):
...
@@ -113,9 +142,6 @@ def doTheQuery(request , project_id):
return
JsonHttpResponse
([
"workflow"
,
"finished"
,
"outside the try-except"
])
return
JsonHttpResponse
([
"workflow"
,
"finished"
,
"outside the try-except"
])
except
Exception
as
error
:
print
(
"lele"
,
error
)
data
=
alist
data
=
alist
return
JsonHttpResponse
(
data
)
return
JsonHttpResponse
(
data
)
...
@@ -146,7 +172,8 @@ def testISTEX(request , project_id):
...
@@ -146,7 +172,8 @@ def testISTEX(request , project_id):
urlreqs
.
append
(
"http://api.istex.fr/document/?q="
+
query_string
+
"&output=*&"
+
"from="
+
str
(
k
[
0
])
+
"&size="
+
str
(
pagesize
))
urlreqs
.
append
(
"http://api.istex.fr/document/?q="
+
query_string
+
"&output=*&"
+
"from="
+
str
(
k
[
0
])
+
"&size="
+
str
(
pagesize
))
print
(
urlreqs
)
print
(
urlreqs
)
# urlreqs = ["http://localhost/374255" , "http://localhost/374278" ]
urlreqs
=
[
"http://localhost/374255"
,
"http://localhost/374278"
]
print
(
urlreqs
)
resource_type
=
ResourceType
.
objects
.
get
(
name
=
"istext"
)
resource_type
=
ResourceType
.
objects
.
get
(
name
=
"istext"
)
...
...
templates/project.html
View file @
851fb664
...
@@ -313,6 +313,9 @@
...
@@ -313,6 +313,9 @@
console
.
log
(
"disabling "
+
"#"
+
value
.
id
)
console
.
log
(
"disabling "
+
"#"
+
value
.
id
)
$
(
"#"
+
value
.
id
).
prop
(
'onclick'
,
null
);
$
(
"#"
+
value
.
id
).
prop
(
'onclick'
,
null
);
var
theType
=
$
(
"#id_type option:selected"
).
html
();
if
(
theType
==
"pubmed"
)
{
$
.
ajax
({
$
.
ajax
({
// contentType: "application/json",
// contentType: "application/json",
url
:
window
.
location
.
origin
+
"/tests/pubmedquery"
,
url
:
window
.
location
.
origin
+
"/tests/pubmedquery"
,
...
@@ -348,9 +351,49 @@
...
@@ -348,9 +351,49 @@
});
});
}
}
if
(
theType
==
"istext"
)
{
console
.
log
(
window
.
location
.
origin
+
"tests/istextquery"
)
$
.
ajax
({
// contentType: "application/json",
url
:
window
.
location
.
origin
+
"/tests/istextquery"
,
data
:
formData
,
type
:
'POST'
,
beforeSend
:
function
(
xhr
)
{
xhr
.
setRequestHeader
(
"X-CSRFToken"
,
getCookie
(
"csrftoken"
));
},
success
:
function
(
data
)
{
console
.
log
(
"in getGlobalResults"
)
console
.
log
(
data
)
console
.
log
(
"enabling "
+
"#"
+
value
.
id
)
$
(
"#"
+
value
.
id
).
attr
(
'onclick'
,
'getGlobalResults(this);'
);
// $("#submit_thing").prop('disabled' , false)
$
(
"#submit_thing"
).
html
(
"Process a 100 sample!"
)
thequeries
=
data
var
N
=
data
.
length
,
k
=
0
;
console
.
log
(
"N: "
+
N
)
// for(var i in thequeries) N += thequeries[i].count
if
(
N
>
1
)
{
var
total
=
JSON
.
parse
(
data
).
total
$
(
"#theresults"
).
html
(
"<i> <b>"
+
pubmedquery
+
"</b>: "
+
total
+
" publications.</i><br>"
)
$
(
'#submit_thing'
).
prop
(
'disabled'
,
false
);
}
else
{
$
(
"#theresults"
).
html
(
"<i> <b>"
+
data
[
0
]
+
"</b></i><br>"
)
$
(
'#submit_thing'
).
prop
(
'disabled'
,
true
);
}
},
error
:
function
(
result
)
{
console
.
log
(
"Data not found"
);
}
});
}
}
// CSS events for selecting one Radio-Input
// CSS events for selecting one Radio-Input
function
FileOrNotFile
(
value
)
{
function
FileOrNotFile
(
value
)
{
var
showfile
=
JSON
.
parse
(
value
)
var
showfile
=
JSON
.
parse
(
value
)
var
theType
=
$
(
"#id_type option:selected"
).
html
();
// @upload-file events
// @upload-file events
if
(
showfile
)
{
if
(
showfile
)
{
console
.
log
(
"You've clicked the YES"
)
console
.
log
(
"You've clicked the YES"
)
...
@@ -376,7 +419,7 @@
...
@@ -376,7 +419,7 @@
$
(
"#id_name"
).
on
(
'input'
,
function
(
e
){
$
(
"#id_name"
).
on
(
'input'
,
function
(
e
){
console
.
log
(
$
(
this
).
val
())
console
.
log
(
$
(
this
).
val
())
testAjax
(
$
(
this
).
val
()
)
if
(
theType
==
"pubmed"
)
testPUBMED
(
$
(
this
).
val
()
)
});
});
}
}
}
}
...
@@ -384,8 +427,8 @@
...
@@ -384,8 +427,8 @@
//CSS events for changing the Select element
//CSS events for changing the Select element
function
CustomForSelect
(
selected
)
{
function
CustomForSelect
(
selected
)
{
// show Radio-Inputs and trigger FileOrNotFile>@upload-file events
// show Radio-Inputs and trigger FileOrNotFile>@upload-file events
if
(
selected
==
"pubmed"
)
{
if
(
selected
==
"pubmed"
||
selected
==
"istext"
)
{
console
.
log
(
"show the button
"
)
console
.
log
(
"show the button
for: "
+
selected
)
$
(
"#pubmedcrawl"
).
css
(
"visibility"
,
"visible"
);
$
(
"#pubmedcrawl"
).
css
(
"visibility"
,
"visible"
);
$
(
"#pubmedcrawl"
).
show
();
$
(
"#pubmedcrawl"
).
show
();
$
(
"#file_yes"
).
click
();
$
(
"#file_yes"
).
click
();
...
@@ -414,7 +457,7 @@
...
@@ -414,7 +457,7 @@
return
data
;
return
data
;
}
}
function
test
Ajax
(
query
)
{
function
test
PUBMED
(
query
)
{
LastData
=
[]
LastData
=
[]
if
(
!
query
||
query
==
""
)
return
;
if
(
!
query
||
query
==
""
)
return
;
var
pubmedquery
=
encodeURIComponent
(
query
)
var
pubmedquery
=
encodeURIComponent
(
query
)
...
@@ -450,7 +493,7 @@
...
@@ -450,7 +493,7 @@
success
:
function
(
data
)
{
success
:
function
(
data
)
{
console
.
log
(
"ajax_success: in testISTEX()"
)
console
.
log
(
"ajax_success: in testISTEX()"
)
console
.
log
(
data
)
console
.
log
(
data
)
location
.
reload
();
//
location.reload();
},
},
error
:
function
(
result
)
{
error
:
function
(
result
)
{
console
.
log
(
"in testISTEX(). Data not found"
);
console
.
log
(
"in testISTEX(). Data not found"
);
...
...
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