ppqs 1.0__tar.gz → 1.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ppqs
3
- Version: 1.0
3
+ Version: 1.0.2
4
4
  Summary: Python project quick scripts
5
5
  Author-email: Karl Wette <karl.wette@anu.edu.au>
6
6
  License-Expression: MIT
@@ -16,7 +16,7 @@ Dynamic: license-file
16
16
 
17
17
  # Python project quick scripts
18
18
 
19
- **Define simple development scripts in `pyproject.toml`**
19
+ **Define simple project management scripts in `pyproject.toml`**
20
20
 
21
21
  Developing a Python project usually involves many tasks: setting up, installing
22
22
  prerequisites, building, testing, cleaning up build products, etc. It can be
@@ -30,7 +30,7 @@ test harness, etc. the project uses behind a simple interface.
30
30
 
31
31
  Here is an example of **ppqs** being used for its own project:
32
32
 
33
- ```bash
33
+ ```
34
34
  $ ppqs --help
35
35
  Quick scripts for Python project: ppqs
36
36
 
@@ -94,11 +94,24 @@ print-something = "echo ..."
94
94
  ```
95
95
 
96
96
  may be run as
97
- ```bash
97
+
98
+ ```
98
99
  $ ppqs print-something Hi
99
100
  Hi
100
101
  ```
101
102
 
103
+ The following only applies to scripts defined as lists of lists: if a command
104
+ argument is itself a list, it is concatenated into a path appropriate for the
105
+ current operating system. For example,
106
+
107
+ ```toml
108
+ [tool.ppqs.scripts]
109
+ do-something = [["do-something-to", ["subdir", "afile"]]]
110
+ ```
111
+
112
+ would run the command `do-something-to subdir/afile` on a Unix-based operating
113
+ system.
114
+
102
115
  Scripts may also be defined in their own section, which permit a few options:
103
116
 
104
117
  ```toml
@@ -116,8 +129,6 @@ script = [
116
129
  ["command1", "-v"],
117
130
  ["command2", "-q"],
118
131
  ]
119
- """
120
-
121
132
  ```
122
133
 
123
134
  where:
@@ -129,12 +140,25 @@ where:
129
140
  in the script. The header consists of the command to be run, centred on the
130
141
  console and padded with `*`s. Default is false.
131
142
 
132
- Commands are *not* parsed to the shell, so e.g. wildcards are not expanded. If
133
- the features of a shell script are needed (wildcards, conditional statements,
134
- etc.), one can write a helper script, e.g. `scripts/lots-to-do.py`, which may
143
+ Note that commands are *not* passed to the shell, so shell features
144
+ (e.g. wildcards, conditional statements) are not available. The recommended
145
+ solution is to write a helper script, e.g. `scripts/lots-to-do.py`, which may
135
146
  then be called by `ppqs` as:
136
147
 
137
148
  ```toml
138
149
  [tool.ppqs.scripts]
139
150
  lots-to-do = [["python", "scripts/lots-to-do.py"]]
140
151
  ```
152
+
153
+ ## Bash completion
154
+
155
+ `ppqs` support Bash command-line completion. Simply add the following command to
156
+ your `~/.bashrc` file:
157
+
158
+ ```bash
159
+ complete -C "ppqs --bash-completion" ppqs
160
+ ```
161
+
162
+ Typing `ppdq ` and hitting `TAB` will then show scripts available for the
163
+ current project. Typing part of a script name and hitting `TAB` will show
164
+ matching script name(s), or else complete the full name if unambiguous.
@@ -1,6 +1,6 @@
1
1
  # Python project quick scripts
2
2
 
3
- **Define simple development scripts in `pyproject.toml`**
3
+ **Define simple project management scripts in `pyproject.toml`**
4
4
 
5
5
  Developing a Python project usually involves many tasks: setting up, installing
6
6
  prerequisites, building, testing, cleaning up build products, etc. It can be
@@ -14,7 +14,7 @@ test harness, etc. the project uses behind a simple interface.
14
14
 
15
15
  Here is an example of **ppqs** being used for its own project:
16
16
 
17
- ```bash
17
+ ```
18
18
  $ ppqs --help
19
19
  Quick scripts for Python project: ppqs
20
20
 
@@ -78,11 +78,24 @@ print-something = "echo ..."
78
78
  ```
79
79
 
80
80
  may be run as
81
- ```bash
81
+
82
+ ```
82
83
  $ ppqs print-something Hi
83
84
  Hi
84
85
  ```
85
86
 
87
+ The following only applies to scripts defined as lists of lists: if a command
88
+ argument is itself a list, it is concatenated into a path appropriate for the
89
+ current operating system. For example,
90
+
91
+ ```toml
92
+ [tool.ppqs.scripts]
93
+ do-something = [["do-something-to", ["subdir", "afile"]]]
94
+ ```
95
+
96
+ would run the command `do-something-to subdir/afile` on a Unix-based operating
97
+ system.
98
+
86
99
  Scripts may also be defined in their own section, which permit a few options:
87
100
 
88
101
  ```toml
@@ -100,8 +113,6 @@ script = [
100
113
  ["command1", "-v"],
101
114
  ["command2", "-q"],
102
115
  ]
103
- """
104
-
105
116
  ```
106
117
 
107
118
  where:
@@ -113,12 +124,25 @@ where:
113
124
  in the script. The header consists of the command to be run, centred on the
