From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Joost Kremers Newsgroups: gmane.emacs.devel Subject: [ELPA] New package: csv2ledger Date: Fri, 17 May 2024 16:24:14 +0200 Message-ID: <86frug1ppt.fsf@fastmail.fm> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21714"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri May 17 16:25:35 2024 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1s7yWc-0005PR-2Z for ged-emacs-devel@m.gmane-mx.org; Fri, 17 May 2024 16:25:35 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s7yVY-00087a-Ai; Fri, 17 May 2024 10:24:28 -0400 Original-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 1s7yVW-00087K-FU for emacs-devel@gnu.org; Fri, 17 May 2024 10:24:26 -0400 Original-Received: from wfout1-smtp.messagingengine.com ([64.147.123.144]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s7yVS-0005mk-UC for emacs-devel@gnu.org; Fri, 17 May 2024 10:24:25 -0400 Original-Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailfout.west.internal (Postfix) with ESMTP id 2FDB81C000FD for ; Fri, 17 May 2024 10:24:19 -0400 (EDT) Original-Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Fri, 17 May 2024 10:24:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:content-type:content-type:date:date:from:from:in-reply-to :message-id:mime-version:reply-to:subject:subject:to:to; s=fm1; t=1715955859; x=1716042259; bh=9KSknG7ac6nc1UBrGuXZ4cdzgNm6CfRF 1zpcnYove08=; b=vE3LUxlD7iYqpZvN9sgk3Y0rGSBDoqMOuEIEbCtWLWiIWQjT l5JE5RV3vCNwZR89UmH26glTh4MfloY9e42Q9ERj37vwKRODP/sSTMcMOmioVijW hRcb/HBuWYgR5LWG0TUREncHDO2uUcw9eyHAPf3LGixBZXAHFL0CZXqu81F4IYKu xXIjnwnYn9irerVo0RaRohVUQ0jIrtHFNr1U44zfombM60yV0sO/AvZPye0hVrSn S8zCtRQWU5b1KHg3tyHYbbXnF/BREh2TkwhzSQ0IWP+qhYJkQ+7jBQO7yGoWud/a ZLfn2Pd1IbYQy6Vt/HodUCf/I068J4ywOjfCvA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:message-id :mime-version:reply-to:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1715955859; x=1716042259; bh=9KSknG7ac6nc1UBrGuXZ4cdzgNm6CfRF1zp cnYove08=; b=QyiQvLiRHenI9nAb+9IFytjqEBX5CzUooBIO9IeVPSSacqgAIMU z5GymZsn1X6yy+NrY3/I6ughZlTkKJqafbAL1h84h9dXT+CsQnjZ1bJp9aP+Uzaq 5mHwTTIE4kxiUG3YZzIYXiarnv44WMpb9apmzUfWyU2vcjxa0Tyb4me/ihSMjMeU G4f4ilOdnKlNV7F9bxPTojrpxSYfOkG7gqusukaZqrQuO3rXR2djmnWQuXDkVrvN AEhyTAoBl5yP/nGPYsw2L5YG5+1FcwB1OHAKoPNZHBYugBXmXPJNM5fz+PVAvB42 JmAmsbcv9gdFi4WKZRqsUwMs1gQXWlHLm+A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrvdehfedguddvkecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhephffvufffkfggtgesthdtredttd dttdenucfhrhhomheplfhoohhsthcumfhrvghmvghrshcuoehjohhoshhtkhhrvghmvghr shesfhgrshhtmhgrihhlrdhfmheqnecuggftrfgrthhtvghrnhepfedtffdvudekudejhf egheefgfehkefhfffhleelgfdvudejgfeutedtjeehiefgnecuffhomhgrihhnpegtohgu vggsvghrghdrohhrghdplhgvughgvghrqdgtlhhirdhorhhgpdhmvghlphgrrdhorhhgne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhoohhs thhkrhgvmhgvrhhssehfrghsthhmrghilhdrfhhm X-ME-Proxy: Feedback-ID: ie15541ac:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA for ; Fri, 17 May 2024 10:24:18 -0400 (EDT) Received-SPF: pass client-ip=64.147.123.144; envelope-from=joostkremers@fastmail.fm; helo=wfout1-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.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_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:319323 Archived-At: Hi, I would like to offer a new package I wrote for inclusion to Non-GNU ELPA: https://codeberg.org/joostkremers/csv2ledger `csv2ledger` does what it says: it converts CSV files to Ledger[1] entries. Most banks offer the option to download transactions as a CSV file. With `csv2ledger`, these can be converted to entries suitable for Ledger. There are already many solutions to do this conversion, not the least Ledger itself, which provides a `convert` command. None of these are Emacs-based, however, and none that I know of offer the customisability that I needed myself. `csv2ledger` is extremely customisable: with a little Elisp scripting, it is able to handle just about anything a bank could come up with in a CSV file. Also, the user can customise the Ledger entry in any way they see fit.[2] At the same time, though, I tried to keep the basic configuration simple and useful enough that it can be used without any Elisp scripting. I'm proposing this package for inclusion into Non-GNU ELPA, not GNU ELPA, because it depends on a package that's only available on MELPA, `parse-csv`.[3] (If that is a problem, please let me know. I'm assuming it's a problem for GNU ELPA, but not for Non-GNU ELPA.)[4] TIA, Joost Footnotes: [1] https://ledger-cli.org/ [2] In fact, it is so customisable that you could use it to convert CSV files to any format you like. JSON, YAML, whatever you fancy. Even XML if you're so inclined... :D [3] https://melpa.org/#/parse-csv [4] If anyone has suggestions on how to get rid of that dependency, I'm all ears. `parse-csv` looks like a real parser, not the kind of regex-kludge that I would come up with... I've looked at `csv-mode`, which is on GNU ELPA (and which is also a dependency), but I don't think it can be used (easily) to parse CSV data. -- Joost Kremers Life has its moments