get_TextType {EML}R Documentation

get_TextType

Description

Render a TextType node int HTML or some other format

Usage

get_TextType(node, to = "html", output = tempfile(class(node), fileext =
  paste0(".", to)), view = TRUE)

Arguments

node

any TextType node

to

desired format, default is html, but can be any type supported by pandoc (docx, md, etc)

output

name of the desired output file

view

if HTML, do we want to open result in browser?

Value

creates a file requested.

Examples



## Convert an EML abstract to markdown
f <- system.file("examples/hf205.xml", package = "EML")
eml <- read_eml(f)
abstract <- eml_get(eml, "abstract")
get_TextType(abstract[[1]], "markdown", "abstract.markdown")
readLines("abstract.markdown")
unlink("abstract.markdown") # tidy up

## Turn a docx file into EML abstract and preview at HTML
f <- system.file("examples/hf205-abstract.docx", package = "EML")
a <- as(set_TextType(f), "abstract")
get_TextType(a)



[Package EML version 1.0.3 Index]