% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/individual.R
\name{md2dir}
\alias{md2dir}
\title{Create hierarchical directories according to (R) Markdown-syntax text}
\usage{
md2dir(
  from = NA,
  dir_to = "mindr",
  md_list = FALSE,
  md_bookdown = TRUE,
  dir_quiet = FALSE
)
}
\arguments{
\item{from}{Character. The source text of the (R) Markdown syntax text, the R code, the FreeMind mind map code, or the path to the directory.}

\item{dir_to}{Character. The path of the output directory.}

\item{md_list}{Logical. whether to process lists like headings in the Markdown input.}

\item{md_bookdown}{Logical. Whether the R Markdown syntax text is in bookdown style, i.e. \code{# (PART), # (APPENDIX)}, and \code{# References} as an upper level of the Level 1 heading.}

\item{dir_quiet}{Logical. Whether to display the results of generated directories.}
}
\value{
Directories generated.
}
\description{
Create hierarchical directories according to (R) Markdown-syntax text
}
\examples{
output <- file.path(tempdir(), "mindr")
md2dir(c("# a", "## a1", "## a2"), output)
message("Output: ", output)
# unlink(output, recursive = TRUE) # remove the output file

input <- system.file("examples/mindr-md.Rmd", package = "mindr")
input_txt <- readLines(input, encoding = "UTF-8")
output <- file.path(tempdir(), "mindr")
md2dir(from = input_txt, output)
message("Input:  ", input, "\nOutput: ", output)
# file.show(input) # Open the input file unlink(output, recursive = TRUE) #
# remove the output file

md2dir(from = input_txt, output, md_list = TRUE)
}
