Skip to content

Commit 17d63fb

Browse files
committed
add url to export endpoint; cleanup
1 parent e4720b6 commit 17d63fb

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

server/services/exportMetadata.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,6 @@ function export($export_format, $metadata_json) {
3434
header('Content-type: text/plain');
3535
}
3636

37-
// $origin = $_SERVER['HTTP_ORIGIN'];
38-
// $allowed_domains = [
39-
// 'http://openknowledgemaps.org',
40-
// 'https://openknowledgemaps.org',
41-
// 'http://dev.openknowledgemaps.org',
42-
// 'https://dev.openknowledgemaps.org'
43-
// ];
44-
45-
// if (in_array($origin, $allowed_domains)) {
46-
// header('Access-Control-Allow-Origin: ' . $origin);
47-
// }
48-
4937
$result = json_decode($result["result"], true);
5038
echo $result["export"];
5139

server/workers/api/src/apis/export.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ def transform2bibtex(metadata):
1515
# use different field for ID
1616
title = metadata.get("title", "")
1717
author = metadata.get("authors", "")
18-
abstract = metadata.get("abstract", "")
1918
year = metadata.get("year", "")
2019
doi = metadata.get("doi", "")
2120
id = metadata.get("id", "")
2221
published_in = metadata.get("published_in", "")
22+
url = metadata.get("list_link", {}).get("address", "")
2323
fields = {
2424
"title": title,
2525
"author": author,
26-
"abstract": abstract,
2726
"year": year,
2827
"doi": doi,
2928
"published_in": published_in,
29+
"url": url,
3030
"ENTRYTYPE": "article",
3131
"ID": id
3232
}

0 commit comments

Comments
 (0)