Jun. 16th, 2010

anarres: (Default)
My mission for today is to learn about the Template Toolkit. I've tried to look at TT a couple of times already, each time, aw, yeah, this is going to be really easy, but I came out feeling completely mystified. So I've been putting it off, and thinking, maybe I can get away with just using BML, but since Dreamwidth as a whole wants to move from BML to TT it seems like it would be a bit perverse to do new work in BML. So, today is the day that I sit down, drink coffee, and figure it out.

I've posted this, so now I have to :-P
anarres: (Default)
First off, I just wanted to get something, anything, to work, so I would be able to play with it. It turns out there are a few different ways to use Template Toolkit, and Dreamwidth uses it via the Perl Template module. I installed this module on my laptop by doing this:

$ sudo cpan Template

Then following this tutorial: Devshed: getting started with the Perl Template Toolkit, I put the following two files in the same directory:

destruction.tt:

People of [% planet %], your attention please.

This is [% captain %] of the Galactic Hyperspace Planning Council.

As you will no doubt be aware, the plans for development of the outlying regions of the Galaxy require the building of a hyperspatial express route through your star system, and regrettably your planet is one of those scheduled for destruction.

The process will take slightly less than [% time %].
Thank you.

Read more... )

Profile

anarres: (Default)
anarres

July 2012

S M T W T F S
1234567
891011121314
151617 18192021
222324 25262728
293031    

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 20th, 2025 12:04 am
Powered by Dreamwidth Studios