new_post_from_ipynb: Creates a new Blogdown Post from a Jupyter Notebook

Description Usage Arguments Value See Also

View source: R/convert_ipynb_to_blogdown.R

Description

Creates a new blogdown post and appends the jupyter notebook content as Rmd-style text. The notebook gets transformed into a runnable Rmd with python chunks.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
new_post_from_ipynb(
  ipynb_file,
  chunk_options = "",
  python_path = reticulate::py_config()$python,
  title = "",
  kind = "",
  open = interactive(),
  author = getOption("blogdown.author"),
  categories = NULL,
  tags = NULL,
  date = Sys.Date(),
  file = NULL,
  slug = NULL,
  title_case = getOption("blogdown.title_case"),
  subdir = getOption("blogdown.subdir", "post"),
  ext = getOption("blogdown.ext", ".Rmd")
)

Arguments

ipynb_file

path to the jupyter notebook

chunk_options

global chunk options as charachter vector. Passes options to knitr::opts_chunk$set(). Defaults to ""

python_path

python path as string for reticulate. Defaults to the one detected by reticulate::py_config()

title

title of the markdown. Defaults to the name of the notebook

kind

content type to create

open

whether to open the generated file after creation

author

author.

categories

character vector of category names

tags

character vector of tag names

date

date of the post. Defaults to Sys.Date()

file

filename of the post. Will be automatically generated by default from the title

slug

slug of the post. Also automatically generated by default from the title

title_case

function to convert the title to title case

subdir

if specified the post will be generated in a subdirectoy of 'content/'

ext

extension of the generated file. Defaults to .Rmd

Value

Returns the file name of the newly generated file.

See Also

blogdown::new_post() for which this function is a wrapper.


corriebar/corrieaaR documentation built on Feb. 18, 2020, 9:33 a.m.