| Path: | news2atom |
| Last Update: | Wed Jan 24 12:20:13 +0200 2007 |
Generates Atom from a NEWS file.
The idea is to take a pretty normal NEWS file for a piece of software and generate valid Atom from it. It probably doesn‘t quite suit the format you have selected for your NEWS file and it probably can generate invalid Atom under some circumstances, but mostly it should be ok. Buyer beware.
Of course there‘s nothing inherently software news related in this. You are free to use it for your blog or anything else if you feel like it.
The expected format of the file is:
isodate1 title1 indented news item content for the first entryin a format that can be converted to HTML isodate2 title2 the second entry
etc.
At the moment, the only supported HTML-exporting format is SimpleMarkup (rdoc.sourceforge.net/doc/files/markup/simple_markup_rb.html).
isodate is a date (and optionally time) in (roughly) the ISO 8601 format. That is, the following, among others, are acceptable time stamps:
If you try hard enough, it‘s very likely you will be able to confuse it.
After the first whitespace character(s) on the line, the rest is taken to be the news entry title.
The date must start from the first column.
The news item body must be indented by one (and exactly one, everything after that is considered to be part of the text to be fed to the converter) whitespace character, and will be run through a converter that generates XHTML. It can span multiple lines, as long as all the lines are indented. The only supported format, at the moment, is SimpleMarkup.
Mandatory options are:
| —title: | The title of the generated feed. |
| —author: | The name to use as the author of the feed. |
| —project-tag: | The tagging entity (that is, the "identifier,date" part) of the TAG URIs (RFC4151) this generator creates. This must be either an email address or a domain name. |
| —file: | The NEWS file to process. |
Optionally you can add:
| —subtitle: | The subtitle of the generated feed |
| —author-email: | The email address for the author of the feed. |
| —location: | The URI of this feed, that is, where on the web the generated file can be found. |
| —tag-prefix: | A string to use as a prefix for the "specific" part of the TAG URIs. |
The project-tag and tag-prefix options work like this:
—project-tag=example.org,2006-10 —tag-prefix=ExampleProject
You can specify any of the above options, except file, in the input file. The file can contain anywhere in it lines like this:
news2atom title=The title to use
etc. See the news2atom NEWS file for an example.
| Homepage: | www.juripakaste.fi/news2atom/ |
| News: | www.juripakaste.fi/news2atom/news.atom |
| Download: | www.juripakaste.fi/store/dl/news2atom/ |
Copyright (c) 2006 Juri Pakaste
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.