I'm using an org-mode file to do some filesystem monitoring. To that purpose I have a table in which I'm calling code blocks through org-sbe in the formulas. It looks like this:
#+NAME: part-size
#+BEGIN_SRC bash :var mach="" :var part="" :var bs="TB" :exports none :results silent
tmp=($(df -B ${bs} /net/${mach}/${part} | tail -1 ))
bc -l <<< "scale=2; ${tmp[1]}/1024/1024"
#+END_SRC
#+NAME: part-used
#+BEGIN_SRC bash :var mach="" :var part="" :var bs="TB" :exports none :results silent
tmp=($(df -B${bs} /net/${mach}/${part} | tail -1))
bc -l <<< "scale=2; ${tmp[2]}/1024/1024"
#+END_SRC
| machine | partition | size[TB] | used[TB] | available[TB] |
|---------+-----------+----------+----------+---------------|
| mach1 | part1 | 60.0 | 56.0 | 4.0 |
| mach1 | part2 | 15.0 | 12.5 | 2.5 |
| mach2 | part1 | 40.5 | 10.5 | 30.0 |
|---------+-----------+----------+----------+---------------|
| total | | 115.5 | 79.0 | 36.5 |
#+TBLFM: @>$3..@>$5=vsum(@I..II)::@2$3..@9$3='(org-sbe part-size (mach $$1) (part $$2) (bs \"1MB\"))::@2$4..@9$4='(org-sbe part-used (mach $$1) (part $$2) (bs \"1MB\"))::@2$5..@9$5=$-2 - $-1
My problem is that I export that file regularly and automatically to a web page but the content of the table doesn't get updated. So I'd like to know if there is a way to automatically re-apply the table formulas on export in the same way that you can run code blocks on export.
org
export hooks. – Seth Rothschild