Sorry, somehow my reply doesn't show up, I guess I press the wrong button to reply to author instead of the mailing list, so do it here again.
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. Yeah, you are right, it does not validate the syntax. The parser was not meant to be a replacement for beancount core lib but only to facilitate the formatter, that's why it doesn't care about the syntax is valid or not. I have already updated the README to make it clear that it does not validate > > > 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 > I just fix a couple of bugs and redeployed, 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/c57497bb-debc-47ec-a0a5-e4fd70fa1f78n%40googlegroups.com.
