-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
added ability to define multiple line definitions #225
Conversation
Would be very helpful indeed ! |
Could you sign off on this, @hbrunn ? I don't know enough about the line plugin. Thanks! |
I'm testing your PR... For now I see a slight issue : the line
Only amount_something_else would be converted to float... To solve this, one has basically to declare all types in the last block only. |
Other suggestion here:
I would rather put a |
I stumbled on this and it looks usefull for something I would like to do. @adrienjacob I tried the issue you mentioned about types but don't see the same behaviour. I have this in my yml file: `lines:
and the output of lines is:
and if I remove the types config the output is: `lines [{'gas_start_date': 'Oct 22/19', 'gas_start_reading': '391', 'gas_end_date': 'Oct 31/19', 'gas_end_reading': '394', 'gasUsage': '3.16'}, {'gas_start_date': 'Nov 1/19', 'gas_start_reading': '394', 'gas_end_date': 'Nov 19/19', 'gas_end_reading': '401', 'gasUsage': '6.86'}, {'gas_usage': '3.16', 'gas_entry_rate': '3.57239', 'gas_entry_total': '11.29'}, {'gas_usage': '6.86', 'gas_entry_rate': '3.59884', 'gas_entry_total': '24.69'}] Your other suggestion of putting a |
Does this one offer imilar functionality of #308 ? |
EDIT: I think this old PR can be closed, as it has become a parser now. FYI, I am working on an implementation to forward migrate this idea/code. |
Superseded by #378 |
Added multiple line functionality
All Line defintions must start as so even if defining a singular line pattern
lines:
end:
line:
end:
line:
Without the - it will error. My yaml parsing knowledge is pretty basic so maybe someone could fix this so it behaves as the tables plugin does ( no need for - for single case)