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

Parsing plugins #11

Open
sbcgua opened this issue Sep 8, 2018 · 0 comments
Open

Parsing plugins #11

sbcgua opened this issue Sep 8, 2018 · 0 comments

Comments

@sbcgua
Copy link
Owner

sbcgua commented Sep 8, 2018

Idea by Shai Sinai from comments to compiler blogpost. Potential future feature.

Create a possibility to parse certain files specifically e.g. to support excels and not only text. Also possible to use it to support web sources. Current implementation ideas:

  • create an interface that takes in raw file content and returns container with data
  • possibility to register instances of these interfaces in connection with e.g. file extension
class lcl_my_excel_parser.
  interfaces: zif_mockup_loader_plugin.
  method zif_mockup_loader_plugin~process.
    e_container = my_parse_data( iv_data ). " xtsring to table
  endmethod.
...
lo_ml->register_plugin( i_ext = '*.xlsx' io_handler = new lcl_my_excel_parser ).

questions:

  • how to handle complex internal structure universally ? e.g. excel has sheets ? Either transparent path - load( 'DIRECTORY/my_custom_data.xlsx/excel_sheet_name' ), or kind of hash query in JS - load( 'DIRECTORY/my_custom_data.xlsx#some-query-specific-to-plugin?param=12345' )
  • how to pass mockup loader internal parameters to the plugin. E.g. encoding, amount, date formats ... parameters - there might be too many, they may change in future. Probably a table of name-value strings would be better.
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