Skip to content

Commit b570dc0

Browse files
committed
linkAbstract.R: PMC: improve section formatting by at least forcing paragraph breaks; but still bad because rentrez deletes section headers, filed bug: ropensci/rentrez#170
1 parent 801deea commit b570dc0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

build/linkAbstract.R

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# LinkAbstracter
44
# Author: gwern
55
# Date: 2019-08-29
6-
# When: Time-stamp: "2021-01-20 11:18:51 gwern"
6+
# When: Time-stamp: "2021-04-11 12:29:25 gwern"
77
# License: CC-0
88
#
99
# Read a PLOS or PMCID URL, and return the parsed fulltext as newline-delimited Title/Author/Date/DOI/Abstract.
@@ -99,7 +99,6 @@ if (grepl("plos",args)) {
9999

100100
# DOIs are optional since so many fulltext PMC papers are still missing them
101101
if (any(c(is.list(title), is.list(author), is.list(date), is.list(abstract)))) {
102-
103102
# fallback to the other fulltext/rentrez path:
104103

105104
pmid <- entrez_search(db = "pubmed", term = pmcidSearch)$ids
@@ -127,6 +126,6 @@ if (grepl("plos",args)) {
127126
cat(c(author, "\n"))
128127
cat(c(as.character(date), "\n"))
129128
if (is.list(doi)) { cat("\n"); } else { cat(c(doi, "\n")) }
130-
cat(c(abstract, "\n"))
129+
cat(paste0(abstract, sep="\n\n"))
131130

132131
}

0 commit comments

Comments
 (0)