[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] Merge Properties into Template; [babel]
From: |
Giovanni Ridolfi |
Subject: |
Re: [O] Merge Properties into Template; [babel] |
Date: |
Thu, 06 Oct 2011 12:40:33 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.3 (windows-nt) |
Richard Parsons <address@hidden> writes:
Hi Richard,
>
> I have a node with properties and I would like to merge that data into
> a template. For example:
>
> * Dogs
> ** Fido
> :PROPERTIES:
> :BREED: West Highland Terrier
> :COLOR: White
> :AGE: 2
> :END:
> * Templates
> ** Dog Template
> Your dog, called [HEADLINE], is a [COLOR] [BREED], who is [AGE] years old.
>
> I want to merge the item called "Fido" into the template called "Dog
> Template".
>
> Could someone point me to the right bit of the manual
I think that the only way to extract the information of a property,
in org, is column view.[1]
However you may be able to use something like perl or awk to extract the info
and babel to use in the org file.
I'm a babel ignorant. CCed Eric Schulte for help ;-)
hth,
Giovanni
[1] But you'll end with this:
* DOGS
** Fido
:PROPERTIES:
:ID: dog
:COLUMNS: %dog %ITEM %is %BREED %whos %AGE %old
:dog: Your dog, called
:is: , is a
:BREED: West Highland Terrier
:COLOR: White
:whos: , who is
:AGE: 2
:old: years old.
:END:
** Templates
*** Dog Template
Your dog, called [HEADLINE], is a [COLOR] [BREED], who is [AGE] years old.
*** Dog column
#+BEGIN: columnview :hlines 1 :id dog
| dog | ITEM | is | BREED | whos | AGE
| old |
|------------------+---------+--------+-----------------------+----------+-----+------------|
| Your dog, called | ** Fido | , is a | West Highland Terrier | , who is | 2
| years old. |
#+END