Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
100 commits
Select commit Hold shift + click to select a range
daf6726
export endpoint draft
chreman Dec 7, 2021
8c6b4cc
export endpoint draft
chreman Dec 7, 2021
71e64aa
no header for no download endpoint
chreman Dec 8, 2021
d2f6ea4
Merge branch 'export-endpoint' of https://github.com/OpenKnowledgeMap…
chreman Dec 8, 2021
0a1c75c
updated exportMetadata.php; first draft of export endpoint
chreman Dec 9, 2021
fbf27d9
Merge remote-tracking branch 'upstream/export-endpoint' into export-e…
chreman Dec 9, 2021
9ac8e9f
Merge remote-tracking branch 'upstream/export-endpoint' into export-e…
chreman Dec 15, 2021
3b99c35
Merge remote-tracking branch 'upstream/master' into export-endpoint
chreman Dec 15, 2021
7c5bcfc
first version of paper export button
Konstiman Dec 21, 2021
6c7e2a6
tracking all copy buttons and download button
Konstiman Dec 21, 2021
f92b6ec
added tests for export modal
Konstiman Dec 21, 2021
15f4c27
Merge remote-tracking branch 'upstream/interface-changes-export' into…
chreman Feb 2, 2022
91b6011
cleanup
chreman Feb 2, 2022
c205d3f
Merge branch 'scaling-upgrades-M2' into export-endpoint
chreman Feb 2, 2022
dfbc349
add export endpoint to API
chreman Feb 2, 2022
b326415
upgrade requirements
chreman Feb 2, 2022
1000081
update endpoint
chreman Feb 2, 2022
a9c5792
list: added first two document types to tags
Konstiman Feb 3, 2022
b63f4c2
integrate export endpoint
chreman Feb 3, 2022
8760114
Merge remote-tracking branch 'upstream/dev' into dev
chreman Feb 3, 2022
1789ee5
base update
chreman Feb 4, 2022
c7975c9
Merge branch 'master' into export-endpoint
chreman Feb 4, 2022
c0b7bda
clean up export integration
chreman Feb 6, 2022
6584261
correct output format
chreman Feb 7, 2022
456f1e1
first version of paper export button
Konstiman Dec 21, 2021
0064301
tracking all copy buttons and download button
Konstiman Dec 21, 2021
179f927
added tests for export modal
Konstiman Dec 21, 2021
8126503
changed the export endpoint address
Konstiman Feb 7, 2022
62d8184
Merge branch 'export-endpoint' into interface-changes-export-new
Konstiman Feb 7, 2022
4671227
support for application/x-www-form-urlencoded
Konstiman Feb 7, 2022
e4720b6
enabled the download button
Konstiman Feb 7, 2022
17d63fb
add url to export endpoint; cleanup
chreman Feb 8, 2022
74b71c7
rename journal field in export endpoint
chreman Feb 8, 2022
0ea5143
Merge branch 'dev' into interface-changes-doctypes
Konstiman Feb 9, 2022
ca7bc15
Merge branch 'dev' into interface-changes-export-new
Konstiman Feb 16, 2022
0b30afb
export feature configurable by parameter
Konstiman Feb 16, 2022
ef602e0
Merge branch 'interface-changes-export-new' of https://github.com/Ope…
chreman Feb 16, 2022
bfc2ca1
improve resulttype mapping in bibtex
chreman Feb 16, 2022
9604a91
bibtex fields cleanup
chreman Feb 17, 2022
bed457e
Merge branch 'interface-changes-doctypes' into interface-changes-expo…
Konstiman Feb 17, 2022
c612467
remove confusing misc fallback
chreman Feb 17, 2022
fa41ced
fix export bug
chreman Feb 21, 2022
d8cdf45
Merge branch 'interface-changes-export-new' of https://github.com/Ope…
chreman Feb 22, 2022
837a4e3
Merge origin/interface-changes-export-new into interface-changes-css
tanteuschi Mar 8, 2022
879470f
Look and feel update includes e.g.:
tanteuschi Mar 8, 2022
2e31ecb
Look and feel update includes e.g.:
tanteuschi Mar 8, 2022
1329e91
Look and feel update includes e.g.:
tanteuschi Mar 9, 2022
c35b40b
Look and feel update includes e.g.:
tanteuschi Mar 9, 2022
fe74de7
Look and feel update includes e.g.:
tanteuschi Mar 10, 2022
e14cd3f
Look and feel update includes e.g.:
tanteuschi Mar 10, 2022
d5cb758
Look and feel update includes e.g.:
tanteuschi Mar 10, 2022
d7c2f41
Look and feel update includes e.g.:
tanteuschi Mar 10, 2022
c970d0e
Look and feel update includes e.g.:
tanteuschi Mar 16, 2022
911a24d
Updates include:
tanteuschi Mar 22, 2022
80de80d
Updates include:
tanteuschi Mar 22, 2022
4ea0082
Merge branch 'dev' into interface-changes-css
Konstiman Mar 28, 2022
c6231b6
more info modals bugfixes & formatting
Konstiman Mar 28, 2022
8b10321
minor UX changes: CSS, icons, abbreviations
Konstiman Mar 28, 2022
8590eb4
proper abstract abbreviation using line-clamp
Konstiman Mar 28, 2022
092579a
paper tag changes: new icons, layout, case
Konstiman Mar 28, 2022
60dfbaf
changed the dropdown icons to chevrons
Konstiman Mar 28, 2022
db42ca0
customized the list toggle label
Konstiman Mar 29, 2022
31fb364
new twitter and email sharing buttons
Konstiman Mar 29, 2022
6e6640c
minor fixes
Konstiman Mar 29, 2022
4876434
implemented the export error message
Konstiman Mar 30, 2022
4ee6f5f
Merge branch 'dev' into interface-changes-css
Konstiman Mar 30, 2022
042d13e
fixed tests
Konstiman Mar 30, 2022
5cd6563
export endpoint bugfixes
chreman Apr 8, 2022
1609b36
silly bug
chreman Apr 8, 2022
53f3dbb
another silly bug
chreman Apr 10, 2022
c40d7b6
bugfix
chreman Apr 10, 2022
7b05e12
Merge pull request #639 from OpenKnowledgeMaps/interface-changes-expo…
Konstiman Apr 11, 2022
0fb611e
Merge branch 'interface-changes-css' into interface-changes-export-new
Konstiman Apr 11, 2022
002cab8
export improvement date fields
chreman Apr 12, 2022
c15e9e1
add timezone conversion
chreman Apr 12, 2022
3881942
Merge pull request #640 from OpenKnowledgeMaps/interface-changes-expo…
Konstiman Apr 12, 2022
02aa9d8
paper title now displays date in UTC
Konstiman Apr 15, 2022
ce09471
list & modals minor UI changes
Konstiman Apr 20, 2022
d6600b6
changed the way doi link is built
Konstiman Apr 21, 2022
5d37a2b
updated test snapshots
Konstiman Apr 21, 2022
ed9ba31
security update 2022-04
Konstiman Apr 21, 2022
80bef98
improved event tracking in context line
Konstiman Apr 26, 2022
d8530a6
added labels and new icons into buttons and tags
Konstiman Apr 26, 2022
b93f931
fixed query parsing and highlight bugs
Konstiman Apr 27, 2022
1f5e428
fixed sorting bug caused by leading whitespaces
Konstiman Apr 27, 2022
90c5157
Merge branch 'interface-changes-export-new' into interface-changes-ex…
chreman Apr 29, 2022
58b7fed
export endpoint format changes
chreman Apr 29, 2022
6d08edd
improve error handling
chreman May 2, 2022
94ec294
showing list on paper select + date console log
Konstiman May 2, 2022
d0f8ddf
Merge remote-tracking branch 'upstream/interface-changes-export-new' …
chreman May 2, 2022
e10f947
improve error handling
chreman May 2, 2022
b5c3e4b
Merge pull request #643 from OpenKnowledgeMaps/interface-changes-expo…
Konstiman May 2, 2022
3cd3722
fixed highlight in quotes
Konstiman May 3, 2022
30f2f1b
Merge remote-tracking branch 'upstream/dev' into dev
chreman May 3, 2022
dc5df4f
added some datamanager unit tests
Konstiman May 3, 2022
e07a313
Merge pull request #641 from OpenKnowledgeMaps/security-update-2022-04
Konstiman May 4, 2022
6dac77b
Merge pull request #623 from OpenKnowledgeMaps/interface-changes-expo…
Konstiman May 5, 2022
17f89cd
Update CHANGELOG.md
Konstiman May 5, 2022
1364059
add new BASE error
chreman May 5, 2022
46418db
Merge pull request #646 from OpenKnowledgeMaps/base_xml_error
chreman May 5, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
},
env: {
browser: true,
node: true,
es6: true,
},
settings: {
Expand Down
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Changelog

## 2022-05-05

### New features

- Added export to BibTex for each paper (frontend interface & backend endpoint).
- Added BASE document type tags with icons.
- New share buttons.

### Changes

- New look and feel (design & CSS changes).

### Security

- Periodical npm security update.

## 2022-03-28

### Changes
Expand Down
6 changes: 4 additions & 2 deletions examples/project_website/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@
<script>
data_config.files = [{
//title: "digital education",
title: "calcium",
//title: "calcium",
title: "production",
//file: "./data/digital-education.json"
file: "./data/calcium.json"
//file: "./data/calcium.json",
file: "./data/production.json"
}]
data_config.server_url = window.location.href.replace(/[^/]*$/, '') + "./headstart/server/";
</script>
Expand Down
9 changes: 0 additions & 9 deletions examples/project_website/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2591,15 +2591,6 @@ time {
margin-bottom: 0px;
}

.citation {
display: inline-block;
padding: 10px;
background-color: rgba(239,243,244,1);
hyphens: none;
border-radius: 3px;
-moz-border-radius: 3px;
}

.overflow-vis {
overflow-y: hidden;
}
Expand Down
5 changes: 4 additions & 1 deletion examples/project_website/data-config_base.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var data_config = {
context_most_relevant_tooltip: true,

embed_modal: true,
share_modal: true,
share_modal: false,

doi_outlink: true,
filter_menu_dropdown: true,
Expand All @@ -46,4 +46,7 @@ var data_config = {

highlight_query_terms: true,
show_context_oa_number: false,

show_twitter_button: true,
show_email_button: true,
};
10 changes: 10 additions & 0 deletions examples/project_website/data/production.json

Large diffs are not rendered by default.

36 changes: 18 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"doc": "doc"
},
"scripts": {
"test": "jest",
"test": "TZ='Europe/Vienna' jest",
"dev": "webpack --progress --watch --mode=development",
"prod": "webpack --progress",
"start": "webpack serve --progress --mode=development --env publicPath=http://localhost:8080/dist/",
Expand Down
3 changes: 3 additions & 0 deletions server/preprocessing/other-scripts/utils.R
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,9 @@ detect_error <- function(failed, service) {
if (grepl("xml_find_first", failed$query_reason, fixed=TRUE)){
reason <- c(reason, 'API error: BASE not reachable')
}
if (grepl("read_xml.raw", failed$query_reason, fixed=TRUE)){
reason <- c(reason, 'API error: BASE not reachable')
}
}
if (length(reason) == 0 && service == 'pubmed') {
if (startsWith(failed$query_reason, "HTTP failure: 500") && grepl("error forwarding request", failed$query_reason, fixed=TRUE)){
Expand Down
44 changes: 44 additions & 0 deletions server/services/exportMetadata.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php

require_once dirname(__FILE__) . '/../classes/headstart/library/CommUtils.php';
require_once dirname(__FILE__) . '/../classes/headstart/library/APIClient.php';
require_once dirname(__FILE__) . '/../classes/headstart/library/toolkit.php';
use headstart\library;

function export($export_format, $metadata_json) {
$INI_DIR = dirname(__FILE__) . "/../preprocessing/conf/";
$ini_array = library\Toolkit::loadIni($INI_DIR);
$apiclient = new \headstart\library\APIClient($ini_array);


$payload = $metadata_json;
#$res = $apiclient->call_persistence("export/" . $export_format, $payload);
$res = $apiclient->call_api("export/" . $export_format, $payload);
return $res;
};

$json = $_POST['paper'];
$format = (isset($_REQUEST['format'])) ? $_REQUEST['format'] : "bibtex";
$download = (isset($_REQUEST['download'])) ? $_REQUEST['download'] : false;
$result = export($format, $json);

if (isset($result["status"]) && $result["status"] === "error") {
header('Content-type: application/json');
echo json_encode($result);
}

if ($format == "bibtex") {
$format = "bib";
}

if (isset($download) & $download==true ) {
header('Content-type: application/text');
header('Content-Disposition: attachment; filename=metadata.' . $format);
} else {
header('Content-type: text/plain');
}

$result = json_decode($result["result"], true);
echo $result["export"];

?>
1 change: 1 addition & 0 deletions server/workers/api/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ pandas
pyyaml
flasgger
psycopg2-binary
bibtexparser
Loading