• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Templates for program output
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Templates for program output


  • Subject: Re: Templates for program output
  • From: Martin Hewitson <email@hidden>
  • Date: Sun, 11 Nov 2012 07:02:16 +0100

Ah, that set me off on the right track. I then also came across MGTemplateEngine, which seems to be just what I want (I need loops and logic).

Thanks!

Martin

On 10, Nov, 2012, at 09:02 PM, Ben Gollmer <email@hidden> wrote:

> On Nov 10, 2012, at 1:50 AM, Martin Hewitson <email@hidden> wrote:
>
>> Dear list,
>>
>> I have an app which is used for compiling agendas. The output is an html page with the agenda formatted in tables, etc. Currently I just build an NSString containing all the html. Clearly this is limited.
>>
>> I'd like to extend the app to have templates to allow for different agenda layouts. Currently I'm thinking of some sort of html template with tags in there which I can replace with new html code when building the agenda. My problem is that I don't see how to handle loops. I want these templates to be creatable by the user (if they wish) so there needs to be a way to loop over elements of the agenda and format the result (the user may make a table, or just a list, or whatever they want).
>>
>> Does anyone know of a way to do this, or a better way to approach this problem? I started thinking about trying to write a DSL and use maybe parsekit to handle that. But I've never done that before and it looks a little daunting.
>
>
> Try GRMustache (https://github.com/groue/GRMustache).
>
> --
> Ben

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Martin Hewitson
Albert-Einstein-Institut
Max-Planck-Institut fuer
    Gravitationsphysik und Universitaet Hannover
Callinstr. 38, 30167 Hannover, Germany
Tel: +49-511-762-17121, Fax: +49-511-762-5861
E-Mail: email@hidden
WWW: http://www.aei.mpg.de/~hewitson
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~






_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Templates for program output (From: Martin Hewitson <email@hidden>)
 >Re: Templates for program output (From: Ben Gollmer <email@hidden>)

  • Prev by Date: Re: FileWrapper & iCloud
  • Next by Date: NSXMLParser not getting all DTD information
  • Previous by thread: Re: Templates for program output
  • Next by thread: Translating resource files
  • Index(es):
    • Date
    • Thread