Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
RKWard
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Education
RKWard
Commits
3ad2f4c1
Verified
Commit
3ad2f4c1
authored
Oct 11, 2018
by
m.eik michalke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added rk.check_for_pandoc() function to rkward package
parent
e3a256dc
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
57 additions
and
0 deletions
+57
-0
rkward/rbackend/rpackages/rkward/NAMESPACE
rkward/rbackend/rpackages/rkward/NAMESPACE
+1
-0
rkward/rbackend/rpackages/rkward/R/rk.check_for_pandoc.R
rkward/rbackend/rpackages/rkward/R/rk.check_for_pandoc.R
+27
-0
rkward/rbackend/rpackages/rkward/man/rk.check_for_pandoc.Rd
rkward/rbackend/rpackages/rkward/man/rk.check_for_pandoc.Rd
+29
-0
No files found.
rkward/rbackend/rpackages/rkward/NAMESPACE
View file @
3ad2f4c1
...
...
@@ -57,6 +57,7 @@ export(rk.askYesNo)
export(rk.assign.preview.data)
export(rk.call.plugin)
export(rk.capture.output)
export(rk.check_for_pandoc)
export(rk.clear.plot.history)
export(rk.demo)
export(rk.describe.alternative)
...
...
rkward/rbackend/rpackages/rkward/R/rk.check_for_pandoc.R
0 → 100644
View file @
3ad2f4c1
#' Check for pandoc installation and its features
#'
#' This function looks for a pandoc installation and if found, gathers information
#' on its path, supported output formats, and the version number. It has no parameters.
#'
#' @return A named list with at least the boolean element \code{available}, and if
#' that is \code{TRUE}, also the character vectors \code{path}, \code{output_formats}, and \code{version}.
#' @author Meik Michalke \email{rkward-devel@@kde.org}
#' @seealso \code{\link{rk.sessionInfo}}
#' @keywords utilities misc
#' @export
#' @rdname rk.check_for_pandoc
#' @examples
#'
#' rk.check_for_pandoc()
"rk.check_for_pandoc"
<-
function
(){
pandoc
<-
list
(
available
=
FALSE
)
pandoc_path
<-
Sys.which
(
"pandoc"
)[[
"pandoc"
]]
if
(
!
""
%in%
pandoc_path
){
pandoc
[[
"path"
]]
<-
pandoc_path
pandoc
[[
"available"
]]
<-
TRUE
pandoc
[[
"output_formats"
]]
<-
system
(
"pandoc --list-output-formats"
,
intern
=
TRUE
)
pandoc
[[
"version"
]]
<-
gsub
(
"[[:space:]]*pandoc[[:space:]]*"
,
""
,
system
(
"pandoc --version"
,
intern
=
TRUE
)[
1
])
}
else
{}
return
(
pandoc
)
}
rkward/rbackend/rpackages/rkward/man/rk.check_for_pandoc.Rd
0 → 100644
View file @
3ad2f4c1
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rk.check_for_pandoc.R
\name{rk.check_for_pandoc}
\alias{rk.check_for_pandoc}
\title{Check for pandoc installation and its features}
\usage{
rk.check_for_pandoc()
}
\value{
A named list with at least the boolean element \code{available}, and if
that is \code{TRUE}, also the character vectors \code{path}, \code{output_formats},
and \code{version}.
}
\description{
This function looks for a pandoc installation and if found, gathers information
on its path, supported output formats, and the version number. It has no parameters.
}
\examples{
rk.check_for_pandoc()
}
\seealso{
\code{\link{rk.sessionInfo}}
}
\author{
Meik Michalke \email{rkward-devel@kde.org}
}
\keyword{misc}
\keyword{utilities}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment