ob-rec.el allows you to use Recutils as a language in org-mode source blocks.
Recutils should install the necessary files where emacs can see them.
In your .emacs you may need to add:
(require 'ob-rec)
You will need to add "rec" to your list of ’org-babel-load-languages’ like below:
(org-babel-do-load-languages 'org-babel-load-languages '((rec . t)))
To your org file, add a src code block like:
#+BEGIN_SRC rec :data books.rec Location = 'loaned' #+END_SRC
This performs the equivalent of the command:
$ recsel -e "Location = 'loaned'" books.rec
It will produce a result like:
#+RESULTS: | Title | Author | Date | Location | |---------------------+-----------------+-----------------+----------| | The Colour of Magic | Terry Pratchett | 4/20/01 11:15pm | loaned |
The recfile you would like to query. Can be a relative path. Spaces in the filename or path need to be escaped with a backslash (for example, file\ name.rec). This is the only required header argument.
If this list contains "scalar", "html", "code" or "verbatim" then the output will look the same as if called from the command line and it will not be put into an org table.
Only returns this type of record. Corresponds to the -t argument. Accepts only one argument.
Comma-separated list of fields to print. Corresponds to the -p argument.
Comma-separated list of fields by which to sort records. Corresponds to the -S argument.
Comma-separated list of fields by which to group records. If the records grouped together share fields in common, these will be in separate columns with a "_N" appended. Corresponds to the -G argument.
Field on which to join records from one record set to another. Please see blah for more on how joins work. Corresponds to the -j argument.