# -*-Perl-*- ####################################################################### ### $Id: exportopml.txt,v 1.6 2006/06/03 08:21:25 mate Exp $ ### package exportopml; use strict; ####################################################################### # CONFIGURATION my $EXPORT_URL = 'http://rpc.bloglines.com/listsubs'; my $DATA_DIR = $Bloglines::DATA_DIR || '.'; ####################################################################### $EXPORT_URL = $Bloglines::EXPORT_URL if defined $Bloglines::EXPORT_URL; sub setup { push @Bloglines::OPTIONS, "exportopml"; 1; } sub teardown { return unless exists $Bloglines::OPTCTL{exportopml}; my $file = "$DATA_DIR/exportopml"; $Bloglines::do_request->($EXPORT_URL, "$file.wrk") or warn("Can't request"), return; unlink "$file.old"; rename $file, "$file.old"; rename "$file.wrk", $file; open(F, $file) or warn("Can't open $file: $!"), return; warn("No XML formatted file: $file") if unpack("a6", ) ne 'yutaka@asmate.netE This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The updated version is available from http://www.asmate.net/software/perl/bloglines/plugins/ =cut