emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[O] [ANN] orgtbl-join


From: Thierry Banel
Subject: [O] [ANN] orgtbl-join
Date: Thu, 22 Jan 2015 22:03:47 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

Hi The List

I am glad to announce the orgtbl-join package.

It merges Org tables. A master table is enriched with material from a
reference table.

Example. This master table is a cooking recipe, with ingredients
and quantities (gramms).

| food     | quty |
|----------+------|
| onion    |   70 |
| tomatoe  |  120 |
| eggplant |  300 |
| tofu     |  100 |
| corn     |  250 |
| tomatoe  |   90 |

We also have a reference table of nutrition facts (freely borrowed
from Nut-Nutrition, http://nut.sourceforge.net/, by Jim Jozwiak).

#+tblname: nut
| food     | Fiber | Sugar | Protein | Carb |
|----------+-------+-------+---------+------|
| eggplant |   2.5 |   3.2 |     0.8 |  8.6 |
| tomatoe  |   0.6 |   2.1 |     0.8 |  3.4 |
| onion    |   1.3 |   4.4 |     1.3 |  9.0 |
| egg      |     0 |  18.3 |    31.9 | 18.3 |
| rice     |   0.2 |     0 |     1.5 | 16.0 |
| bread    |   0.7 |   0.7 |     3.3 | 16.0 |
| orange   |   3.1 |  11.9 |     1.3 | 17.6 |
| banana   |   2.1 |   9.9 |     0.9 | 18.5 |
| tofu     |   0.7 |   0.5 |     6.6 |  1.4 |
| nut      |   2.6 |   1.3 |     4.9 |  7.2 |
| corn     |   4.7 |   1.8 |     2.8 | 21.3 |

Then, typing M-x orgtbl-join, the recipe get enriched with nutrition
facts:

| food     | quty | Fiber | Sugar | Protein | Carb |
|----------+------+-------+-------+---------+------|
| onion    |   70 |   1.3 |   4.4 |     1.3 |  9.0 |
| tomatoe  |  120 |   0.6 |   2.1 |     0.8 |  3.4 |
| eggplant |  300 |   2.5 |   3.2 |     0.8 |  8.6 |
| tofu     |  100 |   0.7 |   0.5 |     6.6 |  1.4 |
| corn     |  250 |   4.7 |   1.8 |     2.8 | 21.3 |
| tomatoe  |   90 |   0.6 |   2.1 |     0.8 |  3.4 |

Documentation here:
https://github.com/tbanel/orgtbljoin

---------
Tha package is available on MELPA.
To enable MELPA, add those lines to your .emacs:
  (require 'package)
  (add-to-list
     'package-archives
     '("melpa" . "http://melpa.milkbox.net/packages/";) t)
  (package-initialize)

Then browse the 2000 available packages (and growing)
by typing:
  M-x package-list-packages

Comments, use-cases, help, criticisms, etc. welcome.
Have fun
Thierry Banel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]