Red S wrote:
...
> this is only one type but there are many more that work the 
> same way and having to write a new line for each variant is 
> making this go a lot longer.
>
>  Yes! A contributor just ran into the same situation a couple days ago and 
> used a neat solution using petl.capture(). See here 
><https://github.com/redstreet/beancount_reds_importers/blob/dabcb455b6a4fc776b2fcfea24e64a41ca819acb/beancount_reds_importers/importers/fidelity/fidelity_cma_csv.py#L44>.
> 
> You can split your description field into the type for the first 3 words 
> (if that's valid), and then use the remaining for the memo (or throw it 
> away). It'll look something like this (untested code!):
>
> rdr = rdr.capture('Description', '(?:\\s)(?:\\w*)(.*)', ['type', 'memo'])
>
> More info is in the petl reference 
><https://petl.readthedocs.io/en/stable/transform.html>.

  awesome!  thank you!  i'll look at it tomorrow when i have more
brain cells and time.  :)

  i knew i read something about that two days ago in my first read 
through of their docs, but their documention is hard to scan easily.
it's good compared to some but it should be broken into smaller
parts.  and they definitely need a way to hide the left side to 
expand the text you can see.  it's not a very good design.  as i
also hate popups on mousing over something (which github does and
it sucks when things get in the way of what you're trying to read)...
ok my rant for the evening is over...  :)

  thanks again!


  fin

-- 
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/ejchaj-76t.ln1%40anthive.com.

Reply via email to