| 1 |
README for XML::RSS::SimpleGen |
| 2 |
Time-stamp: "2004-01-17 21:16:50 AST" |
| 3 |
|
| 4 |
[Excerpted from the POD...] |
| 5 |
|
| 6 |
NAME |
| 7 |
XML::RSS::SimpleGen -- for writing RSS files |
| 8 |
|
| 9 |
|
| 10 |
SYNOPSIS |
| 11 |
|
| 12 |
# A complete example screen-scraper and RSS generator here: |
| 13 |
|
| 14 |
use strict; |
| 15 |
use XML::RSS::SimpleGen; |
| 16 |
my $url = q<http://www.exile.ru/>; |
| 17 |
|
| 18 |
rss_new( $url, "eXile", "Moscow-based Alternative Newspaper" ); |
| 19 |
rss_language( 'en' ); |
| 20 |
rss_webmaster( '[email protected]' ); |
| 21 |
rss_twice_daily(); |
| 22 |
|
| 23 |
get_url( $url ); |
| 24 |
|
| 25 |
while( |
| 26 |
m{<h4>\s*<a href='/(.*?)'.*?>(.*?)</a>\s*</h4>\s*<p.*?>(.*?)<a href='/}sg |
| 27 |
) { |
| 28 |
rss_item("$url$1", $2, $3); |
| 29 |
} |
| 30 |
|
| 31 |
die "No items in this content?! {{\n$_\n}}\nAborting" |
| 32 |
unless rss_item_count(); |
| 33 |
|
| 34 |
rss_save( 'exile.rss', 45 ); |
| 35 |
exit; |
| 36 |
|
| 37 |
|
| 38 |
DESCRIPTION |
| 39 |
This module is for writing RSS files, simply. It transparently handles |
| 40 |
all the unpleasant details of RSS, like proper XML escaping, and also |
| 41 |
has a good number of Do-What-I-Mean features, like not changing the |
| 42 |
modtime on a written-out RSS file if the file content hasn't changed, |
| 43 |
and like automatically removing any HTML tags from content you might |
| 44 |
pass in. |
| 45 |
|
| 46 |
This module isn't meant to have the full expressive power of RSS; |
| 47 |
instead, it provides functions that are most commonly needed by |
| 48 |
RSS-writing programs. |
| 49 |
|
| 50 |
[...end pod excerpt] |
| 51 |
|
| 52 |
|
| 53 |
PREREQUISITES |
| 54 |
|
| 55 |
This suite requires perl 5.004 or higher. |
| 56 |
|
| 57 |
|
| 58 |
INSTALLATION |
| 59 |
|
| 60 |
You install XML::RSS::SimpleGen et al, as you would install any Perl module |
| 61 |
library, by running these commands: |
| 62 |
|
| 63 |
perl Makefile.PL |
| 64 |
make |
| 65 |
make test |
| 66 |
make install |
| 67 |
|
| 68 |
If you want to install a private copy of XML::RSS::SimpleGen in your home |
| 69 |
directory, then you should try to produce the initial Makefile with |
| 70 |
something like this command: |
| 71 |
|
| 72 |
perl Makefile.PL PREFIX=~/perl |
| 73 |
|
| 74 |
See perldoc perlmodinstall for more information and advice. |
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
DOCUMENTATION |
| 79 |
|
| 80 |
POD-format documentation is included in XML/RSS/SimpleGen.pm. POD is |
| 81 |
readable with the 'perldoc' utility, like with "perldoc XML::RSS::SimpleGen" |
| 82 |
|
| 83 |
See ChangeLog for recent changes. |
| 84 |
|
| 85 |
|
| 86 |
MACPERL INSTALLATION NOTES |
| 87 |
|
| 88 |
Don't bother with the makefiles. Just make an RSS directory under |
| 89 |
your XML directory under your MacPerl site_lib or lib directory, and |
| 90 |
move SimpleGen.pm into it (the RSS directory, that is). |
| 91 |
|
| 92 |
|
| 93 |
SUPPORT |
| 94 |
|
| 95 |
Questions, bug reports, useful code bits, and suggestions for |
| 96 |
XML::RSS::SimpleGen should just be sent to me at [email protected] |
| 97 |
|
| 98 |
|
| 99 |
AVAILABILITY |
| 100 |
|
| 101 |
The latest version of this suite is available from the |
| 102 |
Comprehensive Perl Archive Network (CPAN). Visit |
| 103 |
<http://www.perl.com/CPAN/> to find a CPAN site near you. |
| 104 |
|