From mboxrd@z Thu Jan 1 00:00:00 1970 From: Greg Minshall Subject: small bash/awk script to query org-mode tables Date: Mon, 30 Sep 2019 09:00:51 -0400 Message-ID: <530588.1569848451@apollo2.minshall.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:40694) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEvQW-0007hZ-WC for emacs-orgmode@gnu.org; Mon, 30 Sep 2019 09:09:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iEvQV-00064y-OP for emacs-orgmode@gnu.org; Mon, 30 Sep 2019 09:09:20 -0400 Received: from hiwela.pair.com ([209.68.5.201]:27636) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1iEvQV-00064W-KQ for emacs-orgmode@gnu.org; Mon, 30 Sep 2019 09:09:19 -0400 Received: from hiwela.pair.com (localhost [127.0.0.1]) by hiwela.pair.com (Postfix) with ESMTP id 641889804D9 for ; Mon, 30 Sep 2019 09:02:04 -0400 (EDT) Received: from minshall-entroware-apollo.cliq.com (unknown [108.211.200.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hiwela.pair.com (Postfix) with ESMTPSA id 56E708F0849 for ; Mon, 30 Sep 2019 09:02:04 -0400 (EDT) Received: from apollo2.minshall.org (localhost [IPv6:::1]) by minshall-entroware-apollo.cliq.com (Postfix) with ESMTP id 863BF6090B for ; Mon, 30 Sep 2019 09:00:51 -0400 (EDT) Content-ID: <530587.1569848451.1@apollo2.minshall.org> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: "Emacs-orgmode" To: emacs-orgmode@gnu.org hi, all. for a project, i wanted to be able to easily query the contents of a table in an org-mode document from the shell. in case that it might be useful to others, the result is: ---- https://gitlab.com/minshall/org-query ---- the beginning of the help output is: ---- usage: org-query -h|--help : org-query [-f|--field column] [--complement] [--regexp] file [[tabl= e:]column] key : org-query -t|--tables file : org-query -c|--columns file [table[:]] : org-query -k|--keys file [[table:]column] ---- it works for my use cases (obviously), but i'm sure it will break, or be feature-deficient, for those of others. i'd be happy to try to fix bugs. cheers, Greg ps -- if anyone knows how to get gitlab.com to recognize org-mode footnotes (in particular, of the [fn::"this is a footnote"]-variety), my readme.org file would be pleased to hear.