-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOverHAL.js
More file actions
42 lines (39 loc) · 1.74 KB
/
OverHAL.js
File metadata and controls
42 lines (39 loc) · 1.74 KB
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
/*
* OverHAL - Convertissez vos imports éditeurs en TEI - Convert your publisher imports to TEI
*
* Copyright (C) 2023 Olivier Troccaz (olivier.troccaz@cnrs.fr) and Laurent Jonchère (laurent.jonchere@univ-rennes.fr)
* Released under the terms and conditions of the GNU General Public License (https://www.gnu.org/licenses/gpl-3.0.txt)
*
* Scripts
*/
function majReqHAL() {
//var reqHAL = document.getElementById("reqHAL").value;
var team = document.getElementById("team").value;
if(document.getElementById("aparai").checked == true){
var aparai = "%20OR%20inPress_bool:%22true%22";
}else{
var aparai = "%20AND%20NOT%20inPress_bool:%22true%22";
}
var year1 = document.getElementById("year1").value;
var year2 = document.getElementById("year2").value;
var iann = year1;
var year = "&fq=(";
year += 'producedDate_tdate:['+year1+'-01-01T00:00:00Z%20TO%20'+year2+'-12-31T23:59:59Z]%20OR%20publicationDate_tdate:['+year1+'-01-01T00:00:00Z%20TO%20'+year2+'-12-31T23:59:59Z]';
year += aparai+")";
var txtint = "";
var txtintplus = "";
if(document.getElementById("txtint").checked == true){
txtint = "%20AND%20NOT%20docType_s:UNDEFINED%20AND%20(submitType_s:file%20OR%20arxivId_s:?*)";
txtintplus = ",arxivId_s";
}
var hal = "https://api.archives-ouvertes.fr/search/?q=collCode_s:";
hal += '\"'+team+'\"';
//hal += "&fq=";
hal += year;
hal += txtint;
//hal += aparai;
hal += "&rows=10000&fl=docType_s,docid,halId_s,authFullName_s,title_s,subTitle_s,journalTitle_s,volume_s,issue_s,page_s,producedDateY_i,proceedings_s,files_s,label_s,citationFull_s,bookTitle_s,doiId_s,conferenceStartDateY_i,publisherLink_s,seeAlso_s";
hal += txtintplus;
document.getElementById("reqHAL").value = hal;
//alert(reqHAL);
}