| epub_cat {epubr} | R Documentation |
Pretty printing of EPUB text
Description
Print EPUB text to the console in a more readable format.
Usage
epub_cat(
x,
max_paragraphs = 10,
skip = 0,
paragraph_spacing = 1,
paragraph_indent = 2,
section_sep = "====",
book_sep = "====\n===="
)
Arguments
x |
a data frame returned by |
max_paragraphs |
integer, maximum number of paragraphs (non-empty lines) to |
skip |
integer, number of paragraphs to skip. |
paragraph_spacing |
integer, number of empty lines between paragraphs. |
paragraph_indent |
integer, number of spaces to indent paragraphs. |
section_sep |
character, a string to indicate section breaks. |
book_sep |
character, separator shown between books when |
Details
This function prints text from EPUB files to the console using cat.
This is useful for quickly obtaining an overview of the book text parsed by epub that is easier to read that looking at strings in the table.
max_paragraphs is set low by default to prevent accidentally printing entire books to the console.
To print everything in x, set max_paragraphs = NULL.
Value
nothing is returned but a more readable format of the text content for books in x is printed to the console.
See Also
Examples
file <- system.file("dracula.epub", package = "epubr")
d <- epub(file)
epub_cat(d, max_paragraphs = 2, skip = 147)