news2rss: Generate RSS feeds from R NEWS files

Description Usage Arguments Value Examples

Description

This function should take either HTML or Rd files and return a valid RSS 2.0 XML file.

Usage

1
2
3
news2rss(news, rss = NULL, html = NULL, encoding = "UTF-8",
  channel = c(title = "", link = "", description = "", language = "", atom =
  ""))

Arguments

news

Character string, path to the R NEWS file to be converted.

rss

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

html

Logical, whether news is in HTML or Rd format. If NULL, guess this from the file ending.

encoding

Character string, how the feed is encoded.

channel

A named character vector with information on this RSS feed:

title:

Title of the feed, probably the package name.

link:

URL to the package web page, e.g. its repository site.

description:

Descriptions of the feed, e.g. the package.

language:

Optional, a valid RSS language code, see http://www.rssboard.org/rss-language-codes.

atom:

Optional, full URL to the RSS feed on the web, used for atom:link rel="self".

Value

No return value, writes a file or to stdout()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
channel.info <- c(
  title="roxyPackage",
  link="http://R.reaktanz.de/pckg/roxyPackage",
  description=roxyPackage:::pckg.dscrptn[["Description"]],
  atom="http://R.reaktanz.de/pckg/roxyPackage/rss.xml")
rss.tree <- news2rss("~/R/roxyPackage/NEWS.Rd",
  channel=channel.info)

## End(Not run)

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