#' Paste Kindle notes in an elegant way
#'
#' @return Character.
#' @author Jiaxiang Li
#'
#' @importFrom stringr str_remove_all
#' @importFrom clipr read_clip
#' @export
#' @examples
#' \donttest{paste_kindle()}
paste_kindle <- function() {
text <-
clipr::read_clip() %>%
.[1] %>%
stringr::str_remove_all('[:space:]')
insert_lines(text)
write_bottom_line(text)
}
#' Paste Apple Book's notes in an elegant way
#'
#' @return Character.
#' @author Jiaxiang Li
#'
#' @importFrom stringr str_remove_all str_subset
#' @importFrom clipr read_clip
#' @export
#' @examples
#' \donttest{paste_apple_book()}
paste_apple_book <- function() {
text <-
clipr::read_clip() %>%
stringr::str_subset("Apple\\sBooks\\.\\s$", negate = TRUE) %>%
stringr::str_remove("^\u201c") %>%
stringr::str_remove("\u201d$")
insert_lines(text)
write_bottom_line(text)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.