- Timestamp:
- 05/27/13 15:54:30 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BookmarkApp.pm
r38 r39 236 236 require XML::Atom::Entry; 237 237 require XML::Atom::Link; 238 require XML::Atom::Category; 238 239 239 240 my $feed = XML::Atom::Feed->new; … … 257 258 $entry->id($bookmark->bookmark_uri->canonical); 258 259 $entry->title($bookmark->title); 260 259 261 my $link = XML::Atom::Link->new; 260 262 $link->href($bookmark->uri); 261 263 $entry->add_link($link); 264 262 265 $entry->summary('Tags: ' . join(', ', @{ $bookmark->tags })); 266 267 my $cdatetime = time2isoz $bookmark->ctime; 263 268 my $mdatetime = time2isoz $bookmark->mtime; 264 269 # make the timestamp W3C-correct 265 $mdatetime =~ s/ /T/; 270 s/ /T/ foreach ($cdatetime, $mdatetime); 271 $entry->published($cdatetime); 266 272 $entry->updated($mdatetime); 273 274 for my $tag (@{ $bookmark->tags }) { 275 my $category = XML::Atom::Category->new; 276 $category->term($tag); 277 $entry->add_category($category); 278 } 279 267 280 $feed->add_entry($entry); 268 281 }
Note: See TracChangeset
for help on using the changeset viewer.