From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id IEoqB5UAYl/KCwAA0tVLHw (envelope-from ) for ; Wed, 16 Sep 2020 12:09:57 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id uGkIA5UAYl9UOgAAB5/wlQ (envelope-from ) for ; Wed, 16 Sep 2020 12:09:57 +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 73D0F9404C3 for ; Wed, 16 Sep 2020 12:09:56 +0000 (UTC) Received: from localhost ([::1]:44818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kIWG3-0003Om-AV for larch@yhetil.org; Wed, 16 Sep 2020 08:09:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kIWAH-0005T4-IS for emacs-orgmode@gnu.org; Wed, 16 Sep 2020 08:03:57 -0400 Received: from mail-pl1-x62c.google.com ([2607:f8b0:4864:20::62c]:37013) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kIWAC-0001oL-Bq for emacs-orgmode@gnu.org; Wed, 16 Sep 2020 08:03:57 -0400 Received: by mail-pl1-x62c.google.com with SMTP id u9so3069242plk.4 for ; Wed, 16 Sep 2020 05:03:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=8xusdq0jM0Qc69t0t7XJHG7PIk5eXW50FH9h/zrxqeM=; b=SL/9+zmMCbMKIsW7IQHiEDxYpAuuBYXE2NyeyqfLxBZsJgqbyLcQRakJyM+/25o6I9 aaoSqCNwn81SI1X7RVqnFL/Yb7tDthjjbHwtlpOBZspTMvXRbGmPmyPOLvFIVVkw3mlC fsHm8HLLZu4fHFOcuvglPrDCxiP34UWspdFrQhK7i4Hrt+maaWfd436VT2EMLGQSb4k7 4DCUKugrgKYTFSf/dtboOJbyxnRXyfg9vay2XqND7BwBJES8X5tnr7MMi1FKDyxRewWF 5hZCfC606MjLtVxSs2MqaFHsxU85C129aXfE3uPZhuUXaf5Kmm1HZirKaxxxzxFyLbGM RBag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=8xusdq0jM0Qc69t0t7XJHG7PIk5eXW50FH9h/zrxqeM=; b=dJNaUx8zCqQXRxKmnXNJ0du4dejgbArfTxLzDX5sMQKdrlP08aO4I0D/4iSWmWp1o4 TwU8rk4waTvG7EMRRHNjHCqygsGb3G2mhu/HJzl1sOV8Faxs3tvLxYsYDaNfVtnCdDS/ oXq2/ENNzEaRmwCBeBJUZeAb+3vP5iRMp0AGqT2v+dak9XQyMBgWcgpCL32s8ZOzU6BX Vpnjogwgl9tQSCdN8NBESZOYwda4VG59P8+EPmpPauo2GWW+QZ1YG33VEZxEt7BI+0Rc wUydTiF50LgYMbf2ipKgso7temOvEyPy/756VM1oBwGr9LDiHX8R7gc7ngDauyapdX1A XPQw== X-Gm-Message-State: AOAM533jr8gY3BpTqU533ZeYlmA+z9jDGTcwkl1JLRPg6WjOjCx4dfiU 7zv76APADMQrt4nZVg7fSCGaZhW1tM4rjA== X-Google-Smtp-Source: ABdhPJydllbZ0z7iuaucQj2K/nR2SJ2Tkii5PmjN+3V8az7sMzme+bdk2uh5apLTsBuNiMD7TiA1mQ== X-Received: by 2002:a17:902:c40e:b029:d1:bb21:4c97 with SMTP id k14-20020a170902c40eb02900d1bb214c97mr19380418plk.31.1600257830580; Wed, 16 Sep 2020 05:03:50 -0700 (PDT) Received: from localhost ([210.3.160.218]) by smtp.gmail.com with ESMTPSA id gt11sm2450957pjb.48.2020.09.16.05.03.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Sep 2020 05:03:49 -0700 (PDT) From: Ihor Radchenko To: =?utf-8?Q?Przemys=C5=82aw_Kami=C5=84ski?= , emacs-orgmode@gnu.org Subject: Re: official orgmode parser In-Reply-To: References: <68dc1ea1-52e8-7d9e-fb2d-bcf08c111eca@intrepidus.pl> <87d02n2yyr.fsf@gmail.com> <482cea5c-4214-57ac-dfeb-1e305180fee5@intrepidus.pl> <875z8echfi.fsf@mbork.pl> <87h7rym9xi.fsf@localhost> Date: Wed, 16 Sep 2020 20:02:49 +0800 Message-ID: <87een2lyja.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::62c; envelope-from=yantar92@gmail.com; helo=mail-pl1-x62c.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=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=pass header.d=gmail.com header.s=20161025 header.b=SL/9+zmM; dmarc=pass (policy=none) header.from=gmail.com; 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.21 X-TUID: QLyKoORi+Y/P > However what Ihor presented is interesting. Do you use similar approach=20 > with shellout and 'emacs -batch' to show currently running task or you=20 > 'push' data from emacs to show it in the taskbar? I prefer to avoid querying emacs too often for performance reasons. Instead, I only update the clocking info when I clock in/out in emacs. Then, the clocked in time is dynamically updated by independent bash script. The scheme is the following: 1. org clock in/out in Emacs trigger writing clocking info into ~/.org-clock-in status file 2. bash script periodically monitors the file and calculates the clocked in time according to the contents and time from last modification 3. the script updates simple textbox widget using awesome-client 4. the script also warns me (notify-send) when the weighted clocked in time is negative (meaning that I should switch to some more productive activity) Best, Ihor Przemys=C5=82aw Kami=C5=84ski writes: > On 9/16/20 9:56 AM, Ihor Radchenko wrote: >>> Wow, another awesomewm user here; could you share your code? >>=20 >> Are you interested in something particular about awesome WM integration? >>=20 >> I am using simple textbox widgets to show currently clocked in task and >> weighted summary of clocked time. See the attachments. >>=20 >> Best, >> Ihor >>=20 >>=20 >>=20 >>=20 >> Marcin Borkowski writes: >>=20 >>> On 2020-09-15, at 11:17, Przemys=C5=82aw Kami=C5=84ski wrote: >>> >>>> 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). 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 :) >>> >>> I was in the exact same situation - I use Org-mode clocking, and we use >>> Toggl at our company, so I wrote a simple tool to fire API requests to >>> Toggl on clock start/cancel/end: https://github.com/mbork/org-toggl >>> It's a bit more than 200 lines of Elisp, so you might try to look into >>> it and adapt it to whatever tool your employer is using. >>> >>>> Another one is generating total hours report for day/week/month to put >>>> into my awesomewm toolbar. I ended up using orgstat >>>> https://github.com/volhovM/orgstat >>>> however the author is creating his own DSL in YAML and I guess things >>>> were much better off if it all stayed in some Scheme :) >>> >>> Wow, another awesomewm user here; could you share your code? >>> >>> Best, >>> >>> --=20 >>> Marcin Borkowski >>> http://mbork.pl > > > I don't have interesting code, just standard awesomevm setup. I run=20 > periodic script to output data computed by orgstat and show it in the=20 > taskbar (uses the shellout_widget). > > However what Ihor presented is interesting. Do you use similar approach=20 > with shellout and 'emacs -batch' to show currently running task or you=20 > 'push' data from emacs to show it in the taskbar? > > P.