Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
UGL
website
Commits
192f4c7f
Commit
192f4c7f
authored
Apr 30, 2021
by
Sini
Browse files
Update using the Recent ExcelSheet
parent
bc34e13e
Pipeline
#3321
passed with stage
in 24 seconds
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
public/content/Citation
Sheet2.xlsx
→
public/content/CitationSheet2.xlsx
View file @
192f4c7f
File moved
public/content/CitationSheet3.xlsx
0 → 100644
View file @
192f4c7f
File added
public/js/citationSheetParse.js
View file @
192f4c7f
...
@@ -9,7 +9,7 @@ var bit1stAuthorLN ="";
...
@@ -9,7 +9,7 @@ var bit1stAuthorLN ="";
/* set up XMLHttpRequest */
/* set up XMLHttpRequest */
var
url
=
"
./content/CitationSheet.xlsx
"
;
var
url
=
"
./content/CitationSheet
3
.xlsx
"
;
var
xmlHttpRequest
=
new
XMLHttpRequest
();
var
xmlHttpRequest
=
new
XMLHttpRequest
();
xmlHttpRequest
.
open
(
"
GET
"
,
url
,
true
);
xmlHttpRequest
.
open
(
"
GET
"
,
url
,
true
);
xmlHttpRequest
.
responseType
=
"
arraybuffer
"
;
xmlHttpRequest
.
responseType
=
"
arraybuffer
"
;
...
@@ -33,9 +33,13 @@ xmlHttpRequest.onload = function (e) {
...
@@ -33,9 +33,13 @@ xmlHttpRequest.onload = function (e) {
var
worksheet
=
workbook
.
Sheets
[
first_sheet_name
];
var
worksheet
=
workbook
.
Sheets
[
first_sheet_name
];
var
jsonOutput
=
XLSX
.
utils
.
sheet_to_json
(
worksheet
);
var
jsonOutput
=
XLSX
.
utils
.
sheet_to_json
(
worksheet
);
// console.log(jsonOutput);
for
(
i
=
0
;
i
<
jsonOutput
.
length
;
i
++
)
{
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
bibAuthors
;
var
item
=
{
var
item
=
{
"
item
"
:
{
"
item
"
:
{
...
@@ -48,9 +52,21 @@ xmlHttpRequest.onload = function (e) {
...
@@ -48,9 +52,21 @@ xmlHttpRequest.onload = function (e) {
"
name
"
:
"
journal
"
,
"
name
"
:
"
journal
"
,
"
volume
"
:
""
,
"
volume
"
:
""
,
"
year
"
:
""
,
"
year
"
:
""
,
"
month
"
:
""
,
"
pages
"
:
""
"
pages
"
:
""
},
},
"
DOI
"
:
""
"
conference
"
:{
"
name
"
:
""
,
"
place
"
:
""
,
"
date
"
:
""
},
"
DOI
"
:
""
,
"
publisher
"
:
""
,
"
type
"
:
""
,
"
project
"
:
""
,
"
reviewed
"
:
""
,
"
open
"
:
""
},
},
"
links
"
:
{
"
links
"
:
{
"
pdf
"
:
""
,
"
pdf
"
:
""
,
...
@@ -107,11 +123,24 @@ xmlHttpRequest.onload = function (e) {
...
@@ -107,11 +123,24 @@ xmlHttpRequest.onload = function (e) {
item
[
"
item
"
].
journal
.
name
=
jsonOutput
[
i
].
Journal
;
item
[
"
item
"
].
journal
.
name
=
jsonOutput
[
i
].
Journal
;
item
[
"
item
"
].
journal
.
volume
=
jsonOutput
[
i
].
Volume
;
item
[
"
item
"
].
journal
.
volume
=
jsonOutput
[
i
].
Volume
;
item
[
"
item
"
].
journal
.
year
=
jsonOutput
[
i
].
Year
;
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
"
].
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
[
"
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
"
].
url
=
jsonOutput
[
i
].
URL
;
item
[
"
links
"
].
demo
=
jsonOutput
[
i
].
URL
;
item
[
"
links
"
].
demo
=
jsonOutput
[
i
].
Demo
;
//// BibTex /////////////////////
//// BibTex /////////////////////
item
[
"
bibtex
"
]
=
"
@article{
"
+
bit1stAuthorLN
+
jsonOutput
[
i
].
Year
+
"
,
"
+
item
[
"
bibtex
"
]
=
"
@article{
"
+
bit1stAuthorLN
+
jsonOutput
[
i
].
Year
+
"
,
"
+
...
@@ -119,7 +148,7 @@ xmlHttpRequest.onload = function (e) {
...
@@ -119,7 +148,7 @@ xmlHttpRequest.onload = function (e) {
"
},author={
"
+
bibAuthors
.
trim
().
substring
(
0
,
bibAuthors
.
trim
().
lastIndexOf
(
"
"
))
+
"
},author={
"
+
bibAuthors
.
trim
().
substring
(
0
,
bibAuthors
.
trim
().
lastIndexOf
(
"
"
))
+
"
},journal={
"
+
jsonOutput
[
i
].
Journal
+
"
},journal={
"
+
jsonOutput
[
i
].
Journal
+
"
},volume={
"
+
jsonOutput
[
i
].
Volume
+
"
},volume={
"
+
jsonOutput
[
i
].
Volume
+
// "},number={"+
n
umber
// "},number={"+
jsonOutput[i].N
umber
"
},pages={
"
+
jsonOutput
[
i
].
Pages
+
"
},pages={
"
+
jsonOutput
[
i
].
Pages
+
"
},year={
"
+
jsonOutput
[
i
].
Year
+
"
},year={
"
+
jsonOutput
[
i
].
Year
+
"
},DOI ={
"
+
jsonOutput
[
i
].
DOI
+
"
},DOI ={
"
+
jsonOutput
[
i
].
DOI
+
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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