[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Orgmode] [Babel] Installation notes for an app
From: |
Sébastien Vauban |
Subject: |
[Orgmode] [Babel] Installation notes for an app |
Date: |
Thu, 28 Oct 2010 17:10:32 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (windows-nt) |
#+TITLE: Installation Notes for an app
#+LANGUAGE: en_US
* Global constants
** Development
#+tblname: dev-params
| serverName | host1 |
| appBaseDir | /cygdrive/d/dir1 |
** Staging
#+tblname: stg-params
| serverName | host2 |
| appBaseDir | /cygdrive/d/dir2 |
** Production
#+tblname: prd-params
| serverName | host3 |
| appBaseDir | /cygdrive/d/dir3 |
* Show the params :dev:
** Statically assigned
#+begin_src sh :rownames no :var data=dev-params :exports both
echo $data
#+end_src
#+results:
: serverName host1 appBaseDir /cygdrive/d/dir1
** "Dynamically" assigned
Trying to be as adaptable as possible, I'll use the tag to refer to the right
table:
#+begin_src sh :rownames no :var data=(concat (car (org-get-tags-at (point)))
"-params") :exports both
echo $data
#+end_src
#+results:
: dev-params
XXX I expected to see here the same results as in the
[[*Statically%20assigned][previous version]].
PS- Instead of a tag, I could use as well some other sort of "global
constant". Right now, I do not see yet the respective gains or problems of
both. I guess I'll do in the coming days.
* Export the params
To export the params to the shell, I can process the above string with AWK or
some such.
XXX Any advice on doing it better?
Best regards,
Seb
--
Sébastien Vauban
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Orgmode] [Babel] Installation notes for an app,
Sébastien Vauban <=