mkyarr: Create a ReDoc Style 'yarr' Compendium

Description Usage Arguments Details Value Author(s) Examples

View source: R/mkyarr.R

Description

The mkyarr function creates a directory structure for ReDoc style compendia that use yarr for mixing R output with text, or markup (i.e., ReStructuredText or HTML).

Usage

1
2
3
4
5
6
7
8
9
mkyarr(project,
       remote_host="data.vanderbilt.edu",
       remote_user="shotwems",
       remote_path=paste0("/home/ssl/collab/shotwems/",
                          project, "/"),
       remote_url =paste0("https://", remote_host,
                          "/collab/shotwems/",
                          project, "/"),
       verbose=FALSE)

Arguments

project

A character string, the project (and main directory) name

remote_host

A character string, address of remote server where HTML files will be hosted

remote_user

A character string, remote server user name

remote_path

A character string, remote server path for hosted HTML files

remote_url

A character string, remote server URL for hosted HTML files

verbose

A logical, whether mkyarr should be verbose about the files created

Details

The mkyarr function creates a directory structure and template files for projects that utilize a ReDoc (reproducible document) framework. The ReDoc framework uses the Linux utility make to implement build, clean, view, and burn procedures for a reproducible document. The build procedure inputs source documents and renders an output document (an RST/HTML file in this case). The clean procedure removes ancillary files created during the build process. The view procedure opens the output documents for viewing using the appropriate software (i.e., a web browser). And, the burn procedure removes (deletes) output documents. These four procedures implement the classical ReDoc framework. An additional procedure publish is implemented here in order to publish HTML files to a remote web server. The mkyarr function creates a Makefile with each of these five targets. The remote_* arguments to mkyarr supply details related to the publish target. These details and others (e.g., the external programs used to synchronize files with the remote server, and to view web pages) may be modified by editing the resulting Makefile.

The mkyarr function creates the following directories and files:

  1. <project>/main project directory

  2. <project>/MakefileReDoc Makefile

  3. <project>/yarr/yarr subdirectory

  4. <project>/yarr/index.rst.Rtemplate RST yarr file

  5. <project>/html/html subdirectory

  6. <project>/html/cache/html/cache subdirectory

  7. <project>/html/style.cssHTML CSS style file

  8. <project>/data/data subdirectory

  9. <project>/data/cache/data/cache subdirectory

  10. <project>/docs/docs subdirectory

  11. <project>/R/R subdirectory

  12. <project>/R/common.Rcommon R functions

Value

None

Author(s)

Matt Shotwell <Matt.Shotwell@Vanderbilt.edu>

Examples

1
2
3
4
5
6
7
8
    ## Not run: 
        mkyarr("example")
        # from terminal
        # $ cd example
        # $ make build
        # $ make view
    
## End(Not run)

BioStatMatt/yarr documentation built on May 5, 2019, 3:47 p.m.