Vanity Foul
Dedicated to the wanderings of an egotistical mind.


20030824
Sunday August 24, 2003

Atom and Digester

As I mentioned in my previous post, I'm lazy. So I'm using Digester to parse the AtomAPI XML - but its falling down in one regard: <content>can contain <html></content>. And Digester sees this as just more XML, so the contents on the content tag only get assigned if there is no html.

Some general websearching, and searching on the Digester-user list, revealed one other person with a similar concern earlier this year. I've sent him an email, asking if he can supply more information on his solution. If not, or if that doesn't solve the issue, I'm afraid I'll have to resort to "hand-parsing" the AtomAPI. I'm lazy, I don't wanna do that.

But again, it may become necessary as the AtomAPI allows for adding arbitrary vendor-specific tags - <mt:fooBar> for example - and my Digester rules don't cover that at the moment. I do plan on re-expressing the rules via Digester's rules.xml capability though; that may allow for the flexibility necessary....
( Aug 24 2003, 01:30:02 PM ) Atom Permalink Comments [3] [Trackback]



20030823
Saturday August 23, 2003

And then on the Roller site... Since I've begun contributing to Roller I've received a couple attributions. It's always nice to be recognized, but Dave is grand enough to mention each of my contributions.
( Aug 23 2003, 08:12:29 PM ) Technology Permalink [Trackback]



20030822
Friday August 22, 2003

Atom4J

In a definite "me too" bid, I've begun work on making Roller support nEcho/Pie/Atom.

Step one was to allow Roller to emit an Atom feed. Check! When I get to upgrading Vanity Foul tonight you'll be able to get the feed. The content type is application/x.atom-xml so your browser probably won't show it (I had to select a text editor for it).

Next I've begun work on supporting the AtomAPI. That's a lot of XML to process, and I'm lazy. So I've started "Atom4J", an Atom support library for Java (duh!). When it's somewhere approaching usable I'll probably start a SourceForge project (or java.net?).

Currently there are inconsistencies as the "spec" fluxuates almost daily; the current feed spec and the AtomAPI Entry share a passing familiarity but that's about it.

Update: I think I confused the AtomAPI with the Atom feed, and perhaps the content type of the feed should just be text/xml? I cannot find a true defination anywhere, but Roller now conforms to Maximal Atom.
( Aug 22 2003, 06:55:05 PM ) Atom Permalink Comments [1] [Trackback]

For further reading on today's posts:



20030811
Monday August 11, 2003

Re: java.blogs best practices

Oops, I just broke one of them. Since I am just a nobody, no one with the status of Norman Richards (there's another rule broken), I doubt anyone cares, but I prefer the use of "Re:" since it alerts readers to the fact that I am commenting on something they may have seen elsewhere. But now I'm talking about blogging in general aren't I?

Norman, are you chewing gum, or is that your tongue in your cheek?
( Aug 11 2003, 03:14:18 PM ) Entertainment Permalink Comments [4] [Trackback]



20030806
Wednesday August 06, 2003

Re: showRecentEntries()

I finally followed up on myself: I used Terminus' showRecentEntries(), but eased the implementation somewhat. I added the following to the top of my _Weblog page:

#macro( showRecentEntries $maxEntries )
  #set( $map = $vHelper.getRecentWeblogEntries( $maxEntries ) )
  #foreach( $day in $map.keySet() )
    #set( $entries = $map.get($day) )
    #foreach ($var in $entries)
    <a href="$baseURL/page/$userName/#formatDate($plainFormat $var.PubTime )#$var.Anchor">
    - $var.title</a><br/>
    #end
  #end
#end

and then in my navbar I added
<p>Recent Entries<br>
#showRecentEntries ( 5 )</p>

If you compare my version to Terminus's, you'll see I've eliminated the need for a separate page (just put the display into the macro). Someday I'll get around to adding this macro to Roller's stock macros.

Aug 11th: The above should work in Roller 0.9.7 (what is currently running on FreeRoller). I've committed a new macro for 0.9.8 into Roller's cvs (it won't work properly on 0.9.7). Werner, thanks for the kick-in-the-pants!
( Aug 06 2003, 11:26:09 AM ) Roller Permalink Comments [2] [Trackback]

For further reading on today's posts:



20030804
Monday August 04, 2003

Oooh, civil disobedience, courtesy of Russell Beattie. Thanks for pointing out this site. ( Aug 04 2003, 08:12:29 PM ) News Permalink [Trackback]

Re: showRecentEntries() macros for Roller

Most excellent, someone has documented how to display a "Recent Entries" list on their Roller blog. I think some improvements could be made to this (besides incorporating it into Roller), but it'll have to wait until I have some freetime. ( Aug 04 2003, 11:04:47 AM ) Roller Permalink Comments [2] [Trackback]



20030726
Saturday July 26, 2003

Help Name My Son

All votes are non-binding, and of course can be vetoed by Jen or myself.
( Jul 26 2003, 05:20:20 PM ) Personal Permalink Comments [1] [Trackback]

For further reading on today's posts:




archives
links