readChangeLog: Read/write ChangeLog files

Description Usage Arguments Details Value See Also Examples

Description

These functions ans methods can be used to manage ChangeLog files.

Usage

1
2
3
4
5
6
7
8
9
readChangeLog(file, head = "ChangeLog for package",
  change = "changes in version", item = "  -")

writeChangeLog(log, file = NULL, head = "ChangeLog for package",
  change = "changes in version", item = "  -", lineEnd = 78)

initChangeLog(entry = list(changed = c("initial release"), fixed =
  c("missing ChangeLog")), package = "unknown", version = "0.01-1",
  date = Sys.Date())

Arguments

file

Character string, path to the ChangeLog file to read.

head

Character string, the headline text of the ChangeLog file (without the package name).

change

Character string, the text introducing each ChnageLog entry for a package version.

item

Character string, the text marking each entry item.

log

An object of class ChangeLog.

lineEnd

Integer number, indicates where to do line breaks.

entry

A (named) list of character vectors. The element names will become the ChangeLog sections, each vector element an item.

version

Character string, version number to look up.

date

The date of the ChangeLog entry in YYYY-MM-DD format. will be coerced into character. To keep the date stamp of a present entry, set date=NULL.

package

Character string, the package name.

Details

The ChangeLog files used for R packages are usually required to have a standard format, if they are supposed to be parsed by functions like tools::news2Rd:

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

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

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

readChangeLog tries to read a given ChangeLog file and parse its content to generate a special ChangeLog object.

writeChangeLog takes such a ChangeLog object to write it back to a file. If file=NULL, the log will be returned to stdout.

initChangeLog generates a ChangeLog object from scratch, e.g., to get started with a new package.

Value

An object of class ChangeLog.

See Also

getChangeLogEntry, updateChangeLog

Examples

1
2
3
4
## Not run: 
changelog <- readChangeLog("/home/user/myRsources/myRpackage/ChangeLog")

## End(Not run)

saurfang/roxyPackage documentation built on May 29, 2019, 3:20 p.m.