Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Where's the Keynote perl module?
    • Unfortunately there's a lot more to a presentation than just the bullet points. How are you going to add your company logo in the background or a rotating transparent butterfly? ;-)

      More seriously, there's so much XML in there I don't know where to start. Or if I should do it at all...

      • Wuss!

        My vision is to create a "template" that sets up the basic look of a slide (or slides), and then use Perl to generate all the individual slides. Right now I use a custom program called makeslides to take a text (YAML-ish) outline and creates pretty HTML with CSS etc. It'd be sweet if I could make it generate Keynote presentations too.

        But I'll probably just end up doing as you've apparently done, create a few slides, then pull out the XML I want, and use that as a template.
        • I'd guess that if you're using HTML+CSS, the HTML must be very semantically structured and it'd be trivial to output XML instead. Starting from that, a YourML-to-KeynoteML XSLT should be trivial.

          --

          -- Robin Berjon [berjon.com]

  • [% thingy | html %]

    Will automatically do the > for you, but you knew that.

    Cool hack. Shouldn't you be doing this with SAX though? Just place <acmepresentation:tagname/> in the right place and using a nice filter...
    • Oh, thanks. I'd forgotten about that. I could be using SAX, except SAX is horribly complicated when you're passing things around[1]. Template Toolkit is a tool I know well and I bet you dealing with XML in text blocks is faster than dealing with 500,000 XML events too.

      [1] Stop complaining that I complain about SAX too. It may be simple, but isn't practical.

      • Okay, then you could extract out the text with a XPath statement (using Template::Plugin::XML::LibXML, natch) then rerender it through a VIEW. At least this way you won't be screwed when apple decide to put a [% in their template ;-).

        Hmm, you could do a presentation on that itself. "How I created this presentation: A fully recursive talk".

    • TBH I'm not sure that SAX would be a good idea to do that. SAX is meant to be low-level, and works marvels at that. It's as close as you can get to XML without going lexical. Anyone using it for higher-level things will find it impractical, and rightly so.

      Other XML-orientated options that would be fit here could be XSLT (which acme also hates) or a number of modules from Barrie Slaymaker that deal with SAX at higher levels (eg XML::Essex or XML::Filter::Dispatcher).

      --

      -- Robin Berjon [berjon.com]

  • I'm finding Keynote to be something of a pain to drive. It looks lovely and everthing, and once you've got things how you want them it presents them well, but I've yet to find a way, short of editing the XML directly of adding text with linebreaks (vital when you're, say, explaining program listings). Ah well, at least linebreaks are preserved when you edit the XML.

    Which is probably down to the fact that Keynote was written for Steve, and when was the last time Steve explained any code?