Skip to content

Commit

Permalink
update documents
Browse files Browse the repository at this point in the history
  • Loading branch information
matyalatte committed Aug 6, 2023
1 parent da3e82f commit 0900ede
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 15 deletions.
2 changes: 1 addition & 1 deletion examples/all_keys/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# All Keys

[The JSON file](./gui_definition.json) in this folder has all keys the Simple Command Runner supports.
[The JSON file](./gui_definition.json) in this folder has all keys that Simple Command Runner supports.

- `Components Minimal` has all components with their required keys.
- `Components Optional` has all components with their optional keys.
Expand Down
4 changes: 2 additions & 2 deletions examples/comp_options/id/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ When you put an undefined id in `%*%`, it'll use one of the components that have

There are some predefined ids.
`%%` will be replaced with `%` at runtime.
`%__CWD__%` will be replaced with the executable directory at runtime.
`%__HOME__%` will be replaced with the user's home directory at runtime.
`%__CWD__%` will be replaced with the executable directory.
`%__HOME__%` will be replaced with the user's home directory.
Also, all ids that start with `_` are reserved.

```json
Expand Down
4 changes: 2 additions & 2 deletions examples/components/num_pickers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ It can set the number of digits after the decimal point.
## `wrap`

`wrap` is an optional key to wrap at the `min` and `max`.
The minimum value will be the maximum value when clicking down arrow.
The maximum value will be the minimum value when clicking up arrow.
The minimum value will be the maximum value when clicking the down arrow.
The maximum value will be the minimum value when clicking the up arrow.

## Notes

Expand Down
8 changes: 4 additions & 4 deletions examples/components/path_pickers/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ Of course, you can drop files on the pickers to specifiy the paths.
}
```

## "components"
## Components

`compoents` is an array of GUI components (e.g. file pickers).
Each component should be defined as a dictionary.

- `type` is component type. `file` for a file picker, and `folder` for a dir picker.
- `label` is a string written above the text box of picker.
- `extension` is an optional key for file picker. It's wildcard for file pickers. Use the same syntax as for [wxWidget's wildcards](https://docs.wxwidgets.org/3.0/classwx_file_dialog.html).
- `label` is a string written above the text box of the picker.
- `extension` is an optional key for file pickers. It's wildcard for file extensions. Use the same syntax as for [wxWidget's wildcards](https://docs.wxwidgets.org/3.0/classwx_file_dialog.html).
- `add_quotes` is an optional key for components. It will add quotes (`""`) to the input strings.

## "command"
## Command

Inputs of components will be injected into `command` when executing the command.
You can specify where they should be injected with `%*%`.
Expand Down
7 changes: 5 additions & 2 deletions examples/get_start/minimal/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Minimal GUI

This is a minimal GUI you can make.
Simple Command Runner will read `./gui_definition.json` when launching the executable.
You can define a GUI in the JSON file.

The following JSON is for a minimal GUI that you can make.
It has only a button to echo `Hello!`.

![minimal](https://user-images.githubusercontent.com/69258547/192091288-72b69003-eafa-41ef-8167-5d0e0fe010d9.png)
Expand All @@ -21,4 +24,4 @@ You can write a definition of your GUI in `"gui": [{}]`.

- `label` is a label of your definition. You can type here as you like.
- `command` is a command you want to execute when clicking the execution button.
- `compoents` is an array of GUI components (e.g. file pickers). `[]` means no components.
- `components` is an array of GUI components (e.g. file pickers). `[]` means no components.
6 changes: 3 additions & 3 deletions examples/get_start/put_component/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ You can put a text box in the GUI.

## Components

`compoents` is an array of GUI components (e.g. file pickers).
`components` is an array of GUI components (e.g. file pickers).
Each component should be defined as a dictionary.

- `type` is component type. `text` is for a text box.
- `label` is a string written above the text box.

You can see [more examples](../../#2-components) for the other component types.

## "command"
## Command

Inputs of components will be injected into `command` when executing the command.
Inputs of components will be injected into the value of `command` when executing the command.
You can specify where they should be injected with `%*%`.
In the example, the value of the text box will be injected in `%-%`.

Expand Down
2 changes: 1 addition & 1 deletion examples/other_features/error/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ When the executed command output something to `stderr`, Simple Command Runner wi

## Exit Code Checking

Your command might not use `stderr` even if they got errors.
Your command might not use `stderr` for error handling.
If so, you can use `check_exit_code` option.
It's an option to show an error dialogue when the exit code is not 0.
Also, you can change the success code with `exit_success` option.
Expand Down

0 comments on commit 0900ede

Please sign in to comment.