skilleter-thingy 0.0.76__py3-none-any.whl → 0.0.77__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.
Potentially problematic release.
This version of skilleter-thingy might be problematic. Click here for more details.
- skilleter_thingy/multigit.py +9 -7
- skilleter_thingy/thingy/colour.py +4 -1
- {skilleter_thingy-0.0.76.dist-info → skilleter_thingy-0.0.77.dist-info}/METADATA +80 -56
- {skilleter_thingy-0.0.76.dist-info → skilleter_thingy-0.0.77.dist-info}/RECORD +8 -8
- {skilleter_thingy-0.0.76.dist-info → skilleter_thingy-0.0.77.dist-info}/LICENSE +0 -0
- {skilleter_thingy-0.0.76.dist-info → skilleter_thingy-0.0.77.dist-info}/WHEEL +0 -0
- {skilleter_thingy-0.0.76.dist-info → skilleter_thingy-0.0.77.dist-info}/entry_points.txt +0 -0
- {skilleter_thingy-0.0.76.dist-info → skilleter_thingy-0.0.77.dist-info}/top_level.txt +0 -0
skilleter_thingy/multigit.py
CHANGED
|
@@ -244,8 +244,8 @@ def mg_push(args, config, console):
|
|
|
244
244
|
and where the most recent commit was the current user and was on the branch
|
|
245
245
|
"""
|
|
246
246
|
|
|
247
|
-
# TODO: Add option for force-push?
|
|
248
|
-
# TODO: Add option for manual confirmation?
|
|
247
|
+
# TODO: [/] Add option for force-push?
|
|
248
|
+
# TODO: [ ] Add option for manual confirmation?
|
|
249
249
|
|
|
250
250
|
for repo in find_git_repos(args.directory, args.repos):
|
|
251
251
|
if not args.quiet:
|
|
@@ -256,11 +256,10 @@ def mg_push(args, config, console):
|
|
|
256
256
|
if branch != config[repo]['default branch']:
|
|
257
257
|
colour.write(f'Pushing changes to [BLUE:{branch}] in [BOLD:{repo}]')
|
|
258
258
|
|
|
259
|
-
result = git.push(path=repo)
|
|
259
|
+
result = git.push(path=repo, force_with_lease=args.force)
|
|
260
260
|
|
|
261
261
|
if result:
|
|
262
|
-
|
|
263
|
-
colour.write(f' {line}')
|
|
262
|
+
colour.write(result, indent=4)
|
|
264
263
|
|
|
265
264
|
colour.write()
|
|
266
265
|
|
|
@@ -295,7 +294,8 @@ def mg_commit(args, config, console):
|
|
|
295
294
|
commit those changes onto the branch"""
|
|
296
295
|
|
|
297
296
|
# TODO [ ] Option to amend the commit if it is not the first one on the current branch
|
|
298
|
-
# TODO [
|
|
297
|
+
# TODO [/] Prevent commits if current branch is the default branch
|
|
298
|
+
# TODO [ ] Option to specify wildcard for files to commit (default is all files)
|
|
299
299
|
|
|
300
300
|
for repo in find_git_repos(args.directory, args.repos):
|
|
301
301
|
if not args.quiet:
|
|
@@ -337,7 +337,7 @@ def mg_update(args, config, console):
|
|
|
337
337
|
if branch != default_branch:
|
|
338
338
|
git.checkout(branch, path=repo)
|
|
339
339
|
result = git.rebase(default_branch, path=repo)
|
|
340
|
-
colour.write(
|
|
340
|
+
colour.write(result[0], indent=4)
|
|
341
341
|
|
|
342
342
|
################################################################################
|
|
343
343
|
|
|
@@ -407,7 +407,9 @@ def main():
|
|
|
407
407
|
parser_status = subparsers.add_parser('status', help='Report git status in every repo that has something to report')
|
|
408
408
|
parser_fetch = subparsers.add_parser('fetch', help='Run git fetch in every repo')
|
|
409
409
|
parser_pull = subparsers.add_parser('pull', help='Run git pull in every repo')
|
|
410
|
+
|
|
410
411
|
parser_push = subparsers.add_parser('push', help='Run git push in every repo where the current branch isn\'t the default and the most recent commit was by the current user')
|
|
412
|
+
parser_push.add_argument('--force', '-f', action='store_true', help='Use --force-push-with-least to update a remote branch if the local branch has been rebased')
|
|
411
413
|
|
|
412
414
|
parser_checkout = subparsers.add_parser('checkout', help='Checkout the specified branch')
|
|
413
415
|
parser_checkout.add_argument('--create', '-b', action='store_true', help='Create the specified branch and check it out')
|
|
@@ -144,7 +144,7 @@ def format(txt):
|
|
|
144
144
|
|
|
145
145
|
################################################################################
|
|
146
146
|
|
|
147
|
-
def write(txt=None, newline=True, stream=sys.stdout, indent=0):
|
|
147
|
+
def write(txt=None, newline=True, stream=sys.stdout, indent=0, strip=False):
|
|
148
148
|
""" Write to the specified stream (defaulting to stdout), converting colour codes to ANSI
|
|
149
149
|
txt can be None, a string or a list of strings."""
|
|
150
150
|
|
|
@@ -155,6 +155,9 @@ def write(txt=None, newline=True, stream=sys.stdout, indent=0):
|
|
|
155
155
|
for n, line in enumerate(txt):
|
|
156
156
|
line = format(line)
|
|
157
157
|
|
|
158
|
+
if strip:
|
|
159
|
+
line = line.strip()
|
|
160
|
+
|
|
158
161
|
if indent:
|
|
159
162
|
stream.write(' ' * indent)
|
|
160
163
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: skilleter_thingy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.77
|
|
4
4
|
Summary: A collection of useful utilities, mainly aimed at making Git more friendly
|
|
5
5
|
Author-email: John Skilleter <john@skilleter.org.uk>
|
|
6
6
|
Project-URL: Home, https://skilleter.org.uk
|
|
@@ -33,16 +33,62 @@ The following commands are documented in detail in the help output that can be d
|
|
|
33
33
|
|
|
34
34
|
This README just contains a summary of the functionality of each command.
|
|
35
35
|
|
|
36
|
+
# Git Utilities
|
|
37
|
+
|
|
38
|
+
## ggit
|
|
39
|
+
|
|
40
|
+
Run a git command in all repos under the current directory
|
|
41
|
+
|
|
42
|
+
## ggrep
|
|
43
|
+
|
|
44
|
+
Run 'git grep' in all repos under the current directory
|
|
45
|
+
|
|
46
|
+
## gitprompt
|
|
47
|
+
|
|
48
|
+
Output a string containing colour-coded shell nesting level, current directory and git working tree status (used in the shell prompt).
|
|
49
|
+
|
|
50
|
+
## git ca
|
|
51
|
+
|
|
52
|
+
Improved version of 'git commit --amend'. Updates files that are already in the commit and, optionally, adds and commits additional files.
|
|
53
|
+
|
|
54
|
+
## git cleanup
|
|
55
|
+
|
|
56
|
+
List or delete branches that have already been merged and delete tracking branches that are no longer on ther remote.
|
|
57
|
+
|
|
58
|
+
## git co
|
|
59
|
+
|
|
60
|
+
Equivalent to 'git checkout' but with intelligent branch matching
|
|
61
|
+
|
|
62
|
+
## git mr
|
|
63
|
+
|
|
64
|
+
Push a feature branch to GitLab and create a merge request
|
|
65
|
+
|
|
66
|
+
## git parent
|
|
67
|
+
|
|
68
|
+
Attempt to determine the parent branch for the specified branch (defaulting to the current one)
|
|
69
|
+
|
|
70
|
+
## git update
|
|
71
|
+
|
|
72
|
+
Update the repo from the remote, rebase branches against their parents, optionally run git cleanup
|
|
73
|
+
|
|
74
|
+
## git wt
|
|
75
|
+
|
|
76
|
+
Output the top level directory of the git working tree or return an error if we are not in a git working tree.
|
|
77
|
+
|
|
78
|
+
## git review
|
|
79
|
+
|
|
80
|
+
Console-based git change review tool.
|
|
81
|
+
|
|
82
|
+
## multigit
|
|
83
|
+
|
|
84
|
+
Manage a collection of related git repoitories.
|
|
85
|
+
|
|
36
86
|
# General Commands
|
|
37
87
|
|
|
38
88
|
## addpath
|
|
39
89
|
|
|
40
90
|
Update a $PATH-type variable by adding or removing entries.
|
|
41
91
|
|
|
42
|
-
## borger
|
|
43
|
-
|
|
44
|
-
Wrapper for the borg backup utility to make it easier to use with a fixed set of options.
|
|
45
|
-
|
|
46
92
|
## console-colours
|
|
47
93
|
|
|
48
94
|
Display all available colours in the console.
|
|
@@ -63,33 +109,10 @@ Simple file find utility
|
|
|
63
109
|
|
|
64
110
|
Implements the functionality of the find command that is regularly used in a simpler fashion and ignores all the options that nobody ever uses.
|
|
65
111
|
|
|
66
|
-
## gl
|
|
67
|
-
|
|
68
|
-
### gphotosync
|
|
69
|
-
|
|
70
|
-
Utility for syncing photos from Google Photos to local storage
|
|
71
|
-
|
|
72
112
|
## linecount
|
|
73
113
|
|
|
74
114
|
Count lines of code in a directory tree organised by file type.
|
|
75
115
|
|
|
76
|
-
## moviemover
|
|
77
|
-
|
|
78
|
-
Search for files matching a wildcard in a directory tree and move them to an equivalent location in a different tree
|
|
79
|
-
|
|
80
|
-
## phototidier
|
|
81
|
-
|
|
82
|
-
Perform various tidying operations on a directory full of photos:
|
|
83
|
-
|
|
84
|
-
* Remove leading '$' and '_' from filenames
|
|
85
|
-
* Move files in hidden directories up 1 level
|
|
86
|
-
* If the EXIF data in a photo indicates that it was taken on date that doesn't match the name of the directory it is stored in (in YYYY-MM-DD format) then it is moved to the correct directory, creating it if necessary.
|
|
87
|
-
|
|
88
|
-
All move/rename operations are carried out safely with the file being moved having
|
|
89
|
-
a numeric suffix added to the name if it conflicts with an existing file.
|
|
90
|
-
|
|
91
|
-
## photodupe
|
|
92
|
-
|
|
93
116
|
## py-audit
|
|
94
117
|
|
|
95
118
|
Query api.osv.dev to determine whether a specified version of a particular Python package is subject to known security vulnerabilities
|
|
@@ -114,16 +137,10 @@ Run pylint on all the Python source files in the current tree
|
|
|
114
137
|
|
|
115
138
|
Synchronise files from S3 to local storage.
|
|
116
139
|
|
|
117
|
-
## splitpics
|
|
118
|
-
|
|
119
|
-
Copy a directory full of pictures to a destination, creating subdiretories with a fixed number of pictures in each in the destination directory for use with FAT filesystems and digital photo frames.
|
|
120
|
-
|
|
121
140
|
## strreplace
|
|
122
141
|
|
|
123
142
|
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.
|
|
124
143
|
|
|
125
|
-
## sysmon
|
|
126
|
-
|
|
127
144
|
## tfm
|
|
128
145
|
|
|
129
146
|
Console-based file-manager, similar to Midnight Commander but better.
|
|
@@ -138,7 +155,9 @@ no way of doing this directly from Terraform
|
|
|
138
155
|
|
|
139
156
|
Intelligently trim a path to fit a given width (used by gitprompt)
|
|
140
157
|
|
|
141
|
-
##
|
|
158
|
+
## venv-create
|
|
159
|
+
|
|
160
|
+
Create a script to create/update a virtual environment and run a python script in it.
|
|
142
161
|
|
|
143
162
|
## xchmod
|
|
144
163
|
|
|
@@ -150,44 +169,49 @@ Currently implements a *very* restricted set of functionality.
|
|
|
150
169
|
|
|
151
170
|
YAML validator - checks that a file is valid YAML (use yamllint to verify that it is nicely-formatted YAML).
|
|
152
171
|
|
|
153
|
-
#
|
|
172
|
+
# Obsolescent Utilities
|
|
154
173
|
|
|
155
|
-
|
|
174
|
+
These will be moved to the skilleter-extras package in due course.
|
|
156
175
|
|
|
157
|
-
|
|
176
|
+
## borger
|
|
158
177
|
|
|
159
|
-
|
|
178
|
+
Wrapper for the borg backup utility to make it easier to use with a fixed set of options.
|
|
160
179
|
|
|
161
|
-
|
|
180
|
+
## gl
|
|
162
181
|
|
|
163
|
-
|
|
182
|
+
Command line for GitLab
|
|
164
183
|
|
|
165
|
-
|
|
184
|
+
## gphotosync
|
|
166
185
|
|
|
167
|
-
|
|
186
|
+
Utility for syncing photos from Google Photos to local storage
|
|
168
187
|
|
|
169
|
-
|
|
188
|
+
## moviemover
|
|
170
189
|
|
|
171
|
-
|
|
190
|
+
Search for files matching a wildcard in a directory tree and move them to an equivalent location in a different tree
|
|
172
191
|
|
|
173
|
-
|
|
192
|
+
## phototidier
|
|
174
193
|
|
|
175
|
-
|
|
194
|
+
Perform various tidying operations on a directory full of photos:
|
|
176
195
|
|
|
177
|
-
|
|
196
|
+
* Remove leading '$' and '_' from filenames
|
|
197
|
+
* Move files in hidden directories up 1 level
|
|
198
|
+
* If the EXIF data in a photo indicates that it was taken on date that doesn't match the name of the directory it is stored in (in YYYY-MM-DD format) then it is moved to the correct directory, creating it if necessary.
|
|
178
199
|
|
|
179
|
-
|
|
200
|
+
All move/rename operations are carried out safely with the file being moved having
|
|
201
|
+
a numeric suffix added to the name if it conflicts with an existing file.
|
|
180
202
|
|
|
181
|
-
##
|
|
203
|
+
## photodupe
|
|
182
204
|
|
|
183
|
-
|
|
205
|
+
Search for duplicate images in a directory tree
|
|
184
206
|
|
|
185
|
-
##
|
|
207
|
+
## splitpics
|
|
186
208
|
|
|
187
|
-
|
|
209
|
+
Copy a directory full of pictures to a destination, creating subdiretories with a fixed number of pictures in each in the destination directory for use with FAT filesystems and digital photo frames.
|
|
188
210
|
|
|
189
|
-
##
|
|
211
|
+
## sysmon
|
|
190
212
|
|
|
191
|
-
|
|
213
|
+
Simple console system monitor
|
|
192
214
|
|
|
193
|
-
|
|
215
|
+
## window-rename
|
|
216
|
+
|
|
217
|
+
Monitor window titles and rename them to fit an alphabetical grouping in 'Appname - Document' format.
|
|
@@ -25,7 +25,7 @@ skilleter_thingy/gl.py,sha256=9zbGpKxw6lX9RghLkdy-Q5sZlqtbB3uGFO04qTu1dH8,5954
|
|
|
25
25
|
skilleter_thingy/gphotosync.py,sha256=Vb2zYTEFp26BYdkG810SRg9afyfDqvq4CLHTk-MFf60,22388
|
|
26
26
|
skilleter_thingy/linecount.py,sha256=5voQtjJjDCVx4zjPwVRy620NpuLiwwFitzxjIsRGtxQ,4310
|
|
27
27
|
skilleter_thingy/moviemover.py,sha256=j_Xb9_jFdgpFBAXcF4tEqbnKH_FonlnUU39LiCK980k,4470
|
|
28
|
-
skilleter_thingy/multigit.py,sha256=
|
|
28
|
+
skilleter_thingy/multigit.py,sha256=DES_T2XpyR82jR30e26KvrXMgmSepUhSiSffjTru1AU,19026
|
|
29
29
|
skilleter_thingy/photodupe.py,sha256=l0hbzSLb2Vk2ceteg-x9fHXCEE1uUuFo84hz5rsZUPA,4184
|
|
30
30
|
skilleter_thingy/phototidier.py,sha256=5gSjlINUxf3ZQl3NG0o7CsWwODvTbokIMIafLFvn8Hc,7818
|
|
31
31
|
skilleter_thingy/py_audit.py,sha256=xJm5k5qyeA6ii8mODa4dOkmP8L1drv94UHuxR54RsIM,4384
|
|
@@ -44,7 +44,7 @@ skilleter_thingy/window_rename.py,sha256=dCBgZqih_3YKHt35hsOAhARFp3QxOi8w8huC63s
|
|
|
44
44
|
skilleter_thingy/xchmod.py,sha256=F9_lxKuLqVlHHr3oBI3dkMoFOuwRzYDlpQMTmDcjpBI,4590
|
|
45
45
|
skilleter_thingy/yamlcheck.py,sha256=FXylZ5NtHirDlPVhVEUZUZkTugVR-g51BbjaN06akAc,2868
|
|
46
46
|
skilleter_thingy/thingy/__init__.py,sha256=rVPTxm8L5w52U0YdTd7r_D44SBP7pS3JCJtsf0iIsow,110
|
|
47
|
-
skilleter_thingy/thingy/colour.py,sha256
|
|
47
|
+
skilleter_thingy/thingy/colour.py,sha256=-I5HOfWZNVxN85DjNPpzYLIUlzGrzMr3oLRwim7O6us,7103
|
|
48
48
|
skilleter_thingy/thingy/dc_curses.py,sha256=fuuQPR11zV_akAhygL_cAhVLC5YAgKgowzlITVbETE8,8539
|
|
49
49
|
skilleter_thingy/thingy/dc_defaults.py,sha256=ahcteQvoWZrO5iTU68zkIY1Zex6iX5uR5ubwI4CCYBk,6170
|
|
50
50
|
skilleter_thingy/thingy/dc_util.py,sha256=Df73imXhHx3HzcPHiRcHAoea0e3HURdLcrolUsMhOFs,1783
|
|
@@ -61,9 +61,9 @@ skilleter_thingy/thingy/run.py,sha256=6SNKWF01fSxzB10GMU9ajraXYZqAL1w0PXkqjJdr1U
|
|
|
61
61
|
skilleter_thingy/thingy/tfm_pane.py,sha256=oqy5zBzKwfbjbGqetbbhpKi4x5He7sl4qkmhUeqtdZc,19789
|
|
62
62
|
skilleter_thingy/thingy/tidy.py,sha256=71DCyj0VJrj52RmjQyj1eOiQJIfy5EIPHuThOrS6ZTA,5876
|
|
63
63
|
skilleter_thingy/thingy/venv_template.py,sha256=SsVNvSwojd8NnFeQaZPCRQYTNdwJRplpZpygbUEXRnY,1015
|
|
64
|
-
skilleter_thingy-0.0.
|
|
65
|
-
skilleter_thingy-0.0.
|
|
66
|
-
skilleter_thingy-0.0.
|
|
67
|
-
skilleter_thingy-0.0.
|
|
68
|
-
skilleter_thingy-0.0.
|
|
69
|
-
skilleter_thingy-0.0.
|
|
64
|
+
skilleter_thingy-0.0.77.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
|
|
65
|
+
skilleter_thingy-0.0.77.dist-info/METADATA,sha256=OuTAQKPCHRzc4K-j1oHaFnpO8piPz-pKO5uT-0uPs3s,5938
|
|
66
|
+
skilleter_thingy-0.0.77.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
67
|
+
skilleter_thingy-0.0.77.dist-info/entry_points.txt,sha256=uW11ofmIbfPP_5B-pxb8YDkHbeZ_xeCoO6358R9wGVI,2146
|
|
68
|
+
skilleter_thingy-0.0.77.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
|
|
69
|
+
skilleter_thingy-0.0.77.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|