On Saturday, April 9, 2022 at 12:53:06 PM UTC-7 [email protected] wrote:
> Hello Fang-Peng, > > thank you for sharing. I think having these are interesting tools! > > On 09/04/2022 08:26, Fang-Pen Lin wrote: > > > > I was working on my web base beancount SaaS product [...] > > I am curious about the busyness model for such an enterprise, but maybe > the Beancount mailing list is not the best place to discuss it... Sure, won't discuss it here then. > > I really like Python's black formatter and how it works. With the > > needs in mind, I built two projects: > > > > beancount-parser > > <https://github.com/LaunchPlatform/beancount-parser> - Standalone > > Lark based Beancount syntax parser > > I don't know Lark much and I had just a quick look, but something seems > odd: how do you handle indentation? I don't see anything about it in the > grammar files. I realize that ignoring this aspect may be fine if the > goal is to generate a syntax three to use in a formatting tool operating > on known valid input files. Otherwise, this is not a validating parser. > Maybe something to mention in the documentation. You are right, my parser tool won't validate the syntax. It's not meant to be a replacement of beancount core library, only to facilitate the formatter. And yeah, I will update the document to make it clear that there won't be validation for syntax. > > The reason I don't use Beancount lib is that I want to > > handle things like comments and emac org syntax > Please note that preserving comments (org-mode headers are just a > special kind of comments as far as the Beancount parser is concerned) is > a goal for the overhaul of the parser coming in Beancount v3. If you > feel to contribute, I would be very happy to review patches adding this > feature to Beancount. > You can try the formatter online here if you don't want to install them: > > > > https://beanhub.io/tools/beancount-formatter > > I tries this, but whatever I enter, I always get an error: > > 500 > Sorry! Something Went Wrong There were couple of bugs I just fixed and redeployed. Could you please try again now. > > Cheers, > Dan > -- 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 email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beancount/1957b613-9ab5-40fa-b720-8c864d69a38en%40googlegroups.com.
