Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

2.) We'll be using the "blogbackup" example in the Blogapps project (based originally on the source code for from the RSS and Atom in Action book) to do a Roller backup. Do an SVN checkout of the examples:

...

3.) In src/org/blogapps/blogbackup/blogbackup.java, place in the following line at line #43. It will skip any blog entries in draft status (i.e., those that haven't been published yet), avoiding an NPE two lines later in the code. (There's a JIRA item pending to make this change to the SVN trunk.)

BlogEntry entry = (BlogEntry)entries.next();
Date pubDate = entry.getPublicationDate();
if (pubDate == null) continue; <-- add this line
SimpleDateFormat format8 = new SimpleDateFormat("yyyyMMdd-HHmm");
String dateString = format8.format(pubDate);

...