cl2news: Convert ChangeLog/NEWS into NEWS.Rd

View source: R/cl2news.R

cl2newsR Documentation

Convert ChangeLog/NEWS into NEWS.Rd

Description

This function attempts to translate ASCII ChangeLog (or NEWS) files into NEWS.Rd files.

Usage

cl2news(log, news = NULL, codify = TRUE, overwrite = TRUE)

Arguments

log

Character string, path to the ChangeLog or NEWS file to be converted.

news

Character string, path to the NEWS.Rd file to be written. If NULL, results are written to stdout().

codify

Logical, whether to try to detect code snippets like function names and markup them accordingly.

overwrite

Logical, whether to overwrite an existing NEWS.Rd file.

Details

This should work for ChangeLog and NEWS files that

  1. have entries named "Changes in version <version number>" (and optionally a YYYY-MM-DD date string afterwards)

  2. have single changes properly itemized, by indentation and then either "o", "-" or "*" followed by space

  3. optionally have categories as subsections, like "Fixed" or "Added"

Any text string that isn't indented and doesn't start with "Changes in version" will likely be treated as a subsection. The ChangeLog related functions and methods of this package, e.g. initChangeLog, are a convenient way to maintain R ChangeLogs in a proper format.

This function is basically a wrapper for the internal function tools:::news2Rd.

Value

No return value, writes a file.

See Also

initChangeLog, readChangeLog, updateChangeLog, writeChangeLog

Examples

## Not run: 
cl2news(log="~/myFiles/myRPackage/ChangeLog", news="~/myFiles/myRPackage/inst/NEWS.Rd")

# use capture.output() to dump the results into a character vector
NEWS.object <- capture.output(cl2news(log="~/myFiles/myRPackage/ChangeLog"))

## End(Not run)

unDocUMeantIt/roxyPackage documentation built on March 9, 2023, 6:31 p.m.