#!/usr/bin/perl -w
# $Id: testrss,v 1.1 2005/09/15 19:53:49 ianb Exp $
# Ian Beckwith <ianb@nessie.mcc.ac.uk>
#

use strict;
use XML::PFIF;
use XML::PFIF::Person;
use XML::PFIF::Note;

my $p=new XML::PFIF::Person;

print $p->start_xml();


$p->person_record_id("salesforce.com/a0030000001TRYR");
$p->entry_date("2005-09-03T09:21:12Z");
$p->author_name("Bill Mandil");
$p->author_email("bmd67893\@example.com");
$p->author_phone("(555) 258-6902");
$p->source_name("salesforce.com");
$p->source_date("2005-09-03T09:21:12Z");
$p->source_url("http://www.salesforce.com/person/a0030000001TRYR");
$p->first_name("KATHERINE");
$p->last_name("DOE");
$p->home_city("TUSCALOOSA");
$p->home_state("AL");
$p->home_neighborhood("");
$p->home_street("COTTON LANE");
$p->home_zip("94305");
$p->photo_url("http://flickr.com/photo/12345678.jpg");
my $other=<<'EOT';

description:
    Dark hair, in her late thirties.
    Also goes by the names "Kate" or "Katie".
salesforce.com/gender: female
salesforce.com/company: Generic Savings Bank
EOT
$p->other($other);


my $n=$p->add_note();

$n->note_record_id("salesforce.com/00N30000000tO5N");
$n->entry_date("2005-09-03T20:52:25Z");
$n->author_name("Jane Peters");
$n->author_email("jp123\@example.com");
$n->author_phone("(555) 493-2342");
$n->source_date("2005-09-03T20:52:25Z");
$n->found("true");
$n->email_of_found_person("katie_doe\@randomsite.biz");
$n->phone_of_found_person("(555) 904-9095");
$n->last_known_location("on a cot somewhere, AstroDome, Houston TX");
$n->text("\nI spoke to Katie on the phone today at around noon EST.\n".
	"She is tired and worried but otherwise okay.\n");

print $p->start_rss();
print $p->start_channel({title=>"SalesForce People Finder RSS Feed",
			 description=>"",
			 lastBuildDate=> $p->now(),
			 link=>"http://www.afallstardjs.com/salesforce-feed.php"});

print $p->to_rss();



$p=new XML::PFIF::Person({person_record_id=>"icrc.org/162537",
			  entry_date=>"2005-09-03T23:00:00Z",
			  author_name=>"Mary Jacobs",
			  author_email=>"mdj\@geocities.com",
			  author_phone=>"(555) 736-1148",
			  source_name=>"ICRC FamilyLinks",
			  source_date=>"2005-09-03T22:07:59Z",
			  source_url=>"http://www.familylinks.icrc.org/example?id=162537",
			  first_name=>"JOHN",
			  last_name=>"DOE",
			  home_city=>"NEW ORLEANS",
			  home_state=>"LA",
			  home_neighborhood=>"HERRINGBONE PARISH",
			  home_street=>"CHESTNUT",
			  home_zip=>"80540",
			  other=>"\nautomated-pfif-author: RCScraper 0.4, http://example.org/rcscraper\n".
			      "icrc.org/birthdate: 1976-02-26\n"});
$p->add_note({note_record_id=>"icrc.org/162537.1",
	      entry_date=>"2005-09-03T23:00:00Z",
	      author_name=>"Mary Jacobs",
	      author_email=>"mdj\@geocities.com",
	      author_phone=>"(555) 736-1148",
	      source_date=>"2005-09-03T22:07:59Z",
	      found=>"false",
	      last_known_location=>"at home in New Orleans",
	      text=>"\nIf you have any information on John, please contact me.\n"});


print $p->to_rss();
print $p->end_channel();
print $p->end_rss();

