# Contemplating Templates

I read a  couple of articles about template engines  in the past week,
so the idea came to me to generate my gophermaps using templates.

I  occasionally use  Python  to automate  some of  my  tasks at  work.
Although we are not using Python  in our day-to-day tasks, I installed
it on my work laptop as -  fortunately - I have admin rights. I always
try new ways, new programming languages for at least the menial tasks.

I already read about Jinja somewhere, so I thought I'll give it a try.
It's really easy to use, I wrote some test code yesterday to check out
the  features I  need  to  generate the  gophermaps.  I  think I  will
complete this and try it out on my VPS.

My plan is as  follows: Write a small Python app  that reads the phlog
entries in a directory and passes  those to the template engine. There
will  be a  Jinja template  for the  gophermap put  under git  version
management.  The post-receive  hook of  the  bare repo  on the  server
already does the deploy, but currently I have to edit the gophermap in
the git repo in  order to publish the new phlog entry.  Thus I plan to
run  the gophermap  generation  in this  post-receive  hook after  the
checkout to the gopher directory.

This way I  can modify the gophermap  template in the repo  if I want,
but adding a new phlog entry will be simplified. I'll only have to add
the phlog text file and the gophermap will be updated.

I'll be on vacation from December 17th  so I hope I won't abandon this
little side project and will be able to complete it on the VPS.

As for  SDF-EU the  situation is  a bit  complicated as  I am  an ARPA
member  and as  such I  do not  have access  to git.  Nevertheless the
gophermap generation can be useful here, too.