Skip to content
Snippets Groups Projects
Commit 976c4080 authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

stringr imports + link err correction

parent 5367c3a6
No related branches found
No related tags found
No related merge requests found
Package: mediawikir
Type: Package
Title: Connects to a mediawiki instance and writes in it what you want
Version: 0.1.5
Version: 0.1.6
Author: Mathieu Loiseau
Maintainer: Mathieu Loiseau <loiseaum@univ-grenoble-alpes.fr>
Description: It can be used to post the output of an R script directly into a mediawiki instance
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.
License: MIT
Encoding: UTF-8
LazyData: true
RoxygenNote: 6.0.1
Imports: httr,R6
Imports: httr,R6,stringr
library(R6)
library(httr)
library(stringr)
#'Mediawikir: write R output to mediawiki
#'
......@@ -243,7 +245,6 @@ Mediawikir <- R6Class("Mediawikir",
)
)
library(stringr)
#'Batchator: Batch input to mediawiki based on a csv and a template
#'
#'@docType class
......@@ -259,7 +260,7 @@ library(stringr)
#'@field field_list the list of symbols that will be replaced (the first line of the csv file that will be sent to the Batchator)
#'@field content a matrix of the words that will replace the symbols in the templates (both content and page names — the next lines of the csv file)
#'@examples
#' bachata <- Batchator$new("http://wiki.lezinter.net", "user","pass")
#' bachata <- Batchator$new("http://my.wiki", "user","pass")
#' bachata$loadTemplate("/path/to/template.wiki")
#' bachata$loadContent("/path/to/content.csv")
#' bachata$setPageNamePattern("Project:Media/Sounds/~word~ (~voice_artist~)")
......@@ -288,12 +289,12 @@ library(stringr)
#' \item{\code{pass}}{The user's password}
#' }}
#' \item{\code{loadTemplate(file_path)}}{Takes the path of a text file containing a template that will serve as base
#' for all the pages generated. The template should contain occurrences of the fields defined in the \link{content} file.}
#' for all the pages generated. The template should contain occurrences of the fields defined in the content file.}
#' \item{\code{setPageNamePattern(naming_pattern)}}{Takes a string of the parttern for the page names that will be generated.
#' The template should contain occurrences of the fields defined in the \link{content} file.}
#' 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 \link{loadTemplate}, \link{setPageNamePattern} to the data loaded with \link{loadContent}.}
#' \item{\code{applyTemplate()}}{Applies the templates defined using loadTemplate, setPageNamePattern to the data loaded with loadContent.}
#'}
#'@importFrom stringr str_replace_all
......
......@@ -40,17 +40,17 @@ Uses \link{Mediawikir} to create/edit a batch of mediawiki pages
\item{\code{pass}}{The user's password}
}}
\item{\code{loadTemplate(file_path)}}{Takes the path of a text file containing a template that will serve as base
for all the pages generated. The template should contain occurrences of the fields defined in the \link{content} file.}
for all the pages generated. The template should contain occurrences of the fields defined in the content file.}
\item{\code{setPageNamePattern(naming_pattern)}}{Takes a string of the parttern for the page names that will be generated.
The template should contain occurrences of the fields defined in the \link{content} file.}
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 \link{loadTemplate}, \link{setPageNamePattern} to the data loaded with \link{loadContent}.}
\item{\code{applyTemplate()}}{Applies the templates defined using loadTemplate, setPageNamePattern to the data loaded with loadContent.}
}
}
\examples{
bachata <- Batchator$new("http://wiki.lezinter.net", "user","pass")
bachata <- Batchator$new("http://my.wiki", "user","pass")
bachata$loadTemplate("/path/to/template.wiki")
bachata$loadContent("/path/to/content.csv")
bachata$setPageNamePattern("Project:Media/Sounds/~word~ (~voice_artist~)")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment