From 25aa9e7afcce49c95d9f6496fc371fc5c8377539 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 31 May 2015 10:53:14 -0400 Subject: [PATCH 1/9] Update README.md --- README.md | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 861cec0..50dd84b 100644 --- a/README.md +++ b/README.md @@ -231,7 +231,22 @@ Want to add another one? Submit a [pull request!](https://github.com/chriskiehl/ Configuration ------------- +------------- + +Just about everything in Gooey can be customized by passing arguments to the decorator. + +| Parameter | Summary | +|-----------|---------| +| advanced | Toggles whether to show the 'full' configuration screen, or a simplified version | +| show_config | Skips the configuration all together and runs the program immediately | +| language | Tells Gooey which language set to load from the `gooey/languages` directory.| +|program_name | The name displayed in the title bar of the GUI window. If not supplied, the title defaults to the script name pulled from `sys.argv[0]`. | +| program_description | Sets the text displayed in the top panel of the `Settings` screen. Defaults to the description pulled from `ArgumentParser`. | +| default_size | Initial size of the window | +| required_cols | Controls how many columns are in the Required Arguments section | +| optional_cols | Controls how many columns are in the Optional Arguments section | +| dump_build_config | Saves a `json` copy of its build configuration on disk for reuse/editing | + Gooey comes in three main flavors. @@ -242,11 +257,7 @@ Gooey comes in three main flavors. Each has the following options: -| Parameter | Summary | -|-----------|---------| -| language | Gooey is (kind of) international ready (sans Unicode issues (TODO)). All program text is stored in an external `json` file. Translating to your host language only requires filling in the key/value pairs.| -|program_name | The name displayed in the title bar of the GUI window. If the value is `None`, the title is pulled from `sys.argv[0]`. | -| program_description | Sets the text displayed in the top panel of the `Settings` screen. If `None` the description is pulled from the `ArgumentParser`. | + From 08cef7f240e28eadf6897a88718bbb0d90ea713a Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 31 May 2015 11:30:53 -0400 Subject: [PATCH 2/9] Update README.md --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 50dd84b..25f4f6f 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,7 @@ Table of Contents - [How does it work](#how-does-it-work) - [Internationalization](#internationalization) - [Configuration](#configuration) +- [Run Modes](#run-modes) - [Full/Advanced](#advanced) - [Basic](#basic) - [No Config](#no-config) @@ -248,17 +249,16 @@ Just about everything in Gooey can be customized by passing arguments to the dec | dump_build_config | Saves a `json` copy of its build configuration on disk for reuse/editing | -Gooey comes in three main flavors. + +Run Modes +--------- + +Gooey has three main run modes - Full/Advanced - Basic - No config -Each has the following options: - - - - From 989e6f4b94c270ebbf84faa66ba1db680ff8b08a Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 31 May 2015 19:00:45 -0400 Subject: [PATCH 3/9] Update README.md --- README.md | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 25f4f6f..6b0fb32 100644 --- a/README.md +++ b/README.md @@ -3,8 +3,8 @@ Gooey (Beta) Turn (almost) any Python Console Program into a GUI application with one line

- -

+ +

Table of Contents @@ -147,14 +147,14 @@ Gooey does its best to choose sensible defaults based on the options it finds. C | Parser Action | Widget | Example | |:----------------------|-----------|------| -| store | TextCtrl | | -| store_const | CheckBox | | -| store_true| CheckBox | | -| store_False | CheckBox| | -| append | TextCtrl | | -| count| DropDown                  | | -| Mutually Exclusive Group | RadioGroup | -|choice                                             | DropDown | | +| store | TextCtrl | | +| store_const | CheckBox | | +| store_true| CheckBox | | +| store_False | CheckBox| | +| append | TextCtrl | | +| count| DropDown                  | | +| Mutually Exclusive Group | RadioGroup | +|choice                                             | DropDown | | ###GooeyParser @@ -171,7 +171,7 @@ If the above defaults aren't cutting it, you can control the exact widget type b Given then above, Gooey would select a normal `TextField` as the widget type like this:

- +

However, by dropping in `GooeyParser` and supplying a `widget` name, you can display a much more user friendly `FileChooser` @@ -184,20 +184,20 @@ However, by dropping in `GooeyParser` and supplying a `widget` name, you can dis parser = GooeyParser(description="My Cool Gooey App!") parser.add_argument('filename', help="name of the file to process", widget='FileChooser') -

+

**Custom Widgets:** | Widget | Example | |----------------|------------------------------| -| Directory/FileChooser |

| -| DateChooser                                             |

| +| Directory/FileChooser |

| +| DateChooser                                             |

| Internationalization -------------------- - + Gooey is international ready and easily ported to your host language. Languages are controlled via an argument to the `Gooey` decorator. @@ -278,7 +278,7 @@ The default view is the "full" or "advanced" configuration screen. It can be tog This view presents each action in the `Argument Parser` as a unique GUI component. This view is ideal for presenting the program to users which are unfamiliar with command line options and/or Console Programs in general. Help messages are displayed along side each component to make it as clear as possible which each widget does.

- +

-------------------------------------------- @@ -294,7 +294,7 @@ The basic view is best for times when the user is familiar with Console Applicat # rest of code

- +

@@ -305,7 +305,7 @@ The basic view is best for times when the user is familiar with Console Applicat No Config pretty much does what you'd expect: it doesn't show a configuration screen. It hops right to the `display` section and begins execution of the host program. This is the one for improving the appearance of little one-off scripts.

- +

--------------------------------------- @@ -313,7 +313,7 @@ No Config pretty much does what you'd expect: it doesn't show a configuration sc Final Screen ------------

- +

---------------------------------------------- @@ -335,7 +335,7 @@ Final Screen - Drag and Drop support (`Issue #28`)

- +

Tada! From 8ce8af40cdfd8ce7926f6d9554423f860c410052 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 31 May 2015 19:01:18 -0400 Subject: [PATCH 4/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6b0fb32..1843d4a 100644 --- a/README.md +++ b/README.md @@ -313,7 +313,7 @@ No Config pretty much does what you'd expect: it doesn't show a configuration sc Final Screen ------------

- +

---------------------------------------------- From 4608a5a8c49d350215106c190467bee1bdf56723 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 31 May 2015 19:02:19 -0400 Subject: [PATCH 5/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 1843d4a..dbd9459 100644 --- a/README.md +++ b/README.md @@ -197,7 +197,7 @@ However, by dropping in `GooeyParser` and supplying a `widget` name, you can dis Internationalization -------------------- - + Gooey is international ready and easily ported to your host language. Languages are controlled via an argument to the `Gooey` decorator. From 85d5839bc0d6552c050781f5e84d2f0ee97e6da9 Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 31 May 2015 19:20:34 -0400 Subject: [PATCH 6/9] Update README.md --- README.md | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index dbd9459..39b536b 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,8 @@ Table of Contents - [Full/Advanced](#advanced) - [Basic](#basic) - [No Config](#no-config) -- [Final Screen](#final-screen) +- [Examples](#examples) +- [Screenshots](#screenshots) - [Change Log](#change-log) - [TODO](#todo) - [Contributing](#wanna-help) @@ -310,7 +311,24 @@ No Config pretty much does what you'd expect: it doesn't show a configuration sc --------------------------------------- -Final Screen + +Examples +-------- + +Examples are located in the `examples` directory inside of the root `gooey` package. However, the easiest way to play with them is to import them into a python project and execute their `main` function. + + from gooey.examples import widget_demo + widget_demo.main() + +or + + from gooey.examples import subparser_demo + subparser_demo.main() + +>Note: The examples *must* be run from a Python file! Due to Gooey's file requirements, it won't work from the comman line. + + +Screenshots ------------

From 2bfd88a6aa4646fbf9ce014b96386f4f493ba82d Mon Sep 17 00:00:00 2001 From: Chris Date: Sun, 31 May 2015 19:21:02 -0400 Subject: [PATCH 7/9] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 39b536b..d380900 100644 --- a/README.md +++ b/README.md @@ -340,12 +340,12 @@ Screenshots ###Change Log ---------- +- Subparser Support! - Moved all internal messaging to pubsub - expanded i18n converage - allowed returning to the main configuration screen - Fixed success checkmark showing on failure - Refactoring to beauty - - Removed parsing code, replaced it with @SylvainDe patch - Fixed issue #87 - Fixed issue #85 From ddda9a1521f944220f4af46d4f78a4dd02446cbf Mon Sep 17 00:00:00 2001 From: Chris Date: Mon, 1 Jun 2015 22:33:10 -0400 Subject: [PATCH 8/9] Update README.md --- README.md | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index d380900..1bc8aba 100644 --- a/README.md +++ b/README.md @@ -220,18 +220,10 @@ Want to add another one? Submit a [pull request!](https://github.com/chriskiehl/ - - - - - - ------------------------------------------- - - Configuration ------------- @@ -254,20 +246,36 @@ Just about everything in Gooey can be customized by passing arguments to the dec Run Modes --------- -Gooey has three main run modes +Gooey has a handful of presentation modes so you can tailor its layout to your content type and user's level or experience. -- Full/Advanced -- Basic -- No config +###Advanced + + + + +The default view is the "full" or "advanced" configuration screen. It comes in two different modes depending on the type of command line interface it's wrapping. For most applications, the flat layout will be the one to go with, as its layout matches best to the familiar CLI schema of a primary command followed by many options (e.g. Curl, FFMPEG). + +On the other side is the Column Layout. This is best suited for CLIs that have multiple paths or are made up of multiple tools (think: git). It displays the primary paths along the left column, and their corresponding arguments in the right. + +

+ +

+ +**Setting the layout style:** + +Currently, the layouts can't be explicitely specified via a parameter. The layouts are built depending on whether or not there are `subparsers` used in your code base. So, if you want to trigger the `Column Layout`, you'll need to add a `subparser` to your `argparse` code. + -###Advanced -The default view is the "full" or "advanced" configuration screen. It can be toggled via the `advanced` parameter in the `Gooey` decorator. + + + +It can be toggled via the `advanced` parameter in the `Gooey` decorator. @@ -278,9 +286,7 @@ The default view is the "full" or "advanced" configuration screen. It can be tog This view presents each action in the `Argument Parser` as a unique GUI component. This view is ideal for presenting the program to users which are unfamiliar with command line options and/or Console Programs in general. Help messages are displayed along side each component to make it as clear as possible which each widget does. -

- -

+ -------------------------------------------- From b3eb6c8d2fc648245340fc4de7a9d96eb7176865 Mon Sep 17 00:00:00 2001 From: Chris Date: Tue, 2 Jun 2015 20:26:14 -0400 Subject: [PATCH 9/9] Update README.md --- README.md | 37 ++++++++++++------------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/README.md b/README.md index 1bc8aba..4b8d4b9 100644 --- a/README.md +++ b/README.md @@ -256,37 +256,28 @@ Gooey has a handful of presentation modes so you can tailor its layout to your c -The default view is the "full" or "advanced" configuration screen. It comes in two different modes depending on the type of command line interface it's wrapping. For most applications, the flat layout will be the one to go with, as its layout matches best to the familiar CLI schema of a primary command followed by many options (e.g. Curl, FFMPEG). +The default view is the "full" or "advanced" configuration screen. It has two different layouts depending on the type of command line interface it's wrapping. For most applications, the flat layout will be the one to go with, as its layout matches best to the familiar CLI schema of a primary command followed by many options (e.g. Curl, FFMPEG). -On the other side is the Column Layout. This is best suited for CLIs that have multiple paths or are made up of multiple tools (think: git). It displays the primary paths along the left column, and their corresponding arguments in the right. +On the other side is the Column Layout. This one is best suited for CLIs that have multiple paths or are made up of multiple little tools each with their own arguments and options (think: git). It displays the primary paths along the left column, and their corresponding arguments in the right. This is a great way to package a lot of varied functionality into a single app.

-**Setting the layout style:** - -Currently, the layouts can't be explicitely specified via a parameter. The layouts are built depending on whether or not there are `subparsers` used in your code base. So, if you want to trigger the `Column Layout`, you'll need to add a `subparser` to your `argparse` code. - - - - - +Both views present each action in the `Argument Parser` as a unique GUI component. It makes it ideal for presenting the program to users which are unfamiliar with command line options and/or Console Programs in general. Help messages are displayed along side each component to make it as clear as possible which each widget does. +**Setting the layout style:** +Currently, the layouts can't be explicitely specified via a parameter (on the TODO!). The layouts are built depending on whether or not there are `subparsers` used in your code base. So, if you want to trigger the `Column Layout`, you'll need to add a `subparser` to your `argparse` code. It can be toggled via the `advanced` parameter in the `Gooey` decorator. - @gooey(advanced=True) def main(): # rest of code - -This view presents each action in the `Argument Parser` as a unique GUI component. This view is ideal for presenting the program to users which are unfamiliar with command line options and/or Console Programs in general. Help messages are displayed along side each component to make it as clear as possible which each widget does. - -------------------------------------------- @@ -321,7 +312,7 @@ No Config pretty much does what you'd expect: it doesn't show a configuration sc Examples -------- -Examples are located in the `examples` directory inside of the root `gooey` package. However, the easiest way to play with them is to import them into a python project and execute their `main` function. +Gooey comes with a bunch of example programs. Examples are located in the `examples` directory inside of the root `gooey` package. However, the easiest way to play with them is to import them into a python project and execute their `main` function. from gooey.examples import widget_demo widget_demo.main() @@ -336,9 +327,12 @@ or Screenshots ------------ -

- -

+ +| Flat Layout | Column Layout |Success Screen | Error Screen | Warning Dialog | +|-------------|---------------|---------------|--------------|----------------| +| | | | | | + + ---------------------------------------------- @@ -357,13 +351,6 @@ Screenshots - Fixed issue #85 - Argparse no longer required to me in `main` (issue 84) - Drag and Drop support (`Issue #28`) - -

- -

- -Tada! - - Added drag and drop support - Added new widget packs: DateChooser, FileChooser, DirChooser - fixed several parsing related issues.