Commit 150f35b2 authored by Joe TS Dell's avatar Joe TS Dell
Browse files

update

parent 9e9b1e35
Pipeline #4411 passed with stage
in 33 seconds
......@@ -238,51 +238,7 @@
</div>
</div>
</div> -->
<div class="card" style="max-width: 1080px;">
<div class="row">
<div class="col-md-3">
<img src="imgs/publication/3droute.jpg" alt="..." style="width:100%">
</div>
<div class="col-md-9">
<div class="card-body">
<h5 class="card-title" style="margin-bottom:0px">
<small>Santhanavanich, T., Wuerstle, P., Silberer, J., Loidl, V., Rodrigues, P., and Coors, V.</small>
<br>
3D SAFE ROUTING NAVIGATION APPLICATION FOR PEDESTRIANS AND CYCLISTS BASED ON OPEN SOURCE TOOLS
<br>
<small>
<span class="badge badge-pill badge-light">CityGML</span>
<span class="badge badge-pill badge-light">SensorThings API</span>
<span class="badge badge-pill badge-light">Open Geospatial Consortium</span>
<span class="badge badge-pill badge-light">pgRouting</span>
<span class="badge badge-pill badge-light">Warning</span>
</small>
</h5>
<small class="text-muted"> ISPRS Ann. Photogramm. Remote Sens. Spatial Inf. Sci.,
VI-4/W2-2020, 143–147, https://doi.org/10.5194/isprs-annals-VI-4-W2-2020-143-2020
<br>
<button type="button" class="btn btn-outline-success btn-circle"> <i class="far fa-file-pdf"> </i></button>PDF
<button type="button" class="btn btn-outline-danger btn-circle" data-toggle="collapse" data-target="#bibtex-paper-vision" aria-expanded="false" aria-controls="bibtex-paper-vision"> <i class="fas fa-code"></i> </button>BIB
<button type="button" class="btn btn-outline-info btn-circle"> <i class="fas fa-globe"></i> </button>Link
</small>
<pre id="bibtex-paper-vision" class="pre-style collapse">@article{santhanavanich20203d,
title={3D SAFE ROUTING NAVIGATION APPLICATION FOR PEDESTRIANS AND CYCLISTS BASED ON OPEN SOURCE TOOLS.},
author={Santhanavanich, T and Wuerstle, P and Silberer, J and Loidl, V and Rodrigues, P and Coors, V},
journal={ISPRS Annals of Photogrammetry, Remote Sensing \& Spatial Information Sciences},
volume={6},
year={2020}
}
}</pre>
</div>
</div>
</div>
</div>
</div>
<div id="nextblock" class="container" style="margin-top:1em;"><p id="papercount">1 - 6 (45)</p>
......
var item_debug
var item_id = 0
function addpaper(item) {
var new_row = document.getElementById("cont_paper")
......@@ -23,12 +24,8 @@ function addpaper(item) {
authors = authors.substring(0, authors.length - 2);
last_item = item
var PDF_HTML = ''
if ('pdf' in item.links) { // to be replaced by if (item.YouTubelink) or so...
var pdf_link = item.links.pdf // to be replaced by item.pdf_link or so...
PDF_HTML = `<a type="button" href="${pdf_link}" class="btn btn-outline-success btn-circle" target="_blank"> <i class="far fa-file-pdf"> </i></a> PDF `
}
var PDF_HTML = item.links.pdf != "" ? `<a type="button" href="${item.links.pdf}" class="btn btn-outline-success btn-circle" target="_blank"> <i class="far fa-file-pdf"> </i></a> PDF ` : ""
var UrlHTML = ''
if ('url' in item.links) { // to be replaced by if (item.YouTubelink) or so...
var url = item.links.url // to be replaced by item.pdf or so...
......@@ -52,8 +49,8 @@ function addpaper(item) {
doi += `</small>`
}
item_id += 1
var bibtex_content = item.bibtex ? `<button type="button" class="btn btn-outline-danger btn-circle" data-toggle="collapse" data-target="#bibtex-paper-vision-${item_id}" aria-expanded="false" aria-controls="bibtex-paper-vision-${item_id}"> <i class="fas fa-code"></i> </button> Bib <pre id="bibtex-paper-vision-${item_id}" class="pre-style collapse">${item.bibtex}</pre>` : ""
new_row.innerHTML = new_row.innerHTML + '<div class="card" style="max-width: 1080px;">' +
'<div class="row publication_card g-0">' +
'<div class="col-md-3">' +
......@@ -73,21 +70,14 @@ function addpaper(item) {
doi +
'<br>' +
PDF_HTML + ' ' +
//BIBTEX BUTTON
// '<button type="button" class="btn btn-outline-danger btn-circle" data-toggle="collapse" data-target="#bibtex-paper-vision" aria-expanded="false" aria-controls="bibtex-paper-vision"> <i class="fas fa-code"></i> </button>BIB' +
//BIBTEX BUTTON'<button type="button" class="btn btn-outline-danger btn-circle" data-toggle="collapse" data-target="#bibtex-paper-vision" aria-expanded="false" aria-controls="bibtex-paper-vision"> <i class="fas fa-code"></i> </button>BIB' +
UrlHTML +
'</small>' +
// BIBTEX area
// '<pre id="bibtex-paper-vision" class="pre-style collapse">@article{santhanavanich20203d,' +
// 'title={3D SAFE ROUTING NAVIGATION APPLICATION FOR PEDESTRIANS AND CYCLISTS BASED ON OPEN SOURCE TOOLS.},' +
// 'author={Santhanavanich, T and Wuerstle, P and Silberer, J and Loidl, V and Rodrigues, P and Coors, V},' +
// 'journal={ISPRS Annals of Photogrammetry, Remote Sensing \& Spatial Information Sciences},' +
// 'volume={6},' +
// 'year={2020}' +
// '}' +
// '}</pre>' +
bibtex_content +
'</div>' +
'</div>' +
'</div>' +
......
......@@ -158,7 +158,10 @@ xmlHttpRequest.onload = function (e) {
"}}"
jsonContent.push(item);
if ( i == jsonOutput.length - 1) {
console.log("Add the paper ....")
// Start loading/adding the paper content to the page here .....
}
}
//console.log(jsonContent);
......
//
// begining of xlsx to json coversion
//
var jsonContent = [];
var bibAuthors = "";
var bit1stAuthorLN ="";
/* set up XMLHttpRequest */
var url = "./content/CitationSheet_June.xlsx";
var xmlHttpRequest = new XMLHttpRequest();
xmlHttpRequest.open("GET", url, true);
xmlHttpRequest.responseType = "arraybuffer";
xmlHttpRequest.onload = function (e) {
var arraybuffer = xmlHttpRequest.response;
// convert data to binary string //
var data = new Uint8Array(arraybuffer);
var arr = new Array();
for (var i = 0; i != data.length; ++i) arr[i] = String.fromCharCode(data[i]);
var bstr = arr.join("");
// Call XLSX //
var workbook = XLSX.read(bstr, {
type: "binary"
});
// DO SOMETHING WITH workbook HERE //
var first_sheet_name = workbook.SheetNames[0];
// Get worksheet //
var worksheet = workbook.Sheets[first_sheet_name];
var jsonOutput = XLSX.utils.sheet_to_json(worksheet);
// console.log(jsonOutput);
for (i = 0; i < jsonOutput.length; i++) {
var authors;
if (jsonOutput[i].Authors != undefined){
authors = jsonOutput[i].Authors.replace("and ", "").trim().split(",");
}
var bibAuthors;
var item = {
"item": {
"title": "",
"project": "",
"authors": [],
"imageLink": "",
"keywords": "",
"journal": {
"name": "journal",
"volume": "",
"year": "",
"pages": ""
},
"conference":{
"name":"",
"place":"",
"date":""
},
"DOI": "",
"publisher":"",
"type":"",
"project":"",
"reviewed":"",
"open":""
},
"links": {
"pdf": "",
"url": "",
"demo": ""
},
"bibtex" : ""
}
bibAuthors = "";
bit1stAuthorLN ="";
for (j = 0; j < authors.length; j++) {
var author = {
"firstName": "",
"lastName": ""
}
if (authors[j].trim().split(" ").length == 1) {
author["firstName"] = authors[j].trim().split(".")[0];
author["lastName"] = authors[j].trim().split(".")[1];
item["item"].authors.push(author);
bibAuthors+=authors[j].trim().split(".")[1] + ", "+ authors[j].trim().split(".")[0]+ " and ";
} else if (authors[j].trim().split(" ").length == 2) {
author["firstName"] = authors[j].trim().split(" ")[0];
author["lastName"] = authors[j].trim().split(" ")[1];
item["item"].authors.push(author);
bibAuthors+=authors[j].trim().split(" ")[1] + ", "+ authors[j].trim().split(" ")[0]+ " and ";
} else if (authors[j].trim().split(" ").length == 3) {
author["firstName"] = authors[j].trim().split(" ")[0];
author["lastName"] = authors[j].trim().split(" ")[2];
item["item"].authors.push(author);
bibAuthors+=authors[j].trim().split(" ")[2] + ", "+ authors[j].trim().split(" ")[0]+ " and ";
}
}
if (jsonOutput[i].Keywords != undefined) {
item["item"].keywords = jsonOutput[i].Keywords.split(",");
} else {
item["item"].keywords = jsonOutput[i].Keywords;
}
if (authors[0].split(" ").length == 3 ){
bit1stAuthorLN = authors[0].split(" ")[2];
} else if (authors[0].split(" ").length == 2 ){
bit1stAuthorLN = authors[0].split(" ")[1];
} else if (authors[0].split(" ").length == 1 ){
bit1stAuthorLN = authors[0].split(" ")[0];
}
item["item"].title = jsonOutput[i].Titel;
item["item"].project = jsonOutput[i].Project ? jsonOutput[i].Project : ""
item["item"].imageLink = jsonOutput[i]["Path to demo image"] ? jsonOutput[i]["Path to demo image"] : ""
item["item"].journal.name = jsonOutput[i].Journal ? jsonOutput[i].Journal : ""
item["item"].journal.volume = jsonOutput[i].Volume ? jsonOutput[i].Volume : ""
item["item"].journal.year = jsonOutput[i].Year ? jsonOutput[i].Year : ""
item["item"].journal.pages = jsonOutput[i].Pages ? jsonOutput[i].Pages : ""
item["item"].conference.name = jsonOutput[i].Conference ? jsonOutput[i].Conference : ""
item["item"].conference.place = jsonOutput[i]["City and Country"] ? jsonOutput[i]["City and Country"] : ""
item["item"].conference.date = jsonOutput[i].Date ? jsonOutput[i].Date : ""
item["item"].publisher = jsonOutput[i].Publisher ? jsonOutput[i].Publisher : ""
item["item"].type = jsonOutput[i]["Type of Work"] ? jsonOutput[i]["Type of Work"] : ""
item["item"].project = jsonOutput[i].Project ? jsonOutput[i].Project : ""
item["item"].reviewed = jsonOutput[i]["Peer-Reviewed"] ? jsonOutput[i]["Peer-Reviewed"] : ""
item["item"].open = jsonOutput[i]["Open Access"] ? jsonOutput[i]["Open Access"] : ""
item["item"].DOI = jsonOutput[i].DOI ? jsonOutput[i].DOI : ""
item["links"].pdf = jsonOutput[i].PDF_Link ? jsonOutput[i].PDF_Link : ""
item["links"].url = jsonOutput[i].URL ? jsonOutput[i].URL : ""
item["links"].demo = jsonOutput[i].Demo ? jsonOutput[i].Demo : ""
var month = "";
if (jsonOutput[i].Date != undefined){
month = jsonOutput[i].Date.toString().split(",")[0].trim();
}
//// BibTex /////////////////////
item["bibtex"] = "@article{"+ bit1stAuthorLN + jsonOutput[i].Year +","+
"title={"+ jsonOutput[i].Titel +
"},author={"+ bibAuthors.trim().substring(0, bibAuthors.trim().lastIndexOf(" ")) +
"},journal={"+ jsonOutput[i].Journal +
"},volume={"+ jsonOutput[i].Volume +
"},month={"+ month +
"},pages={"+ jsonOutput[i].Pages +
"},year={"+ jsonOutput[i].Year +
"},DOI ={"+ jsonOutput[i].DOI+
"},url ={"+ jsonOutput[i].URL+
"}}"
jsonContent.push(item);
}
//console.log(jsonContent);
}
xmlHttpRequest.send();
// str = str.substring(0, lastIndex);
//
// ending of xlsx to json coversion
//
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment