Got it, thanks!

On Sunday, July 8, 2018 at 9:59:38 PM UTC+8, Craig Earls wrote:
>
> Ledger never writes to the file. If you are looking to programmatically 
> alter the ledger you wil need to do it directly 
>
> On Sun, Jul 8, 2018 at 01:51 <[email protected] <javascript:>> wrote:
>
>> Hi guys, is there any way I can modify the state of transactions in my 
>> ledger file, from uncleared to cleared/pending? I'm thinking of something 
>> like below:
>>
>> #! /usr/bin/env python2
>>
>> import ledger
>>
>> def main():
>>     for xact in ledger.read_journal("report-itd.dat").xacts():
>>         if xact.state is xact.state.Uncleared:
>>             xact.state = xact.state.Cleared
>>
>> if __name__ == "__main__":
>>     main()
>>
>>
>> -- 
>>
>> --- 
>> 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 [email protected] <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
> -- 
> Craig, Corona De Tucson, AZ
> [image: missile_flyout]
> enderw88.wordpress.com
>

-- 

--- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to