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

Save script execution summary #97

Open
jmgate opened this issue Sep 10, 2024 · 0 comments
Open

Save script execution summary #97

jmgate opened this issue Sep 10, 2024 · 0 comments
Assignees
Labels
Type: Feature A new capability we need added to the code.

Comments

@jmgate
Copy link
Collaborator

jmgate commented Sep 10, 2024

I can imagine some situations where a script designer might not want to print the script execution summary at the end of the script (e.g., perhaps it's just far too long), but it would still be beneficial to have that information on hand after the script completes. I think it'd be worthwhile, therefore, to allow for that summary to be saved to disk somehow.

Possible Implementation

We could create a save_script_execution_summary() that perhaps calls print_script_execution_summary() under the hood, but with a different rich.console.Console, and then save that console's text to a file. Or maybe we want to extend the behavior of the print_ method to allow it to also save to a file if a flag is provided. Then maybe we're talking about adding flags to the parser to specify that the summary is going to the console, a file, or both.

Possible Extension

As I'm thinking about it, I could also see the benefit of printing an abbreviated summary to the terminal, but then saving a comprehensive summary to disk. Not sure how might be best to implement that separation, though.

@jmgate jmgate added the Type: Feature A new capability we need added to the code. label Sep 10, 2024
@jmgate jmgate self-assigned this Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Feature A new capability we need added to the code.
Projects
None yet
Development

No branches or pull requests

1 participant