#!/usr/bin/perl

use File::Navigate;

my $nav = File::Navigate->new('books.txt');

print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
print "<insipid><posts>\n";

while ($nav->next) {
  $nav->getprev();
  $a = $nav->get();
  $a =~ s/"//g;
  $a =~ s/'//g;
  $nav->next();
  $b = $nav->get;
  $nav->next();
  print "<post access_level=\"1\" href=\"$b\" description=\"$a\" tag=\"import\" time=\"2009-05-22T10:47:46Z\" />\n";
}

print "</posts><objects></objects><relationships></relationships><options><option name=\"feed_name\" value=\"rc6.org linkdump\" /><option name=\"site_name\" value=\"rc6.org linkdump\" /><option name=\"public_searches\" value=\"no\" /><option name=\"proxy_host\" value=\"\" /><option name=\"proxy_port\" value=\"3128\" /><option name=\"use_rewrite\" value=\"yes\" /></options></insipid>";
