Re: Forcing output of timekeeping in one unit with --amount-data or --total-data

2018-01-24 Thread Colin Dean
That's close enough! I can do the math to make it hours with awk:

ledger -f "$(t timelog)" reg --daily --no-total --base -j | awk '{print $1
" " $2/3600}'

Thanks! Now, to figure out how to make gnuplot's output not look so…
spartan.

Colin Dean
http://cad.cx

On Wed, Jan 24, 2018 at 7:16 PM, Clément Pit-Claudel 
wrote:

> On 2018-01-24 18:37, Jim Robinson wrote:
> > I'm very interested in the answer to this, I was just poking around in
> the documentation trying to see if this was addressed an unable to spot it
> on my first pass.
> >
> > I was looking to see if I could either always produce minutes, or
> produce " h  m" instead of fractional hours.
>
> Did you try --base?
>
> - Added --base reporting option, for reporting convertible commodities
>   in their most basic form.  For example, if you read a timeclock file
>   with Ledger, the time values are reported as hour and minutes --
>   whichever is the most compact form.  But with --base, Ledger reports
>   only in seconds.
>
> ---
> 2017/01/01 * Client 1
> A  5m
> B  7m
> C
>
> 2017/01/02 * Client 2
> A  5h
> B  5h
> C
> ---
>
> $ ledger -f test.ledger --daily --base reg
>
> 2017-01-01 - 2017-01-01 A  300s
>  300s
> B  420s
>  720s
> C -720s
> 0
> 2017-01-02 - 2017-01-02 A18000s
>  18000s
> B18000s
>  36000s
> C   -36000s
> 0
>
> $ ledger -f test.ledger --daily --amount-data --base reg
>
> 2017-01-01 300
> 2017-01-01 420
> 2017-01-01 -720
> 2017-01-02 18000
> 2017-01-02 18000
> 2017-01-02 -36000
>
> Clément.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Forcing output of timekeeping in one unit with --amount-data or --total-data

2018-01-24 Thread James A. Robinson
Thank you!  I think --base would certainly work for the OP, who wanted
something consistent to graph.
Looking again at the manual page I had failed to see that there is

--time-colon -  Display the value for commodities based on seconds as hours
and minutes.  Thus 8100s will be displayed as 2:15h instead of 2.25h.

which is basically what I was after.

Jim

On Wed, Jan 24, 2018 at 4:16 PM Clément Pit-Claudel 
wrote:

> On 2018-01-24 18:37, Jim Robinson wrote:
> > I'm very interested in the answer to this, I was just poking around in
> the documentation trying to see if this was addressed an unable to spot it
> on my first pass.
> >
> > I was looking to see if I could either always produce minutes, or
> produce " h  m" instead of fractional hours.
>
> Did you try --base?
>
> - Added --base reporting option, for reporting convertible commodities
>   in their most basic form.  For example, if you read a timeclock file
>   with Ledger, the time values are reported as hour and minutes --
>   whichever is the most compact form.  But with --base, Ledger reports
>   only in seconds.
>
> ---
> 2017/01/01 * Client 1
> A  5m
> B  7m
> C
>
> 2017/01/02 * Client 2
> A  5h
> B  5h
> C
> ---
>
> $ ledger -f test.ledger --daily --base reg
>
> 2017-01-01 - 2017-01-01 A  300s
>  300s
> B  420s
>  720s
> C -720s
> 0
> 2017-01-02 - 2017-01-02 A18000s
>  18000s
> B18000s
>  36000s
> C   -36000s
> 0
>
> $ ledger -f test.ledger --daily --amount-data --base reg
>
> 2017-01-01 300
> 2017-01-01 420
> 2017-01-01 -720
> 2017-01-02 18000
> 2017-01-02 18000
> 2017-01-02 -36000
>
> Clément.
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Forcing output of timekeeping in one unit with --amount-data or --total-data

2018-01-24 Thread Clément Pit-Claudel
On 2018-01-24 18:37, Jim Robinson wrote:
> I'm very interested in the answer to this, I was just poking around in the 
> documentation trying to see if this was addressed an unable to spot it on my 
> first pass.
> 
> I was looking to see if I could either always produce minutes, or produce 
> " h  m" instead of fractional hours.

Did you try --base?

- Added --base reporting option, for reporting convertible commodities
  in their most basic form.  For example, if you read a timeclock file
  with Ledger, the time values are reported as hour and minutes --
  whichever is the most compact form.  But with --base, Ledger reports
  only in seconds.

---
2017/01/01 * Client 1
A  5m
B  7m
C

2017/01/02 * Client 2
A  5h
B  5h
C
---

$ ledger -f test.ledger --daily --base reg

2017-01-01 - 2017-01-01 A  300s 300s
B  420s 720s
C -720s0
2017-01-02 - 2017-01-02 A18000s   18000s
B18000s   36000s
C   -36000s0

$ ledger -f test.ledger --daily --amount-data --base reg

2017-01-01 300
2017-01-01 420
2017-01-01 -720
2017-01-02 18000
2017-01-02 18000
2017-01-02 -36000

Clément.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Forcing output of timekeeping in one unit with --amount-data or --total-data

2018-01-24 Thread Jim Robinson
I'm very interested in the answer to this, I was just poking around in the 
documentation trying to see if this was addressed an unable to spot it on 
my first pass.

I was looking to see if I could either always produce minutes, or produce 
" h  m" instead of fractional hours.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Forcing output of timekeeping in one unit with --amount-data or --total-data

2018-01-24 Thread Colin Dean
I'm attempting to output timekeeping data with the intention of graphing it.

$ ledger -f "$(t timelog)" reg -p 'this week' --daily
18-Jan-22 - 18-Jan-22   (N:Development)   8.19h8.19h
(N:Email) 15.0m8.44h
(N:Meeting:Development)   30.0m8.94h
(N:Meeting:Development:Standup)   30.8m9.45h
(N:TimeTracking)   2.1m9.49h
18-Jan-23 - 18-Jan-23   (N:Development)   4.46h   13.94h
(N:Development:CodeReview)1.44h   15.38h
(N:Meeting:Development:Pairing)   20.8m   15.73h
(N:Meeting:Development:Product)   29.0m   16.21h
(N:Meeting:Development:Standup)   24.1m   16.62h
(N:Meeting:Recruiting:Interview)  1.28h   17.90h
(N:TimeTracking)   7.0m   18.02h
18-Jan-24 - 18-Jan-24   (N:Development)   47.0m   18.80h
(N:Email)  8.1m   18.93h
(N:Meeting:Development:Standup)   30.0m   19.43h
(N:Recruiting)2.25h   21.68h
(N:TimeTracking)   1.0m   21.70h

is turning into

$ ledger -f "$(t timelog)" reg -p 'this week' --daily --amount-data
2018-01-22 8.188611
2018-01-22 15
2018-01-22 30
2018-01-22 30.78
2018-01-22 2.05
2018-01-23 4.458889
2018-01-23 1.439722
2018-01-23 20.816667
2018-01-23 29
2018-01-23 24.05
2018-01-23 1.28
2018-01-23 7
2018-01-24 47
2018-01-24 7.9
2018-01-24 30
2018-01-24 2.25
2018-01-24 1

It's pretty clear from looking at this that the *units* are not the same.
Some events are outputting as minutes while others are in hours. I've tried
adding --exchange s after running commodities on the file and seeing that.
Adding the exchange option changes the specificity of some of the values
but it does not change the output units.

It seems from the section on Commodity equivalences

that I should be able to do this somehow. Any ideas?

--
Colin Dean
http://cad.cx

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"Ledger" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to ledger-cli+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.