Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
I just updated the pull request with the fix, unless I messed up fix
mercurial again, I rewrote the history to contain the fix.

On 02/06/2019 19:25, Martin Blais wrote:
> Just add it on top and I'll reimport from scratch
> 
> 
> On Sun, Jun 2, 2019 at 9:17 PM Daniele Nicolodi  > wrote:
> 
> On 02/06/2019 18:32, Daniele Nicolodi wrote:
> > On 02/06/2019 18:24, Martin Blais wrote:
> >> Another issue: The account completion seems broken ; the list of
> account
> >> is in beancount-accounts is empty and I can't insert an account name.
> >
> > That must have broken in the refactoring. I'm on it.
> 
> I indeed forgot to include an hunk in one of the patches. I'm currently
> fighting with `hg histedit`...
> 
> 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 beancount+unsubscr...@googlegroups.com
> .
> To post to this group, send email to beancount@googlegroups.com
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAK21%2BhPoYHFv%2BzhbzJayBAtpefb69d-tSVJMNAgn8CyBrT4pZg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/0f9c0a6f-e29f-6ad7-7129-3bad91bb5265%40grinta.net.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
I just noticed that my beancount repository on bitbucket also has two
heads... I need to fix that as well. Apparently `hg push --force` does
not do the same thing as `git push --force`...

On 02/06/2019 19:25, Martin Blais wrote:
> Just add it on top and I'll reimport from scratch
> 
> 
> On Sun, Jun 2, 2019 at 9:17 PM Daniele Nicolodi  > wrote:
> 
> On 02/06/2019 18:32, Daniele Nicolodi wrote:
> > On 02/06/2019 18:24, Martin Blais wrote:
> >> Another issue: The account completion seems broken ; the list of
> account
> >> is in beancount-accounts is empty and I can't insert an account name.
> >
> > That must have broken in the refactoring. I'm on it.
> 
> I indeed forgot to include an hunk in one of the patches. I'm currently
> fighting with `hg histedit`...
> 
> 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 beancount+unsubscr...@googlegroups.com
> .
> To post to this group, send email to beancount@googlegroups.com
> .
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/CAK21%2BhPoYHFv%2BzhbzJayBAtpefb69d-tSVJMNAgn8CyBrT4pZg%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/92e8cbf9-2d2e-0b92-94d4-23559990c219%40grinta.net.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
Just add it on top and I'll reimport from scratch


On Sun, Jun 2, 2019 at 9:17 PM Daniele Nicolodi  wrote:

> On 02/06/2019 18:32, Daniele Nicolodi wrote:
> > On 02/06/2019 18:24, Martin Blais wrote:
> >> Another issue: The account completion seems broken ; the list of account
> >> is in beancount-accounts is empty and I can't insert an account name.
> >
> > That must have broken in the refactoring. I'm on it.
>
> I indeed forgot to include an hunk in one of the patches. I'm currently
> fighting with `hg histedit`...
>
> 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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhPoYHFv%2BzhbzJayBAtpefb69d-tSVJMNAgn8CyBrT4pZg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
On 02/06/2019 18:32, Daniele Nicolodi wrote:
> On 02/06/2019 18:24, Martin Blais wrote:
>> Another issue: The account completion seems broken ; the list of account
>> is in beancount-accounts is empty and I can't insert an account name.
> 
> That must have broken in the refactoring. I'm on it.

I indeed forgot to include an hunk in one of the patches. I'm currently
fighting with `hg histedit`...

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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/144375c9-7a96-97ff-43ec-f13847cb921c%40grinta.net.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
On 02/06/2019 18:24, Martin Blais wrote:
> Another issue: The account completion seems broken ; the list of account
> is in beancount-accounts is empty and I can't insert an account name.

That must have broken in the refactoring. I'm on it

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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/45461968-c62c-1b4f-adb5-1c1ac25a7357%40grinta.net.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
Another strange thing: when I press ENTER at the end of a line, the amount
automatically indents itself...
Personally I find that annoying (especially if there are cases it will get
it wrong), I think it should be optional.


On Sun, Jun 2, 2019 at 8:24 PM Martin Blais  wrote:

