Description: Mediawikir class can be used to post the output of an R script directly into a mediawiki instance. Batchator class allows batch page creation.
#' The template should contain occurrences of the fields defined in the content file.}
#' \item{\code{loadContent(file_path)}}{Takes the path to a csv file that contains both the list of fields used in the templates (1st line)
#' AND the data for each of those fields (following lines).}
#' \item{\code{applyTemplate()}}{Applies the templates defined using loadTemplate, setPageNamePattern to the data loaded with loadContent.
#' \item{\code{applyTemplate()}}{Applies the templates defined using \code{loadTemplate}, \code{setPageNamePattern} to the data loaded with \code{loadContent}.
#' It should be noted that if the page exists it is replaced.}
#' \item{\code{modifyWikiTemplateAttributes(file_path)}}{Reads file_path and replaces in each page listed in the Page column the content
#' first occurence of each field with the corresponding value.
#'
#' \strong{Warning:} This function is dependant on \code{\link{replaceSingleLineTemplateField}}, which is very basic.}
@@ -45,8 +45,12 @@ Uses \link{Mediawikir} to create/edit a batch of mediawiki pages
The template should contain occurrences of the fields defined in the content file.}
\item{\code{loadContent(file_path)}}{Takes the path to a csv file that contains both the list of fields used in the templates (1st line)
AND the data for each of those fields (following lines).}
\item{\code{applyTemplate()}}{Applies the templates defined using loadTemplate, setPageNamePattern to the data loaded with loadContent.
\item{\code{applyTemplate()}}{Applies the templates defined using \code{loadTemplate}, \code{setPageNamePattern} to the data loaded with \code{loadContent}.
It should be noted that if the page exists it is replaced.}
\item{\code{modifyWikiTemplateAttributes(file_path)}}{Reads file_path and replaces in each page listed in the Page column the content
first occurence of each field with the corresponding value.
\strong{Warning:} This function is dependant on \code{\link{replaceSingleLineTemplateField}}, which is very basic.}
}
}
...
...
@@ -71,5 +75,10 @@ Uses \link{Mediawikir} to create/edit a batch of mediawiki pages
#"One","numbers","Awful Owen","Carlos"
#"One","numbers","Black Betty","Carla"
#3 pages are created in this example…
batchata$modifyWikiTemplateAttributes("list.csv")
#content of "list.csv"
#"Page","Att1","Att2"
#2204,"New value for att1","New value for att2"
#"Help:full/page/Name","New value for att1","New value for att2"