diff --git a/public/content/Citation Sheet2.xlsx b/public/content/CitationSheet2.xlsx similarity index 100% rename from public/content/Citation Sheet2.xlsx rename to public/content/CitationSheet2.xlsx diff --git a/public/content/CitationSheet3.xlsx b/public/content/CitationSheet3.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..5502aacdd8f2ae7a1dd4eb34fb43e74bf836458b Binary files /dev/null and b/public/content/CitationSheet3.xlsx differ diff --git a/public/js/citationSheetParse.js b/public/js/citationSheetParse.js index f4e9e4cdd460b8c7c3fc49c9030b55f9173b8994..f174465b94bcce808b5daa38d96ac53e7fd7cc8f 100644 --- a/public/js/citationSheetParse.js +++ b/public/js/citationSheetParse.js @@ -9,7 +9,7 @@ var bit1stAuthorLN =""; /* set up XMLHttpRequest */ -var url = "./content/CitationSheet.xlsx"; +var url = "./content/CitationSheet3.xlsx"; var xmlHttpRequest = new XMLHttpRequest(); xmlHttpRequest.open("GET", url, true); xmlHttpRequest.responseType = "arraybuffer"; @@ -33,9 +33,13 @@ xmlHttpRequest.onload = function (e) { 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 = jsonOutput[i].Authors.replace("and ", "").trim().split(","); + var authors; + if (jsonOutput[i].Authors != undefined){ + authors = jsonOutput[i].Authors.replace("and ", "").trim().split(","); + } var bibAuthors; var item = { "item": { @@ -48,9 +52,21 @@ xmlHttpRequest.onload = function (e) { "name": "journal", "volume": "", "year": "", + "month": "", "pages": "" }, - "DOI": "" + "conference":{ + "name":"", + "place":"", + "date":"" + }, + "DOI": "", + "publisher":"", + "type":"", + "project":"", + "reviewed":"", + "open":"" + }, "links": { "pdf": "", @@ -107,11 +123,24 @@ xmlHttpRequest.onload = function (e) { item["item"].journal.name = jsonOutput[i].Journal; item["item"].journal.volume = jsonOutput[i].Volume; item["item"].journal.year = jsonOutput[i].Year; + + if (jsonOutput[i].Date != undefined){ + item["item"].journal.month = jsonOutput[i].Date.split(",")[0].trim(); + } + item["item"].journal.pages = jsonOutput[i].Pages; + item["item"].conference.name = jsonOutput[i].Conference; + item["item"].conference.place = jsonOutput[i]["City and Country"] + item["item"].conference.date = jsonOutput[i].Date; + item["item"].publisher = jsonOutput[i].Publisher; + item["item"].type = jsonOutput[i]["Type of Work"]; + item["item"].project = jsonOutput[i].Project; + item["item"].reviewed = jsonOutput[i]["Peer-Reviewed"]; + item["item"].open = jsonOutput[i]["Open Access"]; item["item"].DOI = jsonOutput[i].DOI; - item["links"].pdf = jsonOutput[i].URL; + item["links"].pdf = jsonOutput[i].PDF_Link; item["links"].url = jsonOutput[i].URL; - item["links"].demo = jsonOutput[i].URL; + item["links"].demo = jsonOutput[i].Demo; //// BibTex ///////////////////// item["bibtex"] = "@article{"+ bit1stAuthorLN + jsonOutput[i].Year +","+ @@ -119,7 +148,7 @@ xmlHttpRequest.onload = function (e) { "},author={"+ bibAuthors.trim().substring(0, bibAuthors.trim().lastIndexOf(" ")) + "},journal={"+ jsonOutput[i].Journal + "},volume={"+ jsonOutput[i].Volume + - // "},number={"+ number + // "},number={"+ jsonOutput[i].Number "},pages={"+ jsonOutput[i].Pages + "},year={"+ jsonOutput[i].Year + "},DOI ={"+ jsonOutput[i].DOI+