Monday, 29 April 2002
If you're not familiar with Frontier or Radio, just ignore the rest of this post… it probably won't make much sense!
Almost there, but I'm stuck. I figured out a way to embed #directives in an OPML file so they aren't visible, but ran into problems calling Radio's rendering scripts from the saveWindow callback.
radio.webServer.setTemplate refers to pta^.path, but radio.html.publishStaticPage doesn't set the 'path' attribute of the pagetable, and it circumvents any attempt I make to set a pagetable. I should have checked this before carefully constructing a fake pagetable to pass it… as is, the only way to insert directives is by modifying radio.data.website.[“#prefs”], which is horribly ugly. radio.data.website is the fake website framework root in which Radio pages get rendered (always in the same place, radio.data.website.default) before being upstreamed.
It turns out publishStaticPage is only called from a try within a webserver request. This may indeed be a dead codepath, and any exceptions caused thereby are simply ignored.
More digging to commence next weekend. I should probably start with radio.upstream.getUpstreamText, which is definitely called, and write the file into the www directory myself, letting the standard upstream mechanism deal with it. However, writing rendered files into the www directory is against the philosophy of Radio as I see it, so it's an ugly hack at best.
Or, perhaps, I could do the opposite: upstream the OPML file by somehow turning off #flRender, and letting regular upstreaming handle everything else.
Thanks to my sustained hacking effort, I didn't get a chance to convert the icons. That I can do tomorrow, though…