Actually, it does not exactly do the same thing. The interesting feature of print without --raw is that it aligns the columns of numbers nicely. but it converts 'h' to minutes as described before. With the --raw it mostly does not touch the file's formatting.
so I ask again: besides me using 'hr' instead of 'h', is there a way to tell it to keep hours where I have them *or specify a default unit that I want) while still do the rest of the formatting ? --pascal On Tue, Feb 25, 2014 at 10:22 PM, Pascal Fleury <pas...@telefleuries.com>wrote: > Indeed it does. Don't know why I missed it... > Thank you! > > Pascal > Le 23 févr. 2014 01:29, "John Wiegley" <jwieg...@gmail.com> a écrit : > > I'm pretty sure than the --raw options preserving exactly the format used >> for amounts in the ledger file. >> >> John (from my iPhone) >> >> On Feb 22, 2014, at 5:14 PM, Pascal Fleury <pas...@telefleuries.com> >> wrote: >> >> Hi, >> >> I am using 'ledger print' to cleanup/format/sort my journal file. It >> mostly works fine, but I am tracking my use of hourly rented cars (think >> Zipcar in the US, known as Mobility in Switzerland). These are charged by >> hour and by mileage. A typical transaction looks like this: >> >> 2014/01/30 * (16785024) Courses >> ; car_type: economy >> Expenses:Transports:Mobility 27 km @ 0.64 CHF >> Expenses:Transports:Mobility 3.5 h @ 2.80 CHF >> Credit:Mobility -27.08 CHF >> Rounding:Mobility >> >> Now if I run this through 'ledger print', it ends up becoming: >> >> 2014/01/30 * (16785024) Courses >> ; car_type: economy >> Expenses:Transports:Mobility 27 km @ 0.64 CHF >> Expenses:Transports:Mobility 12600s @ 0.0007777778 CHF >> Credit:Mobility -27.08 CHF >> Rounding:Mobility >> >> While the price is right, it looses a little bit in readability. >> >> Is there a way to have ledger print either keep the units I used in the >> translation, or at least use a default unit (in my case hours) to represent >> such items ? >> >> I found a solution for my needs, which is to use 'hr' as the unit, which >> ledger doesn't know, so does not try to convert to anything, but I would >> prefer the natural 'h' notation. >> >> Or maybe I am approaching the whole issue from the wrong angle, so feel >> free to tell me how it could be solved in an other way. I am hoping to get >> total mileage as well as total renting time out of it. >> >> --pascal >> >> -- >> >> --- >> 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/groups/opt_out. >> >> -- >> >> --- >> 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/groups/opt_out. >> > -- --- 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/groups/opt_out.