From 41dce264eae98b13a8f6e234110a72d12a017b02 Mon Sep 17 00:00:00 2001 From: conradhilley Date: Wed, 9 Jan 2019 07:21:01 -0800 Subject: [PATCH] Update README.md Fix spelling, formatting, and re-order Showing Progress section. --- README.md | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 0ce146b..7d4c99c 100644 --- a/README.md +++ b/README.md @@ -285,7 +285,7 @@ Just about everything in Gooey's overall look and feel can be customized by pass | return_to_config | When True, Gooey will return to the configuration settings window upon successful run | | progress_regex | A text regex used to pattern match runtime progress information. See: [Showing Progress](#showing-progress) for a detailed how-to | | progress_expr | A python expression applied to any matches found via the `progress_regex`. See: [Showing Progress](#showing-progress) for a detailed how-to | -| hide_progress_msg | Option to hide any textextual progress updates which match the `progress_regex`. See: [Showing Progress](#showing-progress) for a detailed how-to | +| hide_progress_msg | Option to hide textual progress updates which match the `progress_regex`. See: [Showing Progress](#showing-progress) for a detailed how-to | | disable_progress_bar_animation | Disable the progress bar | | requires_shell | Controls whether or not the `shell` argument is used when invoking your program. [More info here](https://stackoverflow.com/questions/3172470/actual-meaning-of-shell-true-in-subprocess#3172488) | | navigation | Sets the "navigation" style of Gooey's top level window.
Options:
TABBEDSIDEBAR
| @@ -708,9 +708,18 @@ Checkout the full example code in the [Examples Repository](https://github.com/c Giving visual progress feedback with Gooey is easy! If you're already displaying textual progress updates, you can tell Gooey to hook into that existing output in order to power its Progress Bar. -For simple cases, output strings which resolve to a numeric representation of the completion percentage (e.g. `Progress 83%`) can be pattern matched and turned into a progress bar status with a simple regular expression (e.g. `@Gooey(progress_regex=r"^progress: (\d+)%$")`). Output strings which satisfy the regular expression can be hidden from the console via the hide_progress_msg parameter (e.g. `@Gooey(progress_regex=r"^progress: (\d+)%$", hide_progress_msg=True)`. +For simple cases, output strings which resolve to a numeric representation of the completion percentage (e.g. `Progress 83%`) can be pattern matched and turned into a progress bar status with a simple regular expression (e.g. `@Gooey(progress_regex=r"^progress: (\d+)%$")`). -For more complicated outputs, you can pass in a custom evaluation expression (`progress_expr`) to transform the things however you need. +For more complicated outputs, you can pass in a custom evaluation expression (`progress_expr`) to transform regular expression matches as needed. + +Output strings which satisfy the regular expression can be hidden from the console via the `hide_progress_msg` parameter (e.g. `@Gooey(progress_regex=r"^progress: (\d+)%$", hide_progress_msg=True)`. + +**Regex and Processing Expression** + +```python +@Gooey(progress_regex=r"^progress: (?P\d+)/(?P\d+)$", + progress_expr="current / total * 100") +``` **Program Output:** @@ -721,19 +730,8 @@ progress: 3/100 ... ``` -**Regex and Processing Expression** - -```python -@Gooey(progress_regex=r"^progress: (?P\d+)/(?P\d+)$", - progress_expr="current / total * 100") -``` - There are lots of options for telling Gooey about progress as your program is running. Checkout the [Gooey Examples](https://github.com/chriskiehl/GooeyExamples) repository for more detailed usage and examples! -'progress_regex' A text regex used to pattern match runtime progress information. -'progress_expr' A python expression applied to any matches found via the `progress_regex`. -'hide_progress_msg' Option to hide any textextual progress updates which match the `progress_regex` - --------------------------------------