XML::Generator::BostonGlobe - generate SAX2 events for bostonglobe.com documents
use XML::Generator::BostonGlobe; use XML::SAX::Writer; use XML::Filter::Data::Indenter;
use IO::AtomicSimple; use Date::Simple;
my $date = Date::Simple->new();
my $io = IO::AtomicFile->open("/some/file","w"); my $writer = XML::SAX::Writer->new(Output=>$io); my $handler = XML::Filter::DataIndenter->new(Handler=>$writer);
my $globe = XML::Generator::BostonGlobe->new(Handler=>$handler); my $ok = $globe->fetch($date);
if ($ok) { $io->close(); }
Generate SAX2 events for bostonglobe.com documents.
It's not at all clear what the exact Terms of Usage are for the Boston Globe. However since every article is copyrighted the New York Times, this software is meant for personal use only, in accordance with the New York Times terms of usage :
"You may download or copy the Content and other downloadable items displayed on the Service for personal use only, provided that you maintain all copyright and other notices contained therein. Copying or storing of any Content for other than personal use is expressly prohibited without prior written permission from The New York Times Rights and Permissions Department, or the copyright holder identified in the copyright notice contained in the Content."
http://www.nytimes.com/ref/membercenter/help/agree.html#sect2
Play nicely.
This package generates DocBook SAX2 events with either a book or an article root element.
Book widgets contain the following elements :
+ book + bookinfo - title - pubdate + part (+) + partinfo - title + xref (+) @linkend + article (+)
Article widgets contain the following elements :
+ article @id + articleinfo - title + keywordset (not yet, anyway) - keyword + indexterm (not yet, anyway) @ type - primary + authorgroup - corpauthor OR + author - surname - firstname - othername (or not) + abstract - para - pubdate + copyright - year - holder - para (+)
new(%args)
0.1
$Date: 2004/07/27 17:27:46 $
Aaron Straup Cope <ascope@cpan.org>
Copyright (c) 2004 Aaron Straup Cope. All Rights Reserved.
This is free software, you may use it and distribute it under the same terms as Perl itself.