Skip to content

Add script injection support to the base CLI utility #12

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

Open
pushfoo opened this issue Jun 15, 2020 · 5 comments
Open

Add script injection support to the base CLI utility #12

pushfoo opened this issue Jun 15, 2020 · 5 comments
Assignees
Labels
enhancement New feature or request

Comments

@pushfoo
Copy link
Owner

pushfoo commented Jun 15, 2020

For now, a simple --add-script $FAMILY $GENUS $SPECIES $EVENT flag that doesn't attempt to intelligently extract data is probably best.
Trying to add fuller support for extracting from files will require more than simple regex as there might be endm, scrp, and rscr in comments.

@pushfoo pushfoo added the enhancement New feature or request label Jun 15, 2020
@pushfoo
Copy link
Owner Author

pushfoo commented Jun 24, 2020

c2e appears to strip both comments and all newline spacing as scripts are injected into the scriptorium, as well as headers. This appears unrelated to outs as it can output newlines (try outs "first\nsecond" for a demo, credit to @gantt42 for helping sort through this).
It is probably safe to check for open/close markers and use those to detect script, removal script, etc. The main complication may be strings which might contain markers. Smart detection of scripts will have to be able to parse at least a little bit of caos.

@pushfoo
Copy link
Owner Author

pushfoo commented Jun 24, 2020

\" is a possible printable character that may arise, need to keep that in mind for parse as well.

@JGantts
Copy link

JGantts commented Jun 24, 2020

\\ as well. "\\\"" and "\"" are valid.

@pushfoo pushfoo self-assigned this Jun 25, 2020
@pushfoo
Copy link
Owner Author

pushfoo commented Jun 26, 2020

Current miniparser is actually broken, comment handling needs to account for quotes.

@pushfoo
Copy link
Owner Author

pushfoo commented Jun 28, 2020

It would be useful for the miniparser to differentiate between a scrp header that is malformed and one that is closed with an accompanying endm. Using r"(\d+(\s|\Z)+){4}" rather than a naive \s+for whitespace detection would achieve this.

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

No branches or pull requests

2 participants