-
Notifications
You must be signed in to change notification settings - Fork 0
/
publications_old.html
executable file
·143 lines (102 loc) · 4.62 KB
/
publications_old.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
---
layout: default
---
<a id="publications"></a><h1>Journal Publications</h1>
<div>
<!-- <p id="test">trying to fix the mathjax</p></br> -->
<p id="demo"></p></br>
</div>
<script>
var HttpClient = function() {
this.get = function(aUrl, aCallback) {
var anHttpRequest = new XMLHttpRequest();
anHttpRequest.onreadystatechange = function() {
if (anHttpRequest.readyState == 4
&& anHttpRequest.status == 200){ aCallback(anHttpRequest.responseText); }
}
anHttpRequest.open( "GET", aUrl, false );
anHttpRequest.send( null );
}
}
for(year = 2020; year >= 2010; year--){
writeString = "</br><h2>== ";
writeString = writeString.concat( year.toString() );
writeString = writeString.concat(" =======================================</h2></br>");
client = new HttpClient();
//url = 'https://inspirehep.net//search?p=find+a+J.J.Dudek.2+and+jy+2017&of=recjson&ot=authors,title,publication_info,doi';
//url =
'https://inspirehep.net//search?p=find+author:dudek+and+aff+william+or+author:shanahan+and+aff+william+and+jy+';
url = 'https://old.inspirehep.net/search?ln=en&ln=en&p=';
if(year >= 2019){
url = url.concat('find+%28a+orginos+or+a+J.J.Dudek.2+or+a+monahan+or+a+c.e.carlson.1%29+and+tc+p+and+jy+');
}
else if(year >= 2017){
url = url.concat('find+%28a+orginos+or+a+J.J.Dudek.2+or+a+c.e.carlson.1%29+and+jy+');
}
else{
url = url.concat('find+%28a+orginos+or+a+c.e.carlson.1%29+and+jy+');
}
//url = 'https://inspirehep.net/search?ln=en&ln=en&p=find+%28a+orginos+or+a+shanahan+or+a+dudek+or+a+carlson%29+and+aff+william+and+jy+';
url = url.concat( year.toString() );
url = url.concat('&of=recjson&ot=authors,title,publication_info,doi');
client.get(url,
function(response) {
yearList = JSON.parse(response);
for (var pub = 0; pub < yearList.length; pub++) {
writeString = writeString.concat("<b>");
writeString = writeString.concat(JSON.stringify(yearList[pub]["title"]["title"],null,2));
writeString = writeString.concat("</b></br>");
etAl = false;
if (yearList[pub]["authors"].length <= 9){ authsToShow = yearList[pub]["authors"].length; }
else { authsToShow = 1; etAl = true; }
writeString = writeString.concat("<i>");
for (var auth = 0; auth < authsToShow; auth++ ){
nameString = JSON.stringify(yearList[pub]["authors"][auth]["first_name"],null,2);
nameString = nameString.concat(" ")
nameString = nameString.concat(JSON.stringify(yearList[pub]["authors"][auth]["last_name"],null,2));
writeString = writeString.concat(nameString);
if (authsToShow > 1){
if (auth < (authsToShow-2)){
writeString = writeString.concat(", ");
}
if (auth == authsToShow -2){
writeString = writeString.concat(" and ")
}
}
} //next author
if(etAl){ writeString = writeString.concat(" et.al."); }
writeString = writeString.concat("</i></br>");
writeString = writeString.replace(/"/g,"");
if (JSON.stringify(yearList[pub]["publication_info"],null,2) != "null"){
if (yearList[pub]["publication_info"]["title"] != null){
journalString = JSON.stringify(yearList[pub]["publication_info"]["title"],null,2);
journalString = journalString.concat(" ");
journalString = journalString.concat(JSON.stringify(yearList[pub]["publication_info"]["volume"],null,2));
journalString = journalString.concat(", ");
journalString = journalString.concat(JSON.stringify(yearList[pub]["publication_info"]["pagination"],null,2));
journalString = journalString.concat(" (");
journalString = journalString.concat(JSON.stringify(yearList[pub]["publication_info"]["year"],null,2));
journalString = journalString.concat(")");
}
}
journalString = journalString.replace(/"/g,"");
doiString = JSON.stringify(yearList[pub]["doi"],null,2);
doiString = doiString.replace(/"/g,"");
linkString = "<a href=\"http:\/\/dx.doi.org\/\"";
linkString = linkString.concat(doiString);
linkString = linkString.concat("\">");
linkString = linkString.concat(journalString);
linkString = linkString.concat("<\/a>");
writeString = writeString.concat(linkString);
writeString = writeString.concat("</br>--</br>");
} //next publication
//to wipe out latex chars
//writeString = writeString.replace(/\$/g,"");
//writeString = writeString.replace(/\\/g,"");
//writeString = writeString.concat("<\/p>");
}); //end the client get function
//replace double backslash with single backslash
writeString = writeString.replace(/\\\\/g,"\\");
document.getElementById("demo").innerHTML += writeString;
};//NEXT YEAR
</script>