Skip to content
Permalink
Browse files

convertion between .Rmd, .R. and .mm

New Functions: r2rmd(), rmd2r(), r2mm(), mm2r().
  • Loading branch information...
Peng Zhao
Peng Zhao committed Nov 16, 2018
1 parent 555e546 commit e82538b89421c314d1612affd2b24a62d4274165
@@ -1,11 +1,13 @@
Package: mindr
Version: 1.1.7
Date: 2018-10-25
Version: 1.1.8
Date: 2018-11-16
Title: Convert Files Between Markdown or Rmarkdown Files and Mindmaps
Author: Peng Zhao
Maintainer: Peng Zhao <pzhao@pzhao.net>
Depends: R (>= 3.0.0)
Imports: htmlwidgets
Imports:
htmlwidgets,
knitr
Suggests:
Description: Convert Markdown ('.md') or Rmarkdown ('.Rmd') files into FreeMind mindmap ('.mm') files, and vice versa. FreeMind mindmap ('.mm') files can be opened by or imported to common mindmap software such as 'FreeMind' (<http://freemind.sourceforge.net/wiki/index.php/Main_Page>) and 'XMind' (<http://www.xmind.net>).
License: MIT + file LICENSE
@@ -8,8 +8,12 @@ export(md2mm)
export(md2r)
export(mdtxt2mmtxt)
export(mm2md)
export(mm2r)
export(outline)
export(r2md)
export(r2mm)
export(r2rmd)
export(renderMarkmap)
export(rmd2r)
export(tree2mm)
import(htmlwidgets)
@@ -81,6 +81,26 @@ get_heading <- function(pattern = '^#+ ', text){
return(grep(pattern = pattern, x = text))
}

#' get the headings out of given strings
#'
#' @param pattern The definition of the headings
#' @param text the given strings
#'
#' @return integer. the index of the headings in the given strings.
get_heading2 <- function(pattern = '^#= #+ ', text){
return(grep(pattern = pattern, x = text))
}

#' get the headings out of given strings
#'
#' @param pattern The definition of the headings
#' @param text the given strings
#'
#' @return integer. the index of the headings in the given strings.
get_heading3 <- function(pattern = "^#' #+ ", text){
return(grep(pattern = pattern, x = text))
}

#' get the body out of given strings
#'
#' @param pattern The definition of the body text

0 comments on commit e82538b

Please sign in to comment.
You can’t perform that action at this time.