Skip to content
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

add: more preprocessing #362

Open
GoogleCodeExporter opened this issue Mar 29, 2016 · 0 comments
Open

add: more preprocessing #362

GoogleCodeExporter opened this issue Mar 29, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

preprocessing works, but is somewhat heavy and limited.
this new option has 3 ways of working:
- on raw file (eg with regular expressions)
- on lexed records
- on tree of nodes (eg sort csv file)

All three work via syntax in grammar:
syntax = {
        'preprocess_nodes': sort_function,
        }
def sort_function(thisnode):
    thisnode.root.children.sort(key=lambda s: s.record.get('ORDERNUMMER'))

- on raw file:  preprocess_raw
- on lexed records: preprocess_lex
- on tree of nodes:  preprocess_nodes

Original issue reported on code.google.com by [email protected] on 19 May 2015 at 8:27

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant