Type: Package
Title: Convert NEWS File to RSS Feed
Version: 0.9-4
Date: 2022-10-08
Description: Utilities to convert the NEWS file of an installed package to an RSS feed.
Maintainer: Enrico Schumann <es@enricoschumann.net>
Imports: datetimeutils, stats, textutils, utils
Suggests: digest
License: GPL-3
URL: http://enricoschumann.net/R/packages/NEWSRSS/
NeedsCompilation: no
Packaged: 2024-04-07 16:33:22 UTC; es19
Author: Enrico Schumann ORCID iD [aut, cre]
Built: R 4.5.0; ; 2024-04-07 16:33:22 UTC; unix

Parse GNU/Emacs-style ChangeLog File

Description

Read and parse an Emacs ChangeLog file.

Usage

ChangeLog(file)

Arguments

file

character. The path to the ChangeLog file.

Details

The function is not very lenient: it expects the standard format.

Value

A list of lists; each ‘inner’ list contains information about an entry

date

entry date

author

the name of the author

email

the email address of the author

txt

the actual txt

Author(s)

Enrico Schumann

References

GNU coding standards http://www.gnu.org/prep/standards/standards.html#Change-Logs

GNU coding standards http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Change-Log

Examples

## Not run: 
file <- "http://enricoschumann.net/R/packages/NMOF/ChangeLog"
ChangeLog(file)

## End(Not run)

Convert NEWS File to RSS Feed

Description

Convert package NEWS file to RSS items.

Usage

news_to_rss(package, file = NULL,
            guid = function(version, date, ...)
                            paste0(package, "_", version, "_", date),
            link,
            guid.digest = FALSE,
            guid.isPermaLink = FALSE,
            ...)

rss_feed(items, title, description, language,
         link, atom.href, copyright)

Arguments

package

character

file

character

guid

a function: the first two arguments are the version and date as specified in the NEWS file

link

character. For rss_feed, the URL of the feed. For news_to_rss, item-specific links.

items

character. The items of the feed, in XML markup.

title

character

description

character

language

character

copyright

character

atom.href

character. See http://www.rssboard.org/rss-profile#namespace-elements-atom-link

guid.digest

logical: use digest package to compute guid?

guid.isPermaLink

logical

...

more arguments

Details

Converts the NEWS file of an R package and converts the NEWS entries into an RSS feed (i.e. XML format).

Value

character vector

Author(s)

Enrico Schumann

See Also

news

Examples



out.file <- tempfile()
require("NEWSRSS")
copyright <- "Copyright 2015, Enrico Schumann"
title <- "NMOF &#8211; Numerical Methods and Optimization in Finance"
link <- "http://enricoschumann.net/R/packages/NMOF/"

description <- "News about package NMOF"
language <- "en-gb"
atom.href <- "http://enricoschumann.net/R/packages/NMOF/NMOF_news.xml"


cat(rss_feed(news_to_rss("NMOF", link = link), title, description,
             language, link, atom.href, copyright),
    file = out.file)

## pretty print with 'xmllint'
## system("xmllint -o ~/ESdotnet/R/packages/NMOF/NMOF_news.xml --format ~/tmp/NMOF_news.xml")