From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id gCyWJs4B32NJFgAAbAwnHQ (envelope-from ) for ; Sun, 05 Feb 2023 02:09:34 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id QH+DJs4B32MGIAEAauVa8A (envelope-from ) for ; Sun, 05 Feb 2023 02:09:34 +0100 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 1DD9126D1E for ; Sun, 5 Feb 2023 02:09:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pOTWN-00039d-89; Sat, 04 Feb 2023 20:08:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOTWL-00039O-Cu for emacs-orgmode@gnu.org; Sat, 04 Feb 2023 20:08:41 -0500 Received: from mout.web.de ([212.227.17.12]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pOTWI-0007yH-Sm for emacs-orgmode@gnu.org; Sat, 04 Feb 2023 20:08:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=web.de; s=s29768273; t=1675559312; bh=5wSOVDJo7653QOXPn9WJF5JpHEmqisIfD84YRJnvnrs=; h=X-UI-Sender-Class:References:From:To:Cc:Subject:Date:In-reply-to; b=puadCEUs4iws6zhB4JUl8uhiel4NKZEUrzk+0vcaALrszHwC8eAmwEMoIYlAexqPZ 1XF8sjEPo2Ag84iipagwMw9vU8T4p4uEet6eH4HQZPJ5dbV8xyDelLfTMT82l0nWtm foOhH5duO1LAFCnzwcI317EZQiuTbbfn24/+vRDwyxqlvJw0Ecfg5DtIwh1iN5h0aF 4sJYpUg+e9Wgiut7wM2XR0OBFpggNZUJ5hZDh9DTGVkzSIK4bi2REhIEWuNM8BqPTR qm325ehlVjH5u5CO2NTK0dhdbq1GE4yLIxE7FdWNvf9R90UtcRGmwbftAGJwdRBOjn RoQi2i1PN769w== X-UI-Sender-Class: 814a7b36-bfc1-4dae-8640-3722d8ec6cd6 Received: from fluss ([84.149.95.143]) by smtp.web.de (mrweb105 [213.165.67.124]) with ESMTPSA (Nemesis) id 1MAcpW-1pV7Mm0fMm-00BF2h; Sun, 05 Feb 2023 02:08:32 +0100 References: User-agent: mu4e 1.8.13; emacs 28.1 From: "Dr. Arne Babenhauserheide" To: Jude DaShiell Cc: emacs-orgmode@gnu.org Subject: Re: netspend table Date: Sun, 05 Feb 2023 00:46:33 +0100 In-reply-to: Message-ID: <87y1pcdilw.fsf@web.de> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Provags-ID: V03:K1:Y9Z1r4Dg5pjBajGYWLjqoQwJnWZTKeL6nROJRQBt268hZ3JBxPa L91aWfg+NhG0Z8/0AupHUBmZmZIRIQEYRmi3RYI5Q1NwMFRX6VKHfVDsrXqp22t7PngLXCi ccUk/avr8px3z6RsTLLj9UUb3XpRn3s2VHyL3GX5T82pcg+sl1F8PQx2siRarVtanY21lQL XMMjxFZIN34bnOFNODrWw== UI-OutboundReport: notjunk:1;M01:P0:0b11km20bII=;Xc9UD4KV03pZ9WO3d9ro6np9BLN /Uw7R7mwnAoGxguaIevwD3bui4wnN6lHHBQCnLjaXZ7QMadm0Ou7vgvHzHNsMvD0+dsc8mpB3 OKUVt+j3L/YOnakADp1KyN/Sc307xMM72iIIIOhT/lmoaoH08HeOIxsp8yCf1H52RDTZaAMB1 0gWGwxxk+SKg0mjj2Q9GcK5fZS8a8ScpLFYyadqAthydq8hPipG8hRxkTSJOHVOmd28Hw4HFQ b+c/6DcuPFUurwZwnYsawqeqUdwvORPXNlYDbPNJpfNw1WvF8Nr348OSDzz/NJ2F4AG+XyyS1 +S13pIvTCDHKkU0FNwtQ/xpTc85EW4TOebY/gfGxB3Vm888bfTvn3dsQt5LbV5MeAQ1F5YY8T Wta2LHf0xTH1uST3HmitiuDEACo5CGj1Uz55iTsHwIx0y5NgffrIIulCh1+W2K9l45v6Hg1o5 N8BEyzUfH6J2Xc1tbJ1hHM/Q782kt1sm5pYQSWezsW8cp2EwTufvUxu0IVgyxT2R5fCAGjmXB 6EG0D6uqvX1cb00ulW0PHH+uHeTtreIcw4eE9PdodGtVE7bc48bg4xKj4udp/1S5GOb6ijIzC E373swyhFtFynIznqikw7M5qKBJiL3vIFFYRgZcnN1JPXN6vqBR/i+UcwDjONSzTXDDVa0oQO r0R1MSIcWAEfx5DOCLrnYY2hX6VMEEP5Xf1KHFclUGaT2gZm2O4etD94wTUfQh8gVMI2+eUiK /OK+YsJ990nznT6dWaj2WRYnXTDZMdzMrtnfvjOw/iLTOLQOGt8nc7r5H022eWqy/PQStYtSx o14uDZsZm3hEfnp3g0RG7Bpofy9z7Gl8dAk4HKglmTyuHZXU1VIDai4YKY12Q7YUdeSzzWt0l NQ5NPbUIxSraPYvl3XmBet42eC8sEM2g4mAWfuHjkh9jDk/O/lhWB/cbqmd9cvpasnbRWXOkd rr2B9w== Received-SPF: pass client-ip=212.227.17.12; envelope-from=arne_bab@web.de; helo=mout.web.de X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_FROM=0.001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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.29 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1675559374; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=2a3tNA8ekW7IzHJnDjJ50EIqPCT/KakXfIHMD7Gi3yQ=; b=LkWSLyakGGcIrd9d1xl8CSUy7/eiSQ/mdjCyYE+JLgwWP3ywFQJ0Tbtamhm5Xz988EfMEG gm67D9UCuyx50f/YrYr7aMtV+iyIGuWhKXbJRa3iTWQdrbBHyQEqS8n7sitfFHsFAIyaKl Sq3xVT6TeGmOl1YGnfwfAkyUGumpHxYqGtILvmY2vbnF5RqGekAJ6C5UQOmx4iQMhM2Exm mVAfMNahyIa+/V5U8ufnNEvUc5grGFa9VEae7lq4iTB0SiTq64b9I8lpoOzaOjeM6LB52S Y6bb0dn7OOxVyDw3D6QRk52LQreey2GFqyU5idmEAgf9LenjS+abaQUfulOAAw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=web.de header.s=s29768273 header.b=puadCEUs; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=web.de ARC-Seal: i=1; s=key1; d=yhetil.org; t=1675559374; a=rsa-sha256; cv=none; b=RUnCyCOC1pbPEEC32SvCN5YeHiiAzjzC1CG1Ajx1WHjHXF1H16ztHxC/LIYSlTf9806re2 Hln+HGLcooQYJ6qloNlzTQ+qyCWwghxnsTdK7ZecDd86E8y6xxn0gRpewX2s39GlVU3kTJ eeYFjdmmQxktkSVUWTSF2L3DvRzHqyq4fkgx3ylz5TYW0g/20g37lN7et9eFf+2GDJUDio jPggsURS68uVczp9Hy03Z+f47t4TOdOWmbtBvuy8MTLbtgX87+8yqCMLRHMxGN8mdpMWRO 6XYmXoCR+cGkNJqM0bdINz4WMRLU6wS1+m4LzA5N3+2rG67Uequ2fq1CZftvQA== X-Migadu-Spam-Score: -8.34 X-Spam-Score: -8.34 X-Migadu-Queue-Id: 1DD9126D1E Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=web.de header.s=s29768273 header.b=puadCEUs; spf=pass (aspmx1.migadu.com: domain of "emacs-orgmode-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="emacs-orgmode-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=web.de X-Migadu-Scanner: scn1.migadu.com X-TUID: rr+ZQs3SEfoz --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jude DaShiell writes: > This is a running balance table and I don't know what kind of a #TBLFMT > line would be useful for that either. > > | date | transaction | amount | fee | balance | > |--------------+------------------+--------+-------+---------| > | [2023-01-11] | original balance | +0.00 | +0.00 | +423.17 | > | [2023-01-12] | dunkin | -18.68 | -1.00 | 403.49 | > | [2023-01-13] | WalMart | -28.68 | -1.00 | 384.88 | > | [2023-01-16] | Deposit | + | | 634.88 | > | [2023-01-17] | Capris | - | - | 615.34 | > | [2023-01-17] | Mcdonalds | -4.74 | -1.00 | 609.60 | > | [2023-01-18] | verizon | - | - | 543.35 | > | [2023-01-26] | dunkin | - | - | 542.37 | > | [2023-02-01] | damgoodcafe | -13.28 | -1.00 | 528.09 | > | | | | | | One thing I could see as useful is a check column to enusre that balance - amount - fee actually gives the previous balance: | date | transaction | amount | fee | balance | check | |--------------+------------------+--------+-------+---------+--------| | [2023-01-11] | original balance | +0.00 | +0.00 | +423.17 | 423.17 | | [2023-01-12] | dunkin | -18.68 | -1.00 | 403.49 | 423.17 | | [2023-01-13] | WalMart | -28.68 | -1.00 | 384.88 | 414.56 | | [2023-01-16] | Deposit | + | | 634.88 | 634.88 | | [2023-01-17] | Capris | - | - | 615.34 | 615.34 | | [2023-01-17] | Mcdonalds | -4.74 | -1.00 | 609.60 | 615.34 | | [2023-01-18] | verizon | - | - | 543.35 | 543.35 | | [2023-01-26] | dunkin | - | - | 542.37 | 542.37 | | [2023-02-01] | damgoodcafe | -13.28 | -1.00 | 528.09 | 542.37 | | | | | | | 0 | #+TBLFM: $6=3D'(- $5 $4 $3);N As you can see, The balance after WalMart does not add up, so I think this could be a good check to have. > Suggestions for any other improvements I could make on this table will be > appreciated and implemented if possible. I use ledger-cli for such tables which can generate suitable output. https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.html https://www.ledger-cli.org/3.0/doc/ledger3.html#Org-mode-with-Babel You could do some clever stuff like #+name: ledger-to-table #+begin_src elisp :var data=3D"" (concat "#+name: ledger-results\n" data "#+tblfm: \n")) #+end_src #+begin_src ledger :results raw :post ledger-to-table(*this*) :cmdline --re= gister-format "| %(format_date(date)) | %(payee) | %(display_account) | %(d= isplay_amount) | %(display_total) | \n" reg -M --wide --date-format %y-%m-%d 2022-06-15 * py2guile ArneBab:Assets:Autorenhonorar:epubli 3.13=E2=82=AC ArneBab:Income:sale:nonrpg:epubli #+end_src #+begin_src elisp :exports results (org-babel-do-load-languages 'org-babel-load-languages '((ledger . t) ;this is the important one for this tutorial )) nil #+end_src #+RESULTS: If you use ledger-cli for accounting, you can do pretty clever post-processing inside org-mode. Here=E2=80=99s an example that uses [[https://www.ledger-cli.org/3.0/doc/ledger3.html#Output-customization][--r= egister-format]] to provide the register results directly as an org-mode table: #+begin_src org ,#+name: ledger-to-table ,#+begin_src elisp :var data=3D"" (concat "#+name: ledger-results\n" data "#+tblfm: \n")) ,#+end_src ,#+begin_src ledger :results raw :post ledger-to-table(*this*) :cmdline --r= egister-format "| %(format_date(date)) | %(payee) | %(display_account) | %(= display_amount) | %(display_total) | \n" reg -D --wide --date-format %Y-%m-= %d 2022-06-15 * py2guile ArneBab:Assets:Autorenhonorar:epubli 3.13=E2=82=AC ArneBab:Income:sale:nonrpg:epubli ,#+end_src #+end_src This results in output like this (evaluated live on every export of this we= bsite): #+name: ledger-to-table #+begin_src elisp :var data=3D"" (concat "#+name: ledger-results\n" data "#+tblfm: \n")) #+end_src #+begin_src ledger :results raw :post ledger-to-table(*this*) :cmdline --re= gister-format "| %(format_date(date)) | %(payee) | %(display_account) | %(d= isplay_amount) | %(display_total) | \n" reg -D --wide --date-format %Y-%m-%d 2022-06-15 * py2guile ArneBab:Assets:Autorenhonorar:epubli 3.13=E2=82=AC ArneBab:Income:sale:nonrpg:epubli #+end_src #+RESULTS: #+name: ledger-results | 2022-06-15 | - 2022-06-15 | ArneBab:Assets:Autorenhonorar:epubli | 3.13= =E2=82=AC | 3.13=E2=82=AC |=20 | 2022-06-15 | - 2022-06-15 | ArneBab:Income:sale:nonrpg:epubli | -3.13=E2= =82=AC | 0.00=E2=82=AC |=20 #+tblfm:=20 Also see=20 =2D https://orgmode.org/worg/org-contrib/babel/languages/ob-doc-ledger.html =2D https://www.ledger-cli.org/3.0/doc/ledger3.html#Org-mode-with-Babel Best wishes, Arne =2D-=20 Unpolitisch sein hei=C3=9Ft politisch sein, ohne es zu merken. draketo.de --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJEBAEBCAAuFiEE801qEjXQSQPNItXAE++NRSQDw+sFAmPfAYwQHGFybmVfYmFi QHdlYi5kZQAKCRAT741FJAPD69cUEACqIWS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