Skip to content

Commit

Permalink
Merge pull request #49 from ORCID/plainTextImprovements
Browse files Browse the repository at this point in the history
Suggestions from Laura
  • Loading branch information
lizkrznarich authored Apr 19, 2017
2 parents dfcb2ee + 00a80a6 commit 024b6f0
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions server.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@ function dateToStr(date) {
function smidToTxt(doc) {
if (doc === undefined || doc == null) return null;
var csv = `${rmTab(doc.form.title)}\n`;
csv += 'dateRecorded \towner orcid \towner fullOrcidId \towner name\n';
csv += `${dateToStr(doc.owner.dateRecorded)}\t${doc.owner.orcid}\t${doc.owner.fullOrcidId}\t${rmTab(doc.owner.name)}\n`;
csv += "\n";
csv += "Share my iD results\n";
csv += 'dateRecorded \torcid \tfullOrcidId \tname\n';
csv += `Created by ${doc.owner.name} (${doc.owner.fullOrcidId})\n`;
csv += `\n`;
csv += `Collected iDs as of ${dateToStr(new Date())}\n`;
csv += `Date Collected \tORCID \tFull ORCID iD \tCollected Name\n`;
doc.authenticated_orcids.forEach(function(row) {
csv += `${dateToStr(row.dateRecorded)}\t${row.orcid}\t${row.fullOrcidId}\t${rmTab(row.name)}\n`;
})
Expand Down

0 comments on commit 024b6f0

Please sign in to comment.