114
125
  console and padded with `*`s. Default is false.
115
126
 
116
- Commands are *not* parsed to the shell, so e.g. wildcards are not expanded. If
117
- the features of a shell script are needed (wildcards, conditional statements,
118
- etc.), one can write a helper script, e.g. `scripts/lots-to-do.py`, which may
127
+ Note that commands are *not* passed to the shell, so shell features
128
+ (e.g. wildcards, conditional statements) are not available. The recommended
129
+ solution is to write a helper script, e.g. `scripts/lots-to-do.py`, which may
119
130
  then be called by `ppqs` as:
120
131
 
121
132
  ```toml
122
133
  [tool.ppqs.scripts]
123
134
  lots-to-do = [["python", "scripts/lots-to-do.py"]]
124
135
  ```
136
+
137
+ ## Bash completion
138
+
139
+ `ppqs` support Bash command-line completion. Simply add the following command to
140
+ your `~/.bashrc` file:
141
+
142
+ ```bash
143
+ complete -C "ppqs --bash-completion" ppqs
144
+ ```
145
+
146
+ Typing `ppdq ` and hitting `TAB` will then show scripts available for the
147
+ current project. Typing part of a script name and hitting `TAB` will show
148
+ matching script name(s), or else complete the full name if unambiguous.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "ppqs"
7
- version = "1.0"
7
+ version = "1.0.2"
8
8
  description = "Python project quick scripts"
9
9
  authors = [
10
10
  { name = "Karl Wette", email = "karl.wette@anu.edu.au" },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ppqs
3
- Version: 1.0
3
+ Version: 1.0.2
4
4
  Summary: Python project quick scripts
5
5
  Author-email: Karl Wette <karl.wette@anu.edu.au>
6
6
  License-Expression: MIT
@@ -16,7 +16,7 @@ Dynamic: license-file
16
16
 
17
17
  # Python project quick scripts
18
18
 
19
- **Define simple development scripts in `pyproject.toml`**
19
+ **Define simple project management scripts in `pyproject.toml`**
20
20
 
21
21
  Developing a Python project usually involves many tasks: setting up, installing
22
22
  prerequisites, building, testing, cleaning up build products, etc. It can be
@@ -30,7 +30,7 @@ test harness, etc. the project uses behind a simple interface.
30
30
 
31
31
  Here is an example of **ppqs** being used for its own project:
32
32
 
33
- ```bash
33
+ ```
34
34
  $ ppqs --help
35
35
  Quick scripts for Python project: ppqs
36
36
 
@@ -94,11 +94,24 @@ print-something = "echo ..."
94
94
  ```
95
95
 
96
96
  may be run as
97
- ```bash
97
+
98
+ ```
98
99
  $ ppqs print-something Hi
99
100
  Hi
100
101
  ```
101
102
 
103
+ The following only applies to scripts defined as lists of lists: if a command
104
+ argument is itself a list, it is concatenated into a path appropriate for the
105
+ current operating system. For example,
106
+
107
+ ```toml
108
+ [tool.ppqs.scripts]
109
+ do-something = [["do-something-to", ["subdir", "afile"]]]
110
+ ```
111
+
112
+ would run the command `do-something-to subdir/afile` on a Unix-based operating
113
+ system.
114
+
102
115
  Scripts may also be defined in their own section, which permit a few options:
103
116
 
104
117
  ```toml
@@ -116,8 +129,6 @@ script = [
116
129
  ["command1", "-v"],
117
130
  ["command2", "-q"],
118
131
  ]
119
- """
120
-
121
132
  ```
122
133
 
123
134
  where:
@@ -129,12 +140,25 @@ where:
129
140
  in the script. The header consists of the command to be run, centred on the
130
141
  console and padded with `*`s. Default is false.
131
142
 
132
- Commands are *not* parsed to the shell, so e.g. wildcards are not expanded. If
133
- the features of a shell script are needed (wildcards, conditional statements,
134
- etc.), one can write a helper script, e.g. `scripts/lots-to-do.py`, which may
143
+ Note that commands are *not* passed to the shell, so shell features
144
+ (e.g. wildcards, conditional statements) are not available. The recommended
145
+ solution is to write a helper script, e.g. `scripts/lots-to-do.py`, which may
135
146
  then be called by `ppqs` as:
136
147
 
137
148
  ```toml
138
149
  [tool.ppqs.scripts]
139
150
  lots-to-do = [["python", "scripts/lots-to-do.py"]]
140
151
  ```
152
+
153
+ ## Bash completion
154
+
155
+ `ppqs` support Bash command-line completion. Simply add the following command to
156
+ your `~/.bashrc` file:
157
+
158
+ ```bash
159
+ complete -C "ppqs --bash-completion" ppqs
160
+ ```
161
+
162
+ Typing `ppdq ` and hitting `TAB` will then show scripts available for the
163
+ current project. Typing part of a script name and hitting `TAB` will show
164
+ matching script name(s), or else complete the full name if unambiguous.
@@ -12,7 +12,7 @@ else: # pragma: no cover
12
12
  import tomli as tomllib
13
13
 
14
14
  __author__ = "Karl Wette"
15
- __version__ = "1.0"
15
+ __version__ = "1.0.2"
16
16
 
17
17
 
18
18
  class MissingPyProjectError(Exception):
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes