report_git: Create a summary report of a git repository

Description Usage Arguments Details

View source: R/reports.R

Description

Producing a summary report of a repo.

Usage

1
2
3
4
report_git(path = ".", output_file = NULL,
  output_format = "html_document",
  template = "gitsum::repo_summary_simple", input_file = NULL,
  directory = "gitsum", cached = TRUE, .libpath_index = 1)

Arguments

path

The path to the git directory one wants to create summaries for.

output_file

The name of the output file. If using NULL then the output filename will be based on filename for the input file. If a filename is provided, a path to the output file can also be provided. Note that the output_dir option allows for specifying the output file path as well, however, if also specifying the path, the directory must exist. If output_file is specified but does not have a file extension, an extension will be automatically added according to the output format. To avoid the automatic file extension, put the output_file value in I(), e.g., I('my-output').

output_format

The R Markdown output format to convert to. The option "all" will render all formats defined within the file. The option can be the name of a format (e.g. "html_document") and that will render the document to that single format. One can also use a vector of format names to render to multiple formats. Alternatively, you can pass an output format object (e.g. html_document()). If using NULL then the output format is the first one defined in the YAML frontmatter in the input file (this defaults to HTML if no format is specified there).

template

the template file to be used. Either one from a package (e.g. gitsum::repo_summary_simple), or a user defined template, which is then indicated with a path to this file including extension, i.e. /users/xzy/a_template.Rmd.

input_file

the name of the temporary file that contains log data on which the report is base on. If NULL, a log file is created according to path, otherwise, a file is read.

directory

A directory to which the reports should be stored.

cached

Whether or not the report should be cached with rmarkdown, so the graphs are written to a file.

.libpath_index

index of the Library according to base::libPaths in which the template should be searched. The list with the available directories is returned invisibly for situations in which .libPaths() cannot be emulated.

Details

Other packages can define templates. They must be store an .Rmd template in inst/report_templates. The data passed to the report template is log, the parsed log table.


lorenzwalthert/gitsum documentation built on Jan. 17, 2021, 9:34 p.m.