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

Allow size of highlighted file to be limited #4

Open
IanMayo opened this issue Oct 31, 2019 · 1 comment
Open

Allow size of highlighted file to be limited #4

IanMayo opened this issue Oct 31, 2019 · 1 comment
Assignees

Comments

@IanMayo
Copy link
Member

IanMayo commented Oct 31, 2019

User of this library occasionally have to parse huge documents that are 1000s of lines long.

They may wish to have the whole file highlighted. But, they may only wish to have the first 50 (or so) lines highlighted for the output.

We should introduce an optional argument for the HighlightedDataFile constructor. This argument can take these values:

  1. 0 - don't do any highlighting. Allow the record method to be called, but don't act on it
  2. 50 - highlight the first 50 (for example) lines in the file. Allow the record method to be called, but don't try to highlight anything after 50 lines. The export method should only export the first 50 lines.
  3. "ALL" - process all lines in the file

Note: when we're just going to highlight a portion of the datafile, I suggest we do that by only creating elements in the chars structure for those lines. Then, if ever we try to modify a chars cell which is > len(chars) we silently ignore it.

@roman-hrybinchuk
Copy link
Collaborator

1 more argument numberOfLines in main class constructor, you can determine number of lines to be showed, by default all lines.

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

Successfully merging a pull request may close this issue.

2 participants