skilleter-thingy 0.3.14__py3-none-any.whl
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.
- skilleter_thingy/__init__.py +0 -0
- skilleter_thingy/addpath.py +107 -0
- skilleter_thingy/console_colours.py +63 -0
- skilleter_thingy/ffind.py +535 -0
- skilleter_thingy/ggit.py +88 -0
- skilleter_thingy/ggrep.py +155 -0
- skilleter_thingy/git_br.py +186 -0
- skilleter_thingy/git_ca.py +147 -0
- skilleter_thingy/git_cleanup.py +297 -0
- skilleter_thingy/git_co.py +227 -0
- skilleter_thingy/git_common.py +68 -0
- skilleter_thingy/git_hold.py +162 -0
- skilleter_thingy/git_parent.py +84 -0
- skilleter_thingy/git_retag.py +67 -0
- skilleter_thingy/git_review.py +1450 -0
- skilleter_thingy/git_update.py +398 -0
- skilleter_thingy/git_wt.py +72 -0
- skilleter_thingy/gitcmp_helper.py +328 -0
- skilleter_thingy/gitprompt.py +293 -0
- skilleter_thingy/linecount.py +154 -0
- skilleter_thingy/multigit.py +915 -0
- skilleter_thingy/py_audit.py +133 -0
- skilleter_thingy/remdir.py +127 -0
- skilleter_thingy/rpylint.py +98 -0
- skilleter_thingy/strreplace.py +82 -0
- skilleter_thingy/test.py +34 -0
- skilleter_thingy/tfm.py +948 -0
- skilleter_thingy/tfparse.py +101 -0
- skilleter_thingy/trimpath.py +82 -0
- skilleter_thingy/venv_create.py +47 -0
- skilleter_thingy/venv_template.py +47 -0
- skilleter_thingy/xchmod.py +124 -0
- skilleter_thingy/yamlcheck.py +89 -0
- skilleter_thingy-0.3.14.dist-info/METADATA +606 -0
- skilleter_thingy-0.3.14.dist-info/RECORD +39 -0
- skilleter_thingy-0.3.14.dist-info/WHEEL +5 -0
- skilleter_thingy-0.3.14.dist-info/entry_points.txt +31 -0
- skilleter_thingy-0.3.14.dist-info/licenses/LICENSE +619 -0
- skilleter_thingy-0.3.14.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,606 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: skilleter_thingy
|
|
3
|
+
Version: 0.3.14
|
|
4
|
+
Summary: A collection of useful utilities, mainly aimed at making Git more friendly
|
|
5
|
+
Author-email: John Skilleter <john@skilleter.org.uk>
|
|
6
|
+
Project-URL: Home, https://skilleter.org.uk
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.9
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Requires-Dist: imagehash
|
|
14
|
+
Requires-Dist: inotify
|
|
15
|
+
Requires-Dist: pillow
|
|
16
|
+
Requires-Dist: psutil
|
|
17
|
+
Requires-Dist: pyaml
|
|
18
|
+
Requires-Dist: pygit2
|
|
19
|
+
Requires-Dist: python-dateutil
|
|
20
|
+
Requires-Dist: requests
|
|
21
|
+
Requires-Dist: filetype
|
|
22
|
+
Requires-Dist: skilleter-modules
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
|
|
25
|
+
# Thingy
|
|
26
|
+
|
|
27
|
+
Licence: GPL v3
|
|
28
|
+
|
|
29
|
+
Author: John Skilleter v0.99
|
|
30
|
+
|
|
31
|
+
A collection of shell utilities and configuration stuff for Linux and MacOS. Untested on other operating systems.
|
|
32
|
+
|
|
33
|
+
Permanently (for the foreseeable future!) in a beta stage - usable, with a few rough edges, and probably with bugs when used in way I'm not expecting!
|
|
34
|
+
|
|
35
|
+
Install from PyPi via pip or pipx as the `skilleter-thingy` package; for instance - `pipx install skilleter_thingy`
|
|
36
|
+
|
|
37
|
+
The commands are categorised into:
|
|
38
|
+
|
|
39
|
+
* Git working tree management
|
|
40
|
+
* Miscellaneous commands
|
|
41
|
+
* Git Extensions
|
|
42
|
+
* General-purpose commands
|
|
43
|
+
|
|
44
|
+
# IMPORTANT
|
|
45
|
+
|
|
46
|
+
The `readable` utility (for cleaning log files) has been moved into a standalone package `skilleter-readable`.
|
|
47
|
+
|
|
48
|
+
If you already have a version installed from Skilleter-Thingy then, before installing the stand-alone version, you should update skilleter-thingy to the latest version then remove the `~/.local/share/pipx/venvs/skilleter-readable/bin/readable` symlink.
|
|
49
|
+
|
|
50
|
+
# Git Working Tree Management
|
|
51
|
+
|
|
52
|
+
## Multigit
|
|
53
|
+
|
|
54
|
+
Multigit is a tool for managing a collection of related git working trees.
|
|
55
|
+
|
|
56
|
+
This is intended for use in a situation where you have a collection of related git working trees organised in a directory hierarchy which aren't managed using git submodules or any other tool. It allows you to run git commands on multiple working trees at once, without navigating around the different working trees to do so and to select which working trees commands are run in.
|
|
57
|
+
|
|
58
|
+
For ease of use it is recommended that you create an alias for multigit called `mg`. How you do this is dependent on the shell you use, for instance in Bash, you could create an alias in your `~/.bashrc` file:
|
|
59
|
+
|
|
60
|
+
alias mg="multigit $@"
|
|
61
|
+
|
|
62
|
+
### Initialisation
|
|
63
|
+
|
|
64
|
+
To use multigit, start by creating working trees for the repositories that you want to use in a directory tree - the working trees can be at different levels or even nested, for example:
|
|
65
|
+
|
|
66
|
+
multigit_tree
|
|
67
|
+
|
|
|
68
|
+
+----working tree 1
|
|
69
|
+
|
|
|
70
|
+
+---+subdirectory
|
|
71
|
+
| |
|
|
72
|
+
| +----working tree 2
|
|
73
|
+
| |
|
|
74
|
+
| +----working tree 3
|
|
75
|
+
|
|
|
76
|
+
+----working tree 4
|
|
77
|
+
|
|
78
|
+
Start by running ensuring that the default branch (e.g. `main`) is checked out in each of the working trees and, in the top-level directory, run `multigit init` to create the configuration file which, by default is called `multigit.toml` - this is just a text file that sets the configuration for each working tree in terms of name, origin, default branch, tags and location.
|
|
79
|
+
|
|
80
|
+
### Multigit Command Line
|
|
81
|
+
|
|
82
|
+
The multigit command line format is:
|
|
83
|
+
|
|
84
|
+
multigit OPTIONS COMMAND
|
|
85
|
+
|
|
86
|
+
Where COMMAND is an internal multigit command if it starts with a `+` and is a git command otherwise (including the additional git commands described in this document).
|
|
87
|
+
|
|
88
|
+
By default, when multigit is invoked with a git command, it runs a the command in each of the working trees selected by the command line options passed to multigit (if no options are specified then the command is run in *all* the working trees.
|
|
89
|
+
|
|
90
|
+
The command takes a number of options that can be used to select the list of working trees that each of the subcommands that it supports runs in:
|
|
91
|
+
|
|
92
|
+
`--repos REPO` / `-r REPO` Allows a list of working trees to be specfied, either by path, name or a wildcard matching either.
|
|
93
|
+
|
|
94
|
+
`--modified` / `-m` Run only in working trees containing locally modified files
|
|
95
|
+
|
|
96
|
+
`--branched` / `-b` Run only in working trees where the current branch that is checked out is NOT the default branch
|
|
97
|
+
|
|
98
|
+
`--tag TAG` / `-t TAG` Run only in working trees that are tagged with the specified tag
|
|
99
|
+
|
|
100
|
+
`--sub` / `-s` Run only in working trees that are in the current directory tree.
|
|
101
|
+
|
|
102
|
+
`--continue` / `-o` Continue if a git command returns an error (by default, executation terminates when a command fails)
|
|
103
|
+
|
|
104
|
+
`--path PATH` / `-C PATH` Run as if the command was started in PATH instead of the current working directory
|
|
105
|
+
|
|
106
|
+
These options are AND-ed together, so specifying `--modified --branched --tag WOMBAT` will select only working trees that are modified AND branched AND tagged with `WOMBAT`, but the parameters to the `--repos` and `--tag` options are OR-ed together, so specifying `--tag WOMBAT --tag EMU` will select repos that are tagged as `WOMBAT` *OR* `EMU`.
|
|
107
|
+
|
|
108
|
+
Multigit tags are stored in the configuration file, not within the working tree and each working tree can have multiple tags.
|
|
109
|
+
|
|
110
|
+
### Multigit Commands
|
|
111
|
+
|
|
112
|
+
Multigit supports a small list of subcommands, each of which are prefixed with a `+` to distinguish them from Git commands:
|
|
113
|
+
|
|
114
|
+
`+clone REPO <BRANCH>` - Clone REPO (which should contain a multigit configuration file), checking out BRANCH, if specified, then clone all the repos specified in the configuration, checking out the default branch in each one.
|
|
115
|
+
|
|
116
|
+
`+init` - Create or update the configuration file
|
|
117
|
+
|
|
118
|
+
`+dir NAME` - Given the name of a working tree, output relative path(s) to one or more matching working trees. If `NAME` does NOT contains wildcard characters (`*` or `?`) then matching takes place as if `*` were prefixed and appended to it, otherwise, the wildcards are used as specified. If `NAME` is not specified then the location of the directory where the multigit configuration file resides is output.
|
|
119
|
+
|
|
120
|
+
`+list` - Return a list of the top level directories of each of the Git repos
|
|
121
|
+
|
|
122
|
+
`+config` - Print the name and location of the multigit configuration file.
|
|
123
|
+
|
|
124
|
+
`+tag TAG` - If no tag specified list tags applied to the specified working trees. If a tag *is* specified, then *apply* the tag to the specified working trees.
|
|
125
|
+
|
|
126
|
+
`+untag TAG` - Remove the tag from the specified working trees (do nothing if the tag is not applied in the first place).
|
|
127
|
+
|
|
128
|
+
`+run COMMAND` - Run the specified command in each of the specified working trees
|
|
129
|
+
|
|
130
|
+
`+add REPO DIR` - Clone REPO into the DIR directory and, if successful, add it to the multigit configuration
|
|
131
|
+
|
|
132
|
+
Any command *not* prefixed with `+` is run in each of the working trees (filtered by the various multigit options) as a git command.
|
|
133
|
+
|
|
134
|
+
For example; `multigit -m commit -ab` would run `git commit -a` in each of the working trees that is branched and contains modified files.
|
|
135
|
+
|
|
136
|
+
The `+dir` command can be used with shell aliases (or their equivalent in the user's shell of choice) to create an alias to run, for example, `cd (multigit +dir "$@")` (Bash) or `cd (multigit +dir $argv)` (for the Fish shell) that would cd to the top level directory.
|
|
137
|
+
|
|
138
|
+
# Miscellaneous Git Utilities
|
|
139
|
+
|
|
140
|
+
## gitprompt
|
|
141
|
+
|
|
142
|
+
Output a string containing colour-coded shell nesting level, current directory and git working tree status. It is intended to be used in the shell prompt; for instance, for Bash via adding:
|
|
143
|
+
|
|
144
|
+
export PS1=$(gitprompt)
|
|
145
|
+
|
|
146
|
+
to the `~/.bashrc` file.
|
|
147
|
+
|
|
148
|
+
The appearance of the prompt is controlled by configuration settings in the `.gitconfig` file:
|
|
149
|
+
|
|
150
|
+
[prompt]
|
|
151
|
+
prefix = 0..2
|
|
152
|
+
|
|
153
|
+
The `prefix` value determines what git status information is shown in the prompt:
|
|
154
|
+
|
|
155
|
+
* 0 - No status information
|
|
156
|
+
* 1 - A single letter followed by a file count showing the number of stashed, untracked, modified, etc. files in the working tree
|
|
157
|
+
* 2 - As 1, but using a word, rather than a single letter
|
|
158
|
+
|
|
159
|
+
If a rebase, bisect or merge is process, this is also shown in the prompt.
|
|
160
|
+
|
|
161
|
+
The name of the repo and the current branch are also appended and the prompt is also colour-coded according to the state of the working tree.
|
|
162
|
+
|
|
163
|
+
# Git Extensions
|
|
164
|
+
|
|
165
|
+
Due to the way that the git command works, these can be run as they were additional git subcommands, although, due to a limitation in git, the only things that does not work is the `--help` option where the command has to be run with a hyphen between `git` and the subcommand - for example `git ca --help` does not work, but `git-ca --help` does.
|
|
166
|
+
|
|
167
|
+
## Branch Names
|
|
168
|
+
|
|
169
|
+
Where one of the git extensions takes an existing branch name as a parameter, the branch name can be abbreviated and the abbreviated form is expanded according to the following rules:
|
|
170
|
+
|
|
171
|
+
* If the specified branch name exactly matches an existing branch, tag or commit ID then that is used (this includes remote branches where appropriate, if no local branches match).
|
|
172
|
+
* Otherwise, the branch name is compared to existing branches (again, including remote branches where appropriate, if no local branches match) and, if the specified name uniquely partially matches an existing branch (optionally using `*` and `?` wildcard characters) that branch is used. If it matches multiple branches than an error is reported.
|
|
173
|
+
|
|
174
|
+
For example, given a repo with the following branches:
|
|
175
|
+
|
|
176
|
+
origin/wombat
|
|
177
|
+
origin/platypus
|
|
178
|
+
wombat
|
|
179
|
+
emu
|
|
180
|
+
battery
|
|
181
|
+
chaos
|
|
182
|
+
|
|
183
|
+
Then:
|
|
184
|
+
|
|
185
|
+
* 'emu' will match 'emu'
|
|
186
|
+
* 'wombat' will match 'wombat' but not 'origin/wombat' since the local branch takes precedence
|
|
187
|
+
* 'at' will match both 'wombat' and 'battery' and will report an error
|
|
188
|
+
* 'pus' will match 'origin/platypus'
|
|
189
|
+
|
|
190
|
+
This is most useful where branches contain ticket numbers so, for instance given a branch called `feature/SKIL-103` you can check it out using `git co 103` assuming no other local branches contain `103` in their name.
|
|
191
|
+
|
|
192
|
+
Note that the concept of the default branch `DEFAULT` mentioned above *only* applies when using the `multigit` command, although some of the commands will treat branches called `master` or `main` as special cases (see the individual command documentation).
|
|
193
|
+
|
|
194
|
+
## git br
|
|
195
|
+
|
|
196
|
+
List or delete branches that have been merged
|
|
197
|
+
|
|
198
|
+
usage: git-br [-h] [--all] [--delete] [--path PATH] [branches ...]
|
|
199
|
+
|
|
200
|
+
positional arguments:
|
|
201
|
+
branches Filter the list of branches according to one or more patterns
|
|
202
|
+
|
|
203
|
+
options:
|
|
204
|
+
-h, --help show this help message and exit
|
|
205
|
+
--all, -a List all branches, including remotes
|
|
206
|
+
--delete, -d Delete the specified branch(es), even if it is the current one (list of branches to delete must be supplied as parameters)
|
|
207
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
208
|
+
|
|
209
|
+
## git ca
|
|
210
|
+
|
|
211
|
+
Improved version of 'git commit --amend'. Updates files that are already in the commit and, optionally, adds and commits additional files.
|
|
212
|
+
|
|
213
|
+
usage: git-ca [-h] [--added] [--all] [--everything] [--ignored] [--patch] [--verbose] [--dry-run] [files ...]
|
|
214
|
+
|
|
215
|
+
positional arguments:
|
|
216
|
+
files List of files to add to the commit
|
|
217
|
+
|
|
218
|
+
options:
|
|
219
|
+
-h, --help show this help message and exit
|
|
220
|
+
--added, -A Update files in the current commit, including files added with `git add`
|
|
221
|
+
--all, -a Append all locally-modified, tracked files to the current commit
|
|
222
|
+
--everything, -e Append all modified and untracked files to the current commit (implies `~--all`)
|
|
223
|
+
--ignored, -i Include files normally hidden by `.gitignore`
|
|
224
|
+
--patch, -p Use the interactive patch selection interface to chose which changes to commit.
|
|
225
|
+
--verbose, -v Verbose mode
|
|
226
|
+
--dry-run, -D Dry-run
|
|
227
|
+
|
|
228
|
+
## git cleanup
|
|
229
|
+
|
|
230
|
+
List or delete branches that have already been merged and delete tracking branches that are no longer on the remote.
|
|
231
|
+
|
|
232
|
+
git-cleanup [-h] [--delete] [--master MASTER] [--force] [--unmerged] [--yes] [--debug] [branches ...]
|
|
233
|
+
|
|
234
|
+
positional arguments:
|
|
235
|
+
|
|
236
|
+
branches List of branches to check (default is all branches)
|
|
237
|
+
|
|
238
|
+
options:
|
|
239
|
+
-h, --help show this help message and exit
|
|
240
|
+
--delete, -d Delete all branches that have been merged
|
|
241
|
+
--master MASTER, -m MASTER, --main MASTER
|
|
242
|
+
Specify the master branch (Attempts to read this from GitLab or defaults to "develop" if present or "master" or "main" otherwise
|
|
243
|
+
--force, -f Allow protected branches (e.g. master) to be removed
|
|
244
|
+
--unmerged, -u List branches that have NOT been merged
|
|
245
|
+
--yes, -y Assume "yes" in response to any prompts (e.g. to delete branches)
|
|
246
|
+
--debug Enable debug output
|
|
247
|
+
|
|
248
|
+
## git co
|
|
249
|
+
|
|
250
|
+
Equivalent to `git checkout` but with enhanced branch matching as described above. The command does not support the full range of options supported by the `git checkout` comamnd which should still be used where additional functionality is required.
|
|
251
|
+
|
|
252
|
+
git-co [-h] [--branch] [--update] [--rebase] [--force] [--exact] [--debug] branchname
|
|
253
|
+
|
|
254
|
+
positional arguments:
|
|
255
|
+
|
|
256
|
+
branchname The branch name (or a partial name that matches uniquely against a local branch, remote branch, commit ID or tag)
|
|
257
|
+
|
|
258
|
+
options:
|
|
259
|
+
-h, --help show this help message and exit
|
|
260
|
+
--branch, -b Create the specified branch
|
|
261
|
+
--update, -u If a remote branch exists, delete any local branch and check out the remote version
|
|
262
|
+
--rebase, -r Rebase the branch onto its parent after checking it out
|
|
263
|
+
--force, -f When using the update option, recreate the local branch even if it is owned by the current user (based on the author of the most recent commit)
|
|
264
|
+
--exact, -e Do not use branch name matching - check out the branch as specified (if it exists)
|
|
265
|
+
--debug Enable debug output
|
|
266
|
+
|
|
267
|
+
## git common
|
|
268
|
+
|
|
269
|
+
Find the most recent common ancestor for two commits
|
|
270
|
+
|
|
271
|
+
usage: git-common [-h] [--short] [--long] [--path PATH] [commit1] [commit2]
|
|
272
|
+
|
|
273
|
+
positional arguments:
|
|
274
|
+
commit1 First commit (default=HEAD)
|
|
275
|
+
commit2 Second commit (default=master)
|
|
276
|
+
|
|
277
|
+
options:
|
|
278
|
+
-h, --help show this help message and exit
|
|
279
|
+
--short, -s Just output the ancestor commit ID
|
|
280
|
+
--long, -l Output the log entry for the commit
|
|
281
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
282
|
+
|
|
283
|
+
## git hold
|
|
284
|
+
|
|
285
|
+
Archive, list or recover one or more Git branches
|
|
286
|
+
|
|
287
|
+
usage: git-hold [-h] [--list] [--restore] [--path PATH] [branches ...]
|
|
288
|
+
|
|
289
|
+
positional arguments:
|
|
290
|
+
branches Branches
|
|
291
|
+
|
|
292
|
+
options:
|
|
293
|
+
-h, --help show this help message and exit
|
|
294
|
+
--list, -l List archived branches
|
|
295
|
+
--restore, -r Restore archived branches
|
|
296
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
297
|
+
|
|
298
|
+
## git parent
|
|
299
|
+
|
|
300
|
+
Attempt to determine the parent branch for the specified branch (defaulting to the current one).
|
|
301
|
+
|
|
302
|
+
git-parent [-h] [--all] [--verbose] [branch]
|
|
303
|
+
|
|
304
|
+
Attempt to determine the parent branch for the specified branch (defaulting to the current one)
|
|
305
|
+
|
|
306
|
+
positional arguments:
|
|
307
|
+
branch Branch, commit or commit (defaults to current branch; main)
|
|
308
|
+
|
|
309
|
+
options:
|
|
310
|
+
-h, --help show this help message and exit
|
|
311
|
+
--all, -a Include feature branches as possible parents
|
|
312
|
+
--verbose, -v Report verbose results (includes number of commits between branch and parent)
|
|
313
|
+
|
|
314
|
+
## git retag
|
|
315
|
+
|
|
316
|
+
Apply or update a tag, optionally updating it on the remote as well. If the specified tag exists, it is deleted
|
|
317
|
+
and re-applied, otherwise it is recreated.
|
|
318
|
+
|
|
319
|
+
usage: git-retag [-h] [--push] [--path PATH] tag
|
|
320
|
+
|
|
321
|
+
positional arguments:
|
|
322
|
+
tag The tag
|
|
323
|
+
|
|
324
|
+
options:
|
|
325
|
+
-h, --help show this help message and exit
|
|
326
|
+
--push, -p Push the tag to the remote
|
|
327
|
+
--path PATH, -C PATH Run the command in the specified directory
|
|
328
|
+
|
|
329
|
+
## git update
|
|
330
|
+
|
|
331
|
+
Update the rworking tree from the remote, rebase local branch(es) against their parents and optionally run git cleanup.
|
|
332
|
+
|
|
333
|
+
git-update [-h] [--cleanup] [--all] [--everything] [--default] [--parent PARENT] [--all-parents] [--stop] [--ignore IGNORE] [--verbose] [--dry-run]
|
|
334
|
+
|
|
335
|
+
options:
|
|
336
|
+
-h, --help show this help message and exit
|
|
337
|
+
--cleanup, -c After updating a branch, delete it if there are no differences between it and its parent branch
|
|
338
|
+
--all, -a Update all local branches, not just the current one
|
|
339
|
+
--everything, -A Update all local branches, not just the current one and ignore the default ignore list specified in the Git configuration
|
|
340
|
+
--default, -d Checkout the main or master branch on completion
|
|
341
|
+
--parent PARENT, -p PARENT
|
|
342
|
+
Specify the parent branch, rather than trying to work it out
|
|
343
|
+
--all-parents, -P Feature branches are not considered as alternative parents unless this option is specified
|
|
344
|
+
--stop, -s Stop if a rebase problem occurs, instead of skipping the branch
|
|
345
|
+
--ignore IGNORE, -i IGNORE
|
|
346
|
+
List of one or more wildcard branch names not to attempt to update (uses update.ignore from the Git configuration if not specified)
|
|
347
|
+
--verbose Enable verbose output
|
|
348
|
+
--dry-run Report what would be done without actually doing it
|
|
349
|
+
|
|
350
|
+
## git wt
|
|
351
|
+
|
|
352
|
+
Output the top level directory of the git working tree or return an error if we are not in a git working tree.
|
|
353
|
+
|
|
354
|
+
git-wt [-h] [--parent] [--dir DIR] [level]
|
|
355
|
+
|
|
356
|
+
positional arguments:
|
|
357
|
+
level Number of levels below the top-level directory to report
|
|
358
|
+
|
|
359
|
+
options:
|
|
360
|
+
-h, --help show this help message and exit
|
|
361
|
+
--parent, -p If we are already at the top of the working tree, check if the parent directory is in a working tree and output the top-level directory of that tree.
|
|
362
|
+
--dir DIR, -d DIR Find the location of the top-level directory in the working tree starting at the specified directory
|
|
363
|
+
|
|
364
|
+
## git review
|
|
365
|
+
|
|
366
|
+
Menu-driven Git code review tool
|
|
367
|
+
|
|
368
|
+
git-review [-h] [--commit COMMIT] [--branch BRANCH] [--change] [--debug] [--dir DIR] [--difftool DIFFTOOL] [commits ...]
|
|
369
|
+
|
|
370
|
+
positional arguments:
|
|
371
|
+
commits Commit(s) or paths to compare
|
|
372
|
+
|
|
373
|
+
options:
|
|
374
|
+
-h, --help show this help message and exit
|
|
375
|
+
--commit COMMIT, -c COMMIT
|
|
376
|
+
Compare the specified commit with its parent
|
|
377
|
+
--branch BRANCH, -b BRANCH
|
|
378
|
+
Compare the specified commit to branch point on specified branch
|
|
379
|
+
--change, -C Compare the current commit with its parent
|
|
380
|
+
--debug, -d Start a debug session over Telnet using pudb
|
|
381
|
+
--dir DIR Work in the specified directory
|
|
382
|
+
--difftool DIFFTOOL Override the default git diff tool
|
|
383
|
+
|
|
384
|
+
## ggit
|
|
385
|
+
|
|
386
|
+
Run a git command in all working trees under the current directory (somewhat superceded by multigit).
|
|
387
|
+
|
|
388
|
+
## ggrep
|
|
389
|
+
|
|
390
|
+
Run 'git grep' in all repos under the current directory (somewhat superceded by multigit).
|
|
391
|
+
|
|
392
|
+
# General Commands
|
|
393
|
+
|
|
394
|
+
## addpath
|
|
395
|
+
|
|
396
|
+
Add or remove entries from a path list (e.g. as used by the PATH environment variable)
|
|
397
|
+
|
|
398
|
+
addpath [-h] [--add ADD] [--prefix PREFIX] [--suffix SUFFIX] [--remove REMOVE] [--force FORCE] [--separator SEPARATOR] path
|
|
399
|
+
|
|
400
|
+
positional arguments:
|
|
401
|
+
path The path to modify
|
|
402
|
+
|
|
403
|
+
options:
|
|
404
|
+
-h, --help show this help message and exit
|
|
405
|
+
--add ADD Add an entry to the front of the path (do nothing if it is already present in the path)
|
|
406
|
+
--prefix PREFIX Add an entry to the front of the path (or move it there if it is already present)
|
|
407
|
+
--suffix SUFFIX Add an entry to the end of the path (or move it there if it is already present)
|
|
408
|
+
--remove REMOVE Remove an entry from the path (do nothing if it is not present
|
|
409
|
+
--force FORCE Add entries even if a corresponding directory does not exist
|
|
410
|
+
--separator SEPARATOR
|
|
411
|
+
Override the default path separator
|
|
412
|
+
|
|
413
|
+
## consolecolours
|
|
414
|
+
|
|
415
|
+
Display all available colours in the console.
|
|
416
|
+
|
|
417
|
+
## ffind
|
|
418
|
+
|
|
419
|
+
Simple file find utility - replaces the `find` command with something that is more human-friendly.
|
|
420
|
+
|
|
421
|
+
ffind [-h] [--path PATH] [--long] [--colour] [--no-colour] [--all] [--zero] [--iname] [--follow] [--git] [--diff] [--regex] [--fullpath] [--human-readable] [--grep GREP] [--abspath]
|
|
422
|
+
[--unquoted] [--quiet] [--invert] [--exec EXEC] [--count] [--count-only] [--type TYPE] [--file] [--dir] [--block] [--char] [--pipe] [--symlink] [--socket] [--any] [--verbose]
|
|
423
|
+
[--debug]
|
|
424
|
+
[patterns ...]
|
|
425
|
+
|
|
426
|
+
positional arguments:
|
|
427
|
+
patterns List of things to search for.
|
|
428
|
+
|
|
429
|
+
options:
|
|
430
|
+
-h, --help show this help message and exit
|
|
431
|
+
--path PATH, -p PATH Search the specified path, rather than the current directory
|
|
432
|
+
--long, -l Output details of any files that match (cannot be used with -0/--zero)
|
|
433
|
+
--colour, -C, --color
|
|
434
|
+
Colourise output even if not outputting to the terminal
|
|
435
|
+
--no-colour, -N, --no-color
|
|
436
|
+
Never colourise output
|
|
437
|
+
--all Search all directories (do not skip .git, and similar control directories)
|
|
438
|
+
--zero, -0 Output results separated by NUL characters
|
|
439
|
+
--iname, -i Perform case-independent search
|
|
440
|
+
--follow, -F Follow symlinks
|
|
441
|
+
--git, -g Only search for objects in the current git repository
|
|
442
|
+
--diff, -D, --diffuse
|
|
443
|
+
Run Diffuse to on all the found objects (files only)
|
|
444
|
+
--regex, -R Use regex matching rather than globbing
|
|
445
|
+
--fullpath, -P Match the entire path, rather than just the filename
|
|
446
|
+
--human-readable, -H When reporting results in long format, use human-readable sizes
|
|
447
|
+
--grep GREP, -G GREP Only report files that contain text that matches the specified regular expression
|
|
448
|
+
--abspath, -A Report the absolute path to matching entities, rather than the relative path
|
|
449
|
+
--unquoted, -U Do not use quotation marks around results containing spaces
|
|
450
|
+
--quiet, -q Do not report permission errors that prevented a complete search
|
|
451
|
+
--invert, -I Invert the wildcard - list files that do not match
|
|
452
|
+
--exec EXEC, -x EXEC Execute the specified command on each match (optionally use ^ to mark the position of the filename)
|
|
453
|
+
--count, -K Report the number of objects found
|
|
454
|
+
--count-only, -c Just report the number of objects found
|
|
455
|
+
--type TYPE, -t TYPE Type of item(s) to include in the results, where b=block device, c=character device, d=directory, p=pipe, f=file, l=symlink, s=socket. Defaults to files and directories
|
|
456
|
+
--file, -f Include files in the results (the default if no other type specified)
|
|
457
|
+
--dir, -d Include directories in the results
|
|
458
|
+
--block Include block devices in the results
|
|
459
|
+
--char Include character devices in the results
|
|
460
|
+
--pipe Include pipes in the results
|
|
461
|
+
--symlink, --link Include symbolic links in the results
|
|
462
|
+
--socket Include sockets in the results
|
|
463
|
+
--any, -a Include all types of item (the default unless specific types specified)
|
|
464
|
+
--verbose, -v Output verbose data
|
|
465
|
+
--debug Output debug data
|
|
466
|
+
|
|
467
|
+
## linecount
|
|
468
|
+
|
|
469
|
+
Summarise number of files, lines of text and total size of files in a directory tree
|
|
470
|
+
|
|
471
|
+
usage: linecount [-h] [--ext]
|
|
472
|
+
|
|
473
|
+
options:
|
|
474
|
+
-h, --help show this help message and exit
|
|
475
|
+
--ext, -e Identify file type using the file extension (faster but less accurrate)
|
|
476
|
+
|
|
477
|
+
## py-audit
|
|
478
|
+
|
|
479
|
+
Query api.osv.dev to determine whether a specified version of a particular Python package is subject to known security vulnerabilities
|
|
480
|
+
|
|
481
|
+
py-audit [-h] [requirements ...]
|
|
482
|
+
|
|
483
|
+
positional arguments:
|
|
484
|
+
requirements The requirements file (if not specified, then the script searches for a requirements.txt file)
|
|
485
|
+
|
|
486
|
+
options:
|
|
487
|
+
-h, --help show this help message and exit
|
|
488
|
+
|
|
489
|
+
## remdir
|
|
490
|
+
|
|
491
|
+
Recursively delete empty directories
|
|
492
|
+
|
|
493
|
+
remdir [-h] [--dry-run] [--debug] [--verbose] [--ignore IGNORE] [--keep KEEP] dirs [dirs ...]
|
|
494
|
+
|
|
495
|
+
positional arguments:
|
|
496
|
+
dirs Directories to prune
|
|
497
|
+
|
|
498
|
+
options:
|
|
499
|
+
-h, --help show this help message and exit
|
|
500
|
+
--dry-run, -D Dry-run - report what would be done without doing anything
|
|
501
|
+
--debug Output debug information
|
|
502
|
+
--verbose Output verbose information
|
|
503
|
+
--ignore IGNORE, -I IGNORE
|
|
504
|
+
Files to ignore when considering whether a directory is empty
|
|
505
|
+
--keep KEEP, -K KEEP Directories that should be kept even if they are empty
|
|
506
|
+
|
|
507
|
+
## rpylint
|
|
508
|
+
|
|
509
|
+
Run pylint on all the Python source files in a directory tree
|
|
510
|
+
|
|
511
|
+
usage: rpylint [-h] [paths ...]
|
|
512
|
+
|
|
513
|
+
positional arguments:
|
|
514
|
+
paths List of files or paths to lint
|
|
515
|
+
|
|
516
|
+
options:
|
|
517
|
+
-h, --help show this help message and exit
|
|
518
|
+
|
|
519
|
+
## strreplace
|
|
520
|
+
|
|
521
|
+
Simple search and replace utility for those times when trying to escape characters in a regexp to use sed is more hassle than it is worth.
|
|
522
|
+
|
|
523
|
+
strreplace [-h] [--inplace] search replace [infile] [outfile]
|
|
524
|
+
|
|
525
|
+
positional arguments:
|
|
526
|
+
search Search text
|
|
527
|
+
replace Replacment text
|
|
528
|
+
infile Input file
|
|
529
|
+
outfile Output file
|
|
530
|
+
|
|
531
|
+
options:
|
|
532
|
+
-h, --help show this help message and exit
|
|
533
|
+
--inplace, -i Do an in-place search and replace on the input file
|
|
534
|
+
|
|
535
|
+
## tfm
|
|
536
|
+
|
|
537
|
+
Console-based file-manager, similar to Midnight Commander but aiming to be better.
|
|
538
|
+
|
|
539
|
+
usage: tfm [-h] [--pudb]
|
|
540
|
+
|
|
541
|
+
options:
|
|
542
|
+
-h, --help show this help message and exit
|
|
543
|
+
--pudb Invoke pudb debugger over Telnet
|
|
544
|
+
|
|
545
|
+
## tfparse
|
|
546
|
+
|
|
547
|
+
Read JSON Terraform output and convert back to human-readable text
|
|
548
|
+
|
|
549
|
+
This allows multiple errors and warnings to be reported as there's no way of doing this directly from Terraform
|
|
550
|
+
|
|
551
|
+
usage: tfparse [-h] [--abspath] [infile ...]
|
|
552
|
+
|
|
553
|
+
positional arguments:
|
|
554
|
+
infile The error file (defaults to standard input if not specified)
|
|
555
|
+
|
|
556
|
+
options:
|
|
557
|
+
-h, --help show this help message and exit
|
|
558
|
+
--abspath, -a Output absolute file paths
|
|
559
|
+
|
|
560
|
+
## trimpath
|
|
561
|
+
|
|
562
|
+
Intelligently trim a path to fit a given width (used by gitprompt)
|
|
563
|
+
|
|
564
|
+
## venv-create
|
|
565
|
+
|
|
566
|
+
Create a script to create/update a virtual environment and run a python script in it.
|
|
567
|
+
|
|
568
|
+
usage: venv-create [-h] name
|
|
569
|
+
|
|
570
|
+
positional arguments:
|
|
571
|
+
name Name of the script to create
|
|
572
|
+
|
|
573
|
+
options:
|
|
574
|
+
-h, --help show this help message and exit
|
|
575
|
+
|
|
576
|
+
## xchmod
|
|
577
|
+
|
|
578
|
+
Command to run chmod only on files that need it (only modifies files that don't have the required permissions already).
|
|
579
|
+
|
|
580
|
+
usage: xchmod [-h] [--debug] [--verbose] [--recursive] mode paths [paths ...]
|
|
581
|
+
|
|
582
|
+
positional arguments:
|
|
583
|
+
mode Mode to set
|
|
584
|
+
paths List of directory paths to search
|
|
585
|
+
|
|
586
|
+
options:
|
|
587
|
+
-h, --help show this help message and exit
|
|
588
|
+
--debug Output the list of files (if any) that need to be made publically writeable
|
|
589
|
+
--verbose List files as they are updated
|
|
590
|
+
--recursive, -R Operate recursively
|
|
591
|
+
|
|
592
|
+
## yamlcheck
|
|
593
|
+
|
|
594
|
+
YAML validator - checks that a file is valid YAML (use yamllint to verify that it is nicely-formatted YAML).
|
|
595
|
+
|
|
596
|
+
usage: yamlcheck [-h] [--dump] [--block] [--flow] [--hiera] files [files ...]
|
|
597
|
+
|
|
598
|
+
positional arguments:
|
|
599
|
+
files YAML source file
|
|
600
|
+
|
|
601
|
+
options:
|
|
602
|
+
-h, --help show this help message and exit
|
|
603
|
+
--dump Dump the YAML data after parsing it
|
|
604
|
+
--block Force block style when dumping the YAML data
|
|
605
|
+
--flow Force flow style when dumping the YAML data
|
|
606
|
+
--hiera Process the file as Puppet Hiera data
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
skilleter_thingy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
skilleter_thingy/addpath.py,sha256=4Yhhgjjz1XDI98j0dAiQpNA2ejLefeWUTeSg3nIXQq0,3842
|
|
3
|
+
skilleter_thingy/console_colours.py,sha256=X5R02S3JBUpKIdVc7h33qv3D9R_D689lAFXMkvyWPvE,1787
|
|
4
|
+
skilleter_thingy/ffind.py,sha256=D45bckD-9885maVZaNbFla59vE_0T7B-eUSwraMxqHU,19604
|
|
5
|
+
skilleter_thingy/ggit.py,sha256=KgytfK2_wP7ffg01N_SUOc3dSRKrD-U37jXh14MqymY,2480
|
|
6
|
+
skilleter_thingy/ggrep.py,sha256=TkT8pZVJauUKmOCTh_wWUYsNmG2L3_rDYcalyGhqSM0,5902
|
|
7
|
+
skilleter_thingy/git_br.py,sha256=oK8bZqdcDEJm_1BqMiriP9nR0MauYP6CW_M61qLpzP4,6019
|
|
8
|
+
skilleter_thingy/git_ca.py,sha256=CLl1_N4siG0IZpeNC1ZbQ0BIGAXkehfeA4LZd-SWr10,5183
|
|
9
|
+
skilleter_thingy/git_cleanup.py,sha256=FVWWOnJME5levxePYdiriXkpzw-F5rXGDCbWteflfsk,10534
|
|
10
|
+
skilleter_thingy/git_co.py,sha256=S2vgVMYEqKOa5cCBtQDxPS670UVC1X2Pa5a-SuzMzG8,8505
|
|
11
|
+
skilleter_thingy/git_common.py,sha256=0mZMXsyNxiMaY37sjjyz4zCtdiGsCULLxJyxHYrl-qM,2126
|
|
12
|
+
skilleter_thingy/git_hold.py,sha256=mSNH05CNVVkl8QNDel8MIdMOJomDkqUgt0obHz9Gswo,4935
|
|
13
|
+
skilleter_thingy/git_parent.py,sha256=V9q-qeajLhlan3i7vorCbZVtHkmaPnqx1UG0e_rmrgQ,2953
|
|
14
|
+
skilleter_thingy/git_retag.py,sha256=7hsNHMtwetwPcJfkcysdByX5daGstfe3O3IBZj2exdE,1843
|
|
15
|
+
skilleter_thingy/git_review.py,sha256=l-RfmbhoO1wVSTEn8CNzrV8YvGDfjpARGfbnK4_gSCM,52575
|
|
16
|
+
skilleter_thingy/git_update.py,sha256=dQh3-2yQwbJBilPqqDrQ3mA4FMG7xGyKTeJYikT1Meo,14586
|
|
17
|
+
skilleter_thingy/git_wt.py,sha256=OaeOmQUQ8O-vPq628OGTGMoHd07z3J618YXg5pp2nW8,2370
|
|
18
|
+
skilleter_thingy/gitcmp_helper.py,sha256=UymJ5SmE6kgE-NMHIFlazcIqoGJsUC8D3veUDn_Cy8c,11622
|
|
19
|
+
skilleter_thingy/gitprompt.py,sha256=UEkBemPofHujFkq_DVjIB8GJS9ZAPNf6s0KC6nMOAkw,9024
|
|
20
|
+
skilleter_thingy/linecount.py,sha256=NhCDWmv_PDyXo2YJOZAUzBZKMWB5wysodwYdib3ydgk,4315
|
|
21
|
+
skilleter_thingy/multigit.py,sha256=gQDZt0SMBfVJTcfIXh_Tp5608fEkEHAC9NUBo1BIt-Y,34036
|
|
22
|
+
skilleter_thingy/py_audit.py,sha256=W21pnrCI-Cz3qUgfJ8HODtTjmZTtGlTOKoTTpz-Mo2o,4384
|
|
23
|
+
skilleter_thingy/remdir.py,sha256=mtNVta-aTqswsR0J7Z6xWx2-Rh4p9OqGkfkg9AcenEk,4659
|
|
24
|
+
skilleter_thingy/rpylint.py,sha256=spdVVpNyElkV1fQknv-RESmqe7U0QZYneX96vSAEMSo,2875
|
|
25
|
+
skilleter_thingy/strreplace.py,sha256=zMhqC38KF0BddTsRM5Pa99HU3KXvxXg942qxRK-LALA,2539
|
|
26
|
+
skilleter_thingy/test.py,sha256=QEr4N82q-R5oXF7ObHLUCLF8KyGs3G-YH34RQ_pk5nc,581
|
|
27
|
+
skilleter_thingy/tfm.py,sha256=ODEuD6G7O6BcfxQNltOo_ygkTBqpXpI1nrBRldFsTNw,35432
|
|
28
|
+
skilleter_thingy/tfparse.py,sha256=3LqM9Cu3oSl7D9WrQE7PuKLcZA5yxMOP5J6P2R52Yac,2997
|
|
29
|
+
skilleter_thingy/trimpath.py,sha256=MBdDRGJ1VcDvXe_MAsCeECTwERwVM3PNKJfgdsP0XKk,2384
|
|
30
|
+
skilleter_thingy/venv_create.py,sha256=QyNsEF9OddOP-BLm95zCn4p9QXD9M4bdyN5IazandzI,1158
|
|
31
|
+
skilleter_thingy/venv_template.py,sha256=ZfUvi8qFNGrk7J030Zy57xjwMtfIArJyqa-MqafyjVk,1016
|
|
32
|
+
skilleter_thingy/xchmod.py,sha256=T89xiH_po0nvH5T1AGgQOD5yhjKd9-LcHcmez3IORww,4604
|
|
33
|
+
skilleter_thingy/yamlcheck.py,sha256=FXylZ5NtHirDlPVhVEUZUZkTugVR-g51BbjaN06akAc,2868
|
|
34
|
+
skilleter_thingy-0.3.14.dist-info/licenses/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
|
35
|
+
skilleter_thingy-0.3.14.dist-info/METADATA,sha256=aXZHfuU2pLcgbIB-LPLe0dyyePIn-lDIscG0elgIetM,28056
|
|
36
|
+
skilleter_thingy-0.3.14.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
37
|
+
skilleter_thingy-0.3.14.dist-info/entry_points.txt,sha256=u9DrD8PGJmUvaub5EUGErOcfp9REhyehOyfBn-Klk5Y,1403
|
|
38
|
+
skilleter_thingy-0.3.14.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
|
|
39
|
+
skilleter_thingy-0.3.14.dist-info/RECORD,,
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[console_scripts]
|
|
2
|
+
addpath = skilleter_thingy:addpath.addpath
|
|
3
|
+
consolecolours = skilleter_thingy:console_colours.console_colours
|
|
4
|
+
ffind = skilleter_thingy:ffind.ffind
|
|
5
|
+
ggit = skilleter_thingy:ggit.ggit
|
|
6
|
+
ggrep = skilleter_thingy:ggrep.ggrep
|
|
7
|
+
git-br = skilleter_thingy:git_br.git_br
|
|
8
|
+
git-ca = skilleter_thingy:git_ca.git_ca
|
|
9
|
+
git-cleanup = skilleter_thingy:git_cleanup.git_cleanup
|
|
10
|
+
git-co = skilleter_thingy:git_co.git_co
|
|
11
|
+
git-common = skilleter_thingy:git_common.git_common
|
|
12
|
+
git-hold = skilleter_thingy:git_hold.git_hold
|
|
13
|
+
git-parent = skilleter_thingy:git_parent.git_parent
|
|
14
|
+
git-retag = skilleter_thingy:git_retag.git_retag
|
|
15
|
+
git-review = skilleter_thingy:git_review.git_review
|
|
16
|
+
git-update = skilleter_thingy:git_update.git_update
|
|
17
|
+
git-wt = skilleter_thingy:git_wt.git_wt
|
|
18
|
+
gitcmp-helper = skilleter_thingy:gitcmp_helper.gitcmp_helper
|
|
19
|
+
gitprompt = skilleter_thingy:gitprompt.gitprompt
|
|
20
|
+
linecount = skilleter_thingy:linecount.linecount
|
|
21
|
+
multigit = skilleter_thingy:multigit.multigit
|
|
22
|
+
py-audit = skilleter_thingy:py_audit.py_audit
|
|
23
|
+
remdir = skilleter_thingy:remdir.remdir
|
|
24
|
+
rpylint = skilleter_thingy:rpylint.rpylint
|
|
25
|
+
strreplace = skilleter_thingy:strreplace.strreplace
|
|
26
|
+
tfm = skilleter_thingy:tfm.tfm
|
|
27
|
+
tfparse = skilleter_thingy:tfparse.tfparse
|
|
28
|
+
trimpath = skilleter_thingy:trimpath.trimpath
|
|
29
|
+
venv-create = skilleter_thingy:venv_create.venv_create
|
|
30
|
+
xchmod = skilleter_thingy:xchmod.xchmod
|
|
31
|
+
yamlcheck = skilleter_thingy:yamlcheck.yamlcheck
|