From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 0MalNgejYF+/HwAA0tVLHw (envelope-from ) for ; Tue, 15 Sep 2020 11:18:31 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 5q72MAejYF93TwAA1q6Kng (envelope-from ) for ; Tue, 15 Sep 2020 11:18:31 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 9B3A99402C8 for ; Tue, 15 Sep 2020 11:18:28 +0000 (UTC) Received: from localhost ([::1]:57074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kI8yh-000851-9W for larch@yhetil.org; Tue, 15 Sep 2020 07:18:27 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59254) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kI8wO-00084b-WC for emacs-orgmode@gnu.org; Tue, 15 Sep 2020 07:16:05 -0400 Received: from qrelay157.mxroute.com ([172.82.139.157]:43179) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kI8wN-0008Kg-01 for emacs-orgmode@gnu.org; Tue, 15 Sep 2020 07:16:04 -0400 Received: from filter003.mxroute.com ([168.235.111.26] 168-235-111-26.cloud.ramnode.com) (Authenticated sender: mN4UYu2MZsgR) by qrelay157.mxroute.com (ZoneMTA) with ESMTPA id 174917a81bb000b8c7.001 for ; Tue, 15 Sep 2020 11:15:59 +0000 X-Zone-Loop: 78b606618ac08b1f6019a01d57cc065e59c4f3934ef8 X-Originating-IP: [168.235.111.26] Received: from friday.mxlogin.com (friday.mxlogin.com [159.69.65.104]) by filter003.mxroute.com (Postfix) with ESMTPS id 3865360040 for ; Tue, 15 Sep 2020 11:15:58 +0000 (UTC) Subject: Re: official orgmode parser To: emacs-orgmode@gnu.org References: <68dc1ea1-52e8-7d9e-fb2d-bcf08c111eca@intrepidus.pl> <87d02n2yyr.fsf@gmail.com> <482cea5c-4214-57ac-dfeb-1e305180fee5@intrepidus.pl> <20200915095548.GP20869@maokai> From: =?UTF-8?B?UHJ6ZW15c8WCYXcgS2FtacWEc2tp?= Message-ID: Date: Tue, 15 Sep 2020 13:15:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200915095548.GP20869@maokai> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-AuthUser: pk@mmksoft.uk Received-SPF: pass client-ip=172.82.139.157; envelope-from=pk@intrepidus.pl; helo=qrelay157.mxroute.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/09/15 07:16:01 X-ACL-Warn: Detected OS = Linux 3.11 and newer [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, NICE_REPLY_A=-0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: t2W0s5lNN1QO On 9/15/20 11:55 AM, Russell Adams wrote: > On Tue, Sep 15, 2020 at 11:17:57AM +0200, Przemysław Kamiński wrote: >>> Org mode IS an elsip application. This is the main goal. The reason it >>> works so well is because elisp is largely a DSL that focuses on text >>> manipulation and is therefore ideally suited for a text based organiser. >> >> So, I keep clock times for work in org mode, this is very handy. >> However, my customers require that I use their service to provide the >> times. They do offer API. So basically I'm using elisp to parse org, >> make API calls, and at the same time generate CSV reports with a Python >> interop with org babel (because my elisp is just too bad to do >> that). > > Please consider this is a very specialized use case. > >> If I had access to some org parser, I'd pick a language that would >> be more comfortable for me to get the job done. I guess it can all >> be done in elisp, however this is just a tool for me alone and I >> have limited time resources on hacking things for myself :) > > Maintainer time is limited too. Maintaining a parser library outside > of Emacs would be difficult for the reasons already given. I'd > encourage you to pick up some more Elisp, which I am also trying to > do. > >> Anyways, my parser needs aren't that sophisticated: just parse the file, >> return headings with clock drawers. I tried the common lisp library but >> got frustrated after fiddling with it for couple of hours. > > If it's that small you could always do that in Python with regexps for > your usage if you're more comfortable in Python. Org's plain text > format means you can read it with anything. I suspect grep might even > pull headlines and clocks successfully. > > > > I haven't looked at the elisp parser much, but I do wonder if someone > couldn't write an exporter that exports a programmatic version of your > org file data (ie: to xml). Then other tools could ingest those xml > files. That'd certainly be a contrib module and not in the core, but > might be worth your while to explore the idea if you really want to > work with Org data outside of Emacs. > > > ------------------------------------------------------------------ > Russell Adams RLAdams@AdamsInfoServ.com > > PGP Key ID: 0x1160DCB3 http://www.adamsinfoserv.com/ > > Fingerprint: 1723 D8CA 4280 1EC9 557F 66E8 1154 E018 1160 DCB3 > There's the org-json (or ox-json) package but for some reason I wasn't able to run it successfully. I guess export to S-exps would be best here. But yes I'll check that out. Przemek