> Another issue: The account completion seems broken ; the list of account
> is in beancount-accounts is empty and I can't insert an account name.
>
>
> On Sun, Jun 2, 2019 at 8:10 PM Martin Blais  wrote:
>
>> On Sun, Jun 2, 2019 at 7:05 PM Daniele Nicolodi 
>> wrote:
>>
>>> On 02/06/2019 16:16, Martin Blais wrote:
>>> > Thanks Dan,
>>> > I fixed most of the issues I had with these changes:
>>>
>>> Nice! Which issues do remain?
>>>
>>
>> Give me a few days to run this myself and see if I encounter anything,
>> then I'll merge.
>>
>> Just the font-locking on the section headings would be super nice to
>> have, but it's not absolutely necessary.
>>
>>
>>> > (require 'beancount)
>>> > (setq beancount-outline-regexp "\\*+ ")
>>>
>>> Yeah, I forgot to escape the * in the regexp...
>>>
>>> > (define-key* beancount-mode-map [(control c)(control n)]
>>> > 'outline-next-visible-heading)
>>> > (define-key* beancount-mode-map [(control c)(control p)]
>>> > 'outline-previous-visible-heading)
>>>
>>> I'm hesitating to add those binding to to beancount.el as I would need
>>> to find a way to make that conditional to having outline-minor-mode
>>> loaded. What do you think?
>>>
>>
>> No need to; I and others can just add them locally in our configs if
>> desired.
>>
>>
>>
>>>
>>> > (add-hook 'beancount-mode-hook 'outline-minor-mode)
>>> >
>>> >
>>> > I have a question. Is there a way to bring back the font-lock coloring
>>> > for the outline headings?
>>> > With or-mode their distinguished color made it really salient which
>>> > level they're at.
>>> > I'm seeing them all white.
>>>
>>> I don't think outline-minor-mode provides fontification for headings.
>>> But it should not be hard to add it. I'll look into this.
>>>
>>
>> Please, that visual  really makes it clear.
>> But it's not an absolute must.
>>
>> Thank you for this, give me a bit of time and I'll merge this for sure.
>>
>>
>>
>>
>>>
>>> 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 beancount+unsubscr...@googlegroups.com.
>>> To post to this group, send email to beancount@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/3ff25066-b8eb-cc4e-5b60-ed745c4ce8a1%40grinta.net
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhOw8n5iUFdMatbzjF1J3r54y9hF7ynWP05N6x2KCVk%3DKQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
Another issue: The account completion seems broken ; the list of account is
in beancount-accounts is empty and I can't insert an account name.


On Sun, Jun 2, 2019 at 8:10 PM Martin Blais  wrote:

> On Sun, Jun 2, 2019 at 7:05 PM Daniele Nicolodi 
> wrote:
>
>> On 02/06/2019 16:16, Martin Blais wrote:
>> > Thanks Dan,
>> > I fixed most of the issues I had with these changes:
>>
>> Nice! Which issues do remain?
>>
>
> Give me a few days to run this myself and see if I encounter anything,
> then I'll merge.
>
> Just the font-locking on the section headings would be super nice to have,
> but it's not absolutely necessary.
>
>
>> > (require 'beancount)
>> > (setq beancount-outline-regexp "\\*+ ")
>>
>> Yeah, I forgot to escape the * in the regexp...
>>
>> > (define-key* beancount-mode-map [(control c)(control n)]
>> > 'outline-next-visible-heading)
>> > (define-key* beancount-mode-map [(control c)(control p)]
>> > 'outline-previous-visible-heading)
>>
>> I'm hesitating to add those binding to to beancount.el as I would need
>> to find a way to make that conditional to having outline-minor-mode
>> loaded. What do you think?
>>
>
> No need to; I and others can just add them locally in our configs if
> desired.
>
>
>
>>
>> > (add-hook 'beancount-mode-hook 'outline-minor-mode)
>> >
>> >
>> > I have a question. Is there a way to bring back the font-lock coloring
>> > for the outline headings?
>> > With or-mode their distinguished color made it really salient which
>> > level they're at.
>> > I'm seeing them all white.
>>
>> I don't think outline-minor-mode provides fontification for headings.
>> But it should not be hard to add it. I'll look into this.
>>
>
> Please, that visual  really makes it clear.
> But it's not an absolute must.
>
> Thank you for this, give me a bit of time and I'll merge this for sure.
>
>
>
>
>>
>> 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 beancount+unsubscr...@googlegroups.com.
>> To post to this group, send email to beancount@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/beancount/3ff25066-b8eb-cc4e-5b60-ed745c4ce8a1%40grinta.net
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMm4oRax5gKhJ%3DfjfGbe3T9w%2BugXCihwJvCLyUYnSQMQw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
On Sun, Jun 2, 2019 at 7:05 PM Daniele Nicolodi  wrote:

> On 02/06/2019 16:16, Martin Blais wrote:
> > Thanks Dan,
> > I fixed most of the issues I had with these changes:
>
> Nice! Which issues do remain?
>

Give me a few days to run this myself and see if I encounter anything, then
I'll merge.

Just the font-locking on the section headings would be super nice to have,
but it's not absolutely necessary.


> > (require 'beancount)
> > (setq beancount-outline-regexp "\\*+ ")
>
> Yeah, I forgot to escape the * in the regexp...
>
> > (define-key* beancount-mode-map [(control c)(control n)]
> > 'outline-next-visible-heading)
> > (define-key* beancount-mode-map [(control c)(control p)]
> > 'outline-previous-visible-heading)
>
> I'm hesitating to add those binding to to beancount.el as I would need
> to find a way to make that conditional to having outline-minor-mode
> loaded. What do you think?
>

No need to; I and others can just add them locally in our configs if
desired.



>
> > (add-hook 'beancount-mode-hook 'outline-minor-mode)
> >
> >
> > I have a question. Is there a way to bring back the font-lock coloring
> > for the outline headings?
> > With or-mode their distinguished color made it really salient which
> > level they're at.
> > I'm seeing them all white.
>
> I don't think outline-minor-mode provides fontification for headings.
> But it should not be hard to add it. I'll look into this.
>

Please, that visual  really makes it clear.
But it's not an absolute must.

Thank you for this, give me a bit of time and I'll merge this for sure.




>
> 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 beancount+unsubscr...@googlegroups.com.
> To post to this group, send email to beancount@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/3ff25066-b8eb-cc4e-5b60-ed745c4ce8a1%40grinta.net
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhP0YGiV%2B%3DGmo3uPHsWRZqQCkiaUBwsOpQWK8irSivqG9w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
On 02/06/2019 16:16, Martin Blais wrote:
> Thanks Dan,
> I fixed most of the issues I had with these changes:

Nice! Which issues do remain?

> (require 'beancount)
> (setq beancount-outline-regexp "\\*+ ")

Yeah, I forgot to escape the * in the regexp...

> (define-key* beancount-mode-map [(control c)(control n)]
> 'outline-next-visible-heading)
> (define-key* beancount-mode-map [(control c)(control p)]
> 'outline-previous-visible-heading)

I'm hesitating to add those binding to to beancount.el as I would need
to find a way to make that conditional to having outline-minor-mode
loaded. What do you think?

> (add-hook 'beancount-mode-hook 'outline-minor-mode)
> 
> 
> I have a question. Is there a way to bring back the font-lock coloring
> for the outline headings?
> With or-mode their distinguished color made it really salient which
> level they're at.
> I'm seeing them all white.

I don't think outline-minor-mode provides fontification for headings.
But it should not be hard to add it. I'll look into this.

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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/3ff25066-b8eb-cc4e-5b60-ed745c4ce8a1%40grinta.net.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
Thanks Dan,
I fixed most of the issues I had with these changes:

(require 'beancount)
(setq beancount-outline-regexp "\\*+ ")
(define-key* beancount-mode-map [(control c)(control n)]
'outline-next-visible-heading)
(define-key* beancount-mode-map [(control c)(control p)]
'outline-previous-visible-heading)
(add-hook 'beancount-mode-hook 'outline-minor-mode)


I have a question. Is there a way to bring back the font-lock coloring for
the outline headings?
With or-mode their distinguished color made it really salient which level
they're at.
I'm seeing them all white.





On Sun, Jun 2, 2019 at 5:52 PM Daniele Nicolodi  wrote:

> On 02/06/2019 15:39, Martin Blais wrote:
> > Also, TAB seems not to work as previously; with org-mode I used to be
> > able to toggle this way.
> > Now TAB invokes completion.
> >
> > Do you have a config setup I could try that keeps the bindings close to
> > what they used to be, at least for tab and moving between sections?
> > I'd like to merge this, but I have little time to debug.
>
> Hi Martin,
>
> thank you for testing!
>
> Basic outline functionality works for me, but I realized that I tested
> it only using three or more semicolons (";;;") as the section marker. I
> slightly prefer this syntax because the section headings are fontified
> as comments.
>
> However, I just tried with the org-mode syntax and indeed it does not
> work. There a regular expression to fix. It should not take long.
>
> As for the bindings, once this is fixed TAB will do the right thing:
> section folding if the point is on a section header, or completion
> otherwise.  What keybinding do you expect to work for moving between the
> sections? Those are defined by outline mode and are different from the
> ones used by org-mode.
>
> 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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhN9SkH3DqjFaTJ1ouid-f3U_98Mpby_%2B3OmVn4nsQWyvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Daniele Nicolodi
On 02/06/2019 15:39, Martin Blais wrote:
> Also, TAB seems not to work as previously; with org-mode I used to be
> able to toggle this way.
> Now TAB invokes completion.
> 
> Do you have a config setup I could try that keeps the bindings close to
> what they used to be, at least for tab and moving between sections?
> I'd like to merge this, but I have little time to debug.

Hi Martin,

thank you for testing!

Basic outline functionality works for me, but I realized that I tested
it only using three or more semicolons (";;;") as the section marker. I
slightly prefer this syntax because the section headings are fontified
as comments.

However, I just tried with the org-mode syntax and indeed it does not
work. There a regular expression to fix. It should not take long.

As for the bindings, once this is fixed TAB will do the right thing:
section folding if the point is on a section header, or completion
otherwise.  What keybinding do you expect to work for moving between the
sections? Those are defined by outline mode and are different from the
ones used by org-mode.

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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/9304b701-3db4-d848-c095-331a85eac234%40grinta.net.
For more options, visit https://groups.google.com/d/optout.


Re: [emacs] using ledger-mode for beancount

2019-06-02 Thread Martin Blais
Just spent a half-hour trying to get outline-minor-mode with it, I can't
get the basics to work.
I keep getting this error:
outline-back-to-heading: Before first heading




On Sat, Jun 1, 2019 at 9:20 PM Martin Blais  wrote:

> Yes, just need a bit of time to review and test out the CL.
> Maybe Tomorrow.
> (Limited cycles.)
>
>
>
> On Sat, Jun 1, 2019 at 8:20 PM Daniele Nicolodi 
> wrote:
>
>> On 19/05/2019 17:45, Daniele Nicolodi wrote:
>> > On 31/03/2019 06:15, Stefano Zacchiroli wrote:
>> >> On Sun, Mar 17, 2019 at 05:41:16PM -0600, Daniele Nicolodi wrote:
>> >>> I would like to upstream my changes, however, now that I know how I
>> >>> would like the code to look like at the end, I would need to break up
>> >>> my changes in a patchset and submit if for inclusion. This would
>> >>> require some time investment. I haven't seen any interested from
>> >>> Martin about those changes, thus am I reluctant to put that last bit
>> >>> of work in.
>> >>
>> >> Martin: can you comment on this?
>> >
>> > I have now cleaned up my changes in reviewable patches and submitted a
>> > pull request:
>> >
>> >
>> https://bitbucket.org/blais/beancount/pull-requests/115/revamp-beancountel/diff
>>
>> Martin,
>>
>> do you still have interested in beancount-mode?  I'm happy to move
>> beancount-mode to another repository if you are not.
>>
>> Thank you in advance.
>>
>> Best,
>> 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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAK21%2BhMXfEL_On4HEOGfnHbVVrBfVX61k%3DB1f3rMuTOQ059O8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


bean-query rounding too much due to fractional_common

2019-06-02 Thread Andrzej Kotulski
I have a problem when running bean-query - it's rounding numbers too 
much which leads to wrong results in csv file I generate from it.

Is there a way to force set `fractional_common` somewhere?
Ideas:
1. I use custom importer to produce transactions, maybe there is a way 
to automatically add two fractional zeroes to the transaction?

2. Or maybe I can set it explicitly for that currency?
3. For now I did this: add two fractional zeroes to most transactions 
manually, this will force fractional_common=2


Use case is that I'm tracking time in quarter increments (15 min = 0.25 
hr) but most of my "transactions" are either full hours or half hours. 
This leads to deriving `fractional_common=1` which leads to reporting 15 
minutes as 0.2 hours.


I attach file I used to illustrate the problem

$ bean-query test.beancount 'SELECT date, number WHERE account ~ 
"Expenses:Bills" AND month(date) = 5'

   date    numb
-- 
2019-05-03 15.5
2019-05-10 15.5
2019-05-20  5.2
-- SHOULD BE:
-- 2019-05-20  5.25

$ bean-doctor display_context test.beancount
USD : sign=1   integer_max=4 fractional_common=1   
fractional_max=2   "-.0" "-.00"
__default__ : sign=0   integer_max=1 fractional_common=_   
fractional_max=_   "0.*" "0.*"


--
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/e768b3db-31a6-17a3-3851-cfb8efdf2f93%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
;; -*- mode: org; mode: beancount; coding: utf-8; fill-column: 400; -*-

2019-04-01 commodity USD

2019-04-01 open Assets:Bank

2019-04-01 open Expenses:Bills

2019-04-01 open Income:Salary

; April
2019-04-02 * "Salary"
  Assets:Bank 1000 USD
  Income:Salary 

2019-04-03 * "Bill"
  Assets:Bank -10.0 USD
  Expenses:Bills 

; May
2019-05-02 * "Salary"
  Assets:Bank 1000 USD
  Income:Salary 

2019-05-03 * "Bill"
  Assets:Bank -15.5 USD
  Expenses:Bills

2019-05-10 * "Bill"
  Assets:Bank -15.5 USD
  Expenses:Bills

2019-05-20 * "Bill"
  Assets:Bank -5.25 USD
  Expenses:Bills

; June
2019-06-01 * "Bill"
  Assets:Bank -10.0 USD
  Expenses:Bills 

2019-06-02 * "Salary"
  Assets:Bank 1000 USD
  Income:Salary


Re: Using pandas with beancount

2019-06-02 Thread Andrzej


I use pandas to do some analysis of my beancount file. I use beancount 
query mechanism to extract interesting entries and then stuff them into 
dataframe. I typed example below (beware, I didn't test it and I'm not 
doing error checking)


from beancount import loader
from beancount.query import query
import pandas as pd
q = "SELECT account, date, number WHERE year = {}"
entries, errors, options_map = loader.load_file(PATH_TO_FILE)
rtypes, rrows = query.run_query(entries, options_map, q, 2019)
df = pd.DataFrame(rrows)
...


On Sunday, June 2, 2019 at 5:12:57 PM UTC+2, Chary Chary wrote:
>
> Hello everybody,
>
> I am just wondering whether there is possibility to use a broad python 
> data analysis tools (like pandas) with beancount?
>
> Importing data in pandas and then analyzing it using pandas further?
>
> Or the answer is the same as with SQL, that pandas are not good for double 
> entry accounting type of data?
>

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/6f381f69-20cb-4c22-8952-84936ccb065a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using pandas with beancount

2019-06-02 Thread Chary Chary
francois,

thanks. Would be interesting to know how you combine functionality of 
beancount and pandas?



   - what do you use beancount for
   - what do you use pandas for


On Sunday, June 2, 2019 at 5:55:21 PM UTC+2, francois PEGORY wrote:
>
> Currently I do by exporting CSV from beancoumt then importing in  panda 
>
> Le dim. 2 juin 2019 à 17:48, Chary Chary > 
> a écrit :
>
>> Uwe,
>>
>> I was actually thinking other way around: get transactions (checked and 
>> verified by beancount) into pandas and process them further in pandas
>>
>> On Sunday, June 2, 2019 at 5:23:03 PM UTC+2, Uwe Ziegenhagen wrote:
>>>
>>> I am currently thinking on how to get my transaction data from my bank 
>>> accounts into beancount. I can get my bank statements via HBCI into pandas, 
>>> from there I create the imports. I'll post the code once I am done with it.
>>>
>>> Uwe
>>>
>>> Am So., 2. Juni 2019 um 17:12 Uhr schrieb Chary Chary >> >:
>>>
 Hello everybody,

 I am just wondering whether there is possibility to use a broad python 
 data analysis tools (like pandas) with beancount?

 Importing data in pandas and then analyzing it using pandas further?

 Or the answer is the same as with SQL, that pandas are not good for 
 double entry accounting type of data?

 -- 
 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 bean...@googlegroups.com.
 To post to this group, send email to bean...@googlegroups.com.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/beancount/895c4f02-7b07-406b-898f-f6d4e0dc4933%40googlegroups.com
  
 
 .
 For more options, visit https://groups.google.com/d/optout.

>>>
>>>
>>> -- 
>>> Dr. Uwe Ziegenhagen
>>> 0179-7476050
>>> 
>>>
>> -- 
>> 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 bean...@googlegroups.com .
>> To post to this group, send email to bean...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beancount/22ebfe35-5533-4fa6-bf21-cb354a964763%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/f1615271-9051-4ba8-aa24-9731c3c2f7bc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using pandas with beancount

2019-06-02 Thread francois PEGORY
Currently I do by exporting CSV from beancoumt then importing in  panda

Le dim. 2 juin 2019 à 17:48, Chary Chary  a écrit :

> Uwe,
>
> I was actually thinking other way around: get transactions (checked and
> verified by beancount) into pandas and process them further in pandas
>
> On Sunday, June 2, 2019 at 5:23:03 PM UTC+2, Uwe Ziegenhagen wrote:
>>
>> I am currently thinking on how to get my transaction data from my bank
>> accounts into beancount. I can get my bank statements via HBCI into pandas,
>> from there I create the imports. I'll post the code once I am done with it.
>>
>> Uwe
>>
>> Am So., 2. Juni 2019 um 17:12 Uhr schrieb Chary Chary > >:
>>
>>> Hello everybody,
>>>
>>> I am just wondering whether there is possibility to use a broad python
>>> data analysis tools (like pandas) with beancount?
>>>
>>> Importing data in pandas and then analyzing it using pandas further?
>>>
>>> Or the answer is the same as with SQL, that pandas are not good for
>>> double entry accounting type of data?
>>>
>>> --
>>> 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 bean...@googlegroups.com.
>>> To post to this group, send email to bean...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/beancount/895c4f02-7b07-406b-898f-f6d4e0dc4933%40googlegroups.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> Dr. Uwe Ziegenhagen
>> 0179-7476050
>> 
>>
> --
> 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 beancount+unsubscr...@googlegroups.com.
> To post to this group, send email to beancount@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/22ebfe35-5533-4fa6-bf21-cb354a964763%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CALUWbLcwjFzXYQZh-sNMCYmCOubf2crjzBo-tMMiHzv3_Z%3Dz_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using pandas with beancount

2019-06-02 Thread Chary Chary
Uwe,

I was actually thinking other way around: get transactions (checked and 
verified by beancount) into pandas and process them further in pandas

On Sunday, June 2, 2019 at 5:23:03 PM UTC+2, Uwe Ziegenhagen wrote:
>
> I am currently thinking on how to get my transaction data from my bank 
> accounts into beancount. I can get my bank statements via HBCI into pandas, 
> from there I create the imports. I'll post the code once I am done with it.
>
> Uwe
>
> Am So., 2. Juni 2019 um 17:12 Uhr schrieb Chary Chary  >:
>
>> Hello everybody,
>>
>> I am just wondering whether there is possibility to use a broad python 
>> data analysis tools (like pandas) with beancount?
>>
>> Importing data in pandas and then analyzing it using pandas further?
>>
>> Or the answer is the same as with SQL, that pandas are not good for 
>> double entry accounting type of data?
>>
>> -- 
>> 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 bean...@googlegroups.com .
>> To post to this group, send email to bean...@googlegroups.com 
>> .
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/beancount/895c4f02-7b07-406b-898f-f6d4e0dc4933%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> -- 
> Dr. Uwe Ziegenhagen
> 0179-7476050
> 
>

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/22ebfe35-5533-4fa6-bf21-cb354a964763%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using pandas with beancount

2019-06-02 Thread Uwe Ziegenhagen
I am currently thinking on how to get my transaction data from my bank
accounts into beancount. I can get my bank statements via HBCI into pandas,
from there I create the imports. I'll post the code once I am done with it.

Uwe

Am So., 2. Juni 2019 um 17:12 Uhr schrieb Chary Chary :

> Hello everybody,
>
> I am just wondering whether there is possibility to use a broad python
> data analysis tools (like pandas) with beancount?
>
> Importing data in pandas and then analyzing it using pandas further?
>
> Or the answer is the same as with SQL, that pandas are not good for double
> entry accounting type of data?
>
> --
> 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 beancount+unsubscr...@googlegroups.com.
> To post to this group, send email to beancount@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beancount/895c4f02-7b07-406b-898f-f6d4e0dc4933%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
Dr. Uwe Ziegenhagen
0179-7476050


-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/CAML7JCgBvgtxj9eSRSZyC4yB5iW-YSAVjqNXfgq3A1HwcLqLbg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Using pandas with beancount

2019-06-02 Thread Chary Chary
Hello everybody,

I am just wondering whether there is possibility to use a broad python data 
analysis tools (like pandas) with beancount?

Importing data in pandas and then analyzing it using pandas further?

Or the answer is the same as with SQL, that pandas are not good for double 
entry accounting type of data?

-- 
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 beancount+unsubscr...@googlegroups.com.
To post to this group, send email to beancount@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/895c4f02-7b07-406b-898f-f6d4e0dc4933%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.