emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Pierre-Henry Frohring <frohring.pierrehenry@gmail.com>
To: emacs-orgmode@gnu.org
Subject: Is there a org-babel-map-src-blocks but for tables?
Date: Sun, 16 Oct 2016 21:53:43 +0200	[thread overview]
Message-ID: <CAL8Ox7nQ2sT39h+D5raLOBi9OJAg5A7o77w5-9mTydn6Tv59MA@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1162 bytes --]

Hi list!

Wondering if there was a function like `org-babel-map-src-blocks'
but for tables.

Use case:

I have a file with multiple headings like:

* Heading
** Result
(some chart computed by processing data)

** Processing
(code block for transforming data into chart)

** Data
(org table containing the data)

So, it would be nice to:

1) transform all tables into tsv files
2) eval code blocks that read these files and turn them into charts
3) exporting org file to html

Problem with 1) : did not find a function like `org-babel-map-src-blocks'
but for tables.

Corresponding code is here: https://github.com/phfrohring/org-to-blog

It maps every heading with a :ready: tag to matching html of one org file:

(defun blog/org_to_www ()
  (setq org-confirm-babel-evaluate nil)
  (blog/check_blog)
  (blog/tangle_blog)
  (blog/export_tables)
  (blog/eval_safe_code_blocks)
  (blog/map_entries_assets_to_html_files_assets)
  (blog/map_entries_to_html_files)
  (blog/create_sitemap)
  (setq org-confirm-babel-evaluate t))

​From here:
https://github.com/phfrohring/org-to-blog/blob/master/org_to_blog.el​

Thx!

[-- Attachment #2: Type: text/html, Size: 1811 bytes --]

             reply	other threads:[~2016-10-16 19:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-16 19:53 Pierre-Henry Frohring [this message]
2016-10-16 20:55 ` Is there a org-babel-map-src-blocks but for tables? Nicolas Goaziou
2016-10-16 21:03   ` Pierre-Henry Frohring
2016-10-16 21:13     ` Nicolas Goaziou
2016-10-17 14:20       ` Nick Dokos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAL8Ox7nQ2sT39h+D5raLOBi9OJAg5A7o77w5-9mTydn6Tv59MA@mail.gmail.com \
    --to=frohring.pierrehenry@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).