Beanhub-forms, an open-sourced tool for defining custom-form and inserting transactions generated from a template

130 views
Skip to first unread message

Fang-Pen Lin

unread,
May 5, 2024, 8:58:46 AMMay 5
to Beancount

Hi Beancount users,

As a contractor working on software projects for my clients, I need to log the hours in the beancount book I spent on the contract job by the end of every day. Usually, my transaction for the hours spent looks like this.

2023-07-03 * "Hours spent on the software development project for client XYZ"
    Assets:AccountsReceivable:Contracting:XYZ      4 XYZ.HOUR @ 123 USD
    Income:Contracting:XYZ

It's fairly simple, but I must copy and paste it and modify the value every time. Make a git, commit, and push. I always wanted to have a form where I could input the value, click submit, and then generate the entry based on a predefined template. That's why I decided to build the custom-form feature for BeanHub. Later on, I realized people might want to test it locally, and it's really useful for all Beancount users, so I decided to open-source it. It was done for a while. I thought about sharing it with the community here but forgot 😅

The beanhub form CLI tool is open-sourced and available at this repo.

https://github.com/LaunchPlatform/beanhub-cli

The library for generating, validating, and processing the form definition file can be found here

https://github.com/LaunchPlatform/beanhub-forms

They are both under MIT license. You can follow the instructions described in the blog post to run the custom form locally.

https://beanhub.io/blog/2023/10/12/new-open-sourced-beanhub-cli-tools/

I have been using this feature for more than a year, and it saves me a lot of time. Hope you can also find this open-sourced tool useful. Feedback is welcome! 🙌

Best,
Fang-Pen Lin

fin

unread,
May 7, 2024, 5:22:17 AMMay 7
to bean...@googlegroups.com
Fang-Pen Lin wrote:


i took a look at it to see if i could use it but immediately
i realised it was too complicated for my needs.

basically i can get what i need using either editor macros,
a simple bash script or a python program. in the elder days i
would automatically just reach for C.

my feedback. :) but thank you for posting it.

fin


> ------=_Part_1926_1506821255.1714883858649
> Content-Type: multipart/alternative;
> boundary="----=_Part_1927_409920422.1714883858649"
>
> ------=_Part_1927_409920422.1714883858649
> Content-Type: text/plain; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable
>
>
>
> Hi Beancount users,
>
> As a contractor working on software projects for my clients, I need to log=
>=20
> the hours in the beancount book I spent on the contract job by the end of=
>=20
> every day. Usually, my transaction for the hours spent looks like this.
>
> 2023-07-03 * "Hours spent on the software development project for=20
> client XYZ"
> Assets:AccountsReceivable:Contracting:XYZ 4 XYZ.HOUR @ 123 USD
> Income:Contracting:XYZ
>
> It's fairly simple, but I must copy and paste it and modify the value every=
>=20
> time. Make a git, commit, and push. I always wanted to have a form where I=
>=20
> could input the value, click submit, and then generate the entry based on a=
>=20
> predefined template. That's why I decided to build the custom-form feature=
>=20
> for BeanHub. Later on, I realized people might want to test it locally, and=
>=20
> it's really useful for all Beancount users, so I decided to open-source it.=
>=20
> It was done for a while. I thought about sharing it with the community here=
>=20
> but forgot =F0=9F=98=85
>
> The beanhub form CLI tool is open-sourced and available at this repo.
>
> https://github.com/LaunchPlatform/beanhub-cli
>
> The library for generating, validating, and processing the form definition=
>=20
> file can be found here
>
> https://github.com/LaunchPlatform/beanhub-forms
>
> They are both under MIT license. You can follow the instructions described=
>=20
> in the blog post to run the custom form locally.
>
> https://beanhub.io/blog/2023/10/12/new-open-sourced-beanhub-cli-tools/
>
> I have been using this feature for more than a year, and it saves me a lot=
>=20
> of time. Hope you can also find this open-sourced tool useful. Feedback is=
>=20
> welcome! =F0=9F=99=8C
>
> Best,
> Fang-Pen Lin
>
> --=20
> You received this message because you are subscribed to the Google Groups "=
> Beancount" group.
> To unsubscribe from this group and stop receiving emails from it, send an e=
> mail to beancount+...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/=
> beancount/1865515a-e00c-4f8d-900c-56c746eb0d90n%40googlegroups.com.
>
> ------=_Part_1927_409920422.1714883858649
> Content-Type: text/html; charset="UTF-8"
> Content-Transfer-Encoding: quoted-printable
>
><p>Hi Beancount users,</p><p></p><p>As a contractor working on=C2=A0softwar=
> e projects for my clients, I need to log the hours in the beancount book I =
> spent on the contract job by the end of every day. Usually, my transaction =
> for the hours spent looks like this.</p><p></p><p>2023-07-03 * "Hours spent=
> on the software development project for client=C2=A0XYZ"<br />=C2=A0 =C2=
>=A0 Assets:AccountsReceivable:Contracting:XYZ=C2=A0 =C2=A0 =C2=A0=C2=A04 XY=
> Z.HOUR @ 123 USD<br />=C2=A0 =C2=A0 Income:Contracting:XYZ</p><p></p><p>It'=
> s fairly simple,=C2=A0but I must copy and paste it and modify the value eve=
> ry time. Make a git, commit, and push. I always wanted to have a form where=
> I could input the value, click submit, and then generate the entry based o=
> n a predefined template. That's why I decided to build the custom-form feat=
> ure for BeanHub. Later on, I realized people might want to test it locally,=
> and it's really useful for all Beancount users, so I decided to open-sourc=
> e it. It was done for a while. I thought about sharing it with the communit=
> y here but forgot =F0=9F=98=85</p><p></p><p>The beanhub form CLI tool is op=
> en-sourced and available at this repo.</p><p></p><p><a href=3D"https://gith=
> ub.com/LaunchPlatform/beanhub-cli">https://github.com/LaunchPlatform/beanhu=
> b-cli</a></p><p></p><p>The library for generating, validating, and processi=
> ng the form definition file can be found=C2=A0here</p><p></p><p><a href=3D"=
> https://github.com/LaunchPlatform/beanhub-forms">https://github.com/LaunchP=
> latform/beanhub-forms</a></p><p>They are both under MIT license. You can fo=
> llow the instructions described in the blog post to run the custom form loc=
> ally.</p><p></p><p><a href=3D"https://beanhub.io/blog/2023/10/12/new-open-s=
> ourced-beanhub-cli-tools/">https://beanhub.io/blog/2023/10/12/new-open-sour=
> ced-beanhub-cli-tools/</a></p><p></p><p>I have been using this feature for =
> more than a year, and it saves me a lot of time.=C2=A0Hope=C2=A0you=C2=A0ca=
> n=C2=A0also find this open-sourced tool useful.=C2=A0Feedback is welcome! =
>=F0=9F=99=8C</p><p></p><p>Best,<br />Fang-Pen Lin</p>
>
><p></p>
>
> -- <br />
> You received this message because you are subscribed to the Google Groups &=
> quot;Beancount&quot; group.<br />
> To unsubscribe from this group and stop receiving emails from it, send an e=
> mail to <a href=3D"mailto:beancount+...@googlegroups.com">beancount=
> +unsub...@googlegroups.com</a>.<br />
> To view this discussion on the web visit <a href=3D"https://groups.google.c=
> om/d/msgid/beancount/1865515a-e00c-4f8d-900c-56c746eb0d90n%40googlegroups.c=
> om?utm_medium=3Demail&utm_source=3Dfooter">https://groups.google.com/d/msgi=
> d/beancount/1865515a-e00c-4f8d-900c-56c746eb0d90n%40googlegroups.com</a>.<b=
> r />
>
> ------=_Part_1927_409920422.1714883858649--
>
> ------=_Part_1926_1506821255.1714883858649--
>

Justus Pendleton

unread,
May 8, 2024, 10:22:52 PMMay 8
to Beancount
Thanks for this, it is pretty nifty. I do an international wire transfer every few months and I always need to scroll through my beancount file to remember the exact format for everything I need to enter (intermediate bank transfer fees, receiving wire transfer fees, the transfer goes exits one account into a Transfer limbo account for a few days until it arrives at the destination, etc, etc). Just using this seems like a nice alternative.

Fang-Pen Lin

unread,
May 9, 2024, 9:09:49 PMMay 9
to Beancount

Hi Fin,

Yes, that's a valid point. We, as software engineers, have so many different ways to achieve the same thing. However, my goal is to bridge the gap between non-technical and less technical users. One of the biggest challenges people face when they try to use plaintext accounting, requiring programming to help automate routines, is one of the biggest obstacles to overcome for many.

With beanhub-forms, one can easily define a form without programming skills. They only need to learn YAML file syntax, Jinja2 template syntax, and the beanhub-forms document schema itself. Well, that's still something to know. However, in the future, I may also provide a graphical user interface for the user to design the form without the need to write any single line of code. If the form is already made, a non-technical user can also create Beancount entries without knowing how to open a terminal and type any command. That's very helpful in some situations, such as if I share the same accounting book with my wife, I can create a form for her to input some common household spending without my help. That's the value of having a nice user interface.

Personally, I really love the way plaintext accounting works, and I think more people should use it. That's why I built those tools to make it easier. Hope that makes sense 😄

Best,
Fang-Pen Lin.

Reply all
Reply to author
Forward
0 new messages