cl2news | R Documentation |
This function attempts to translate ASCII ChangeLog (or NEWS) files into NEWS.Rd files.
cl2news(log, news = NULL, codify = TRUE, overwrite = TRUE)
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 |
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. |
This should work for ChangeLog and NEWS files that
have entries named "Changes in version <version number>" (and optionally a YYYY-MM-DD date string afterwards)
have single changes properly itemized, by indentation and then either "o"
,
"-"
or "*"
followed
by space
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
.
No return value, writes a file.
initChangeLog
,
readChangeLog
,
updateChangeLog
,
writeChangeLog
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.