skilleter-thingy 0.0.97__py3-none-any.whl → 0.0.98__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.

@@ -30,7 +30,6 @@ import thingy.colour as colour
30
30
  # TODO: -j option to run in parallel - yes, but it will only work with non-interactive Git commands
31
31
  # TODO: Command that takes partial working tree name and either returns full path or pops up window to autocomplete until single match found
32
32
  # TODO: Consistent colours in output
33
- # TODO: If run in a subdirectory, only process working trees in that tree (or have an option to do so)
34
33
  # TODO: Option to +dir to return all matches so that caller can select one they want
35
34
  # TODO: Verbose option
36
35
  # TODO: When filtering by tag, if tag starts with '!' only match if tag isn't present (and don't allow '!' at start of tag otherwise)
@@ -39,7 +38,8 @@ import thingy.colour as colour
39
38
  # TODO: +run command to do things other than git commands
40
39
  # TODO: init option '--update' to update the configuration file with new working trees and remove ones that are no longer there
41
40
  # TODO: init option '--set-default' to update the default branch to the current one for specified working trees
42
- # TODO: Integrat completion with fzf if installed?
41
+ # TODO: Integrate completion with fzf if installed?
42
+ # TODO: If run in a subdirectory, only process working trees in that tree (or have an option to do so, or an option _not_ to do so; --all)
43
43
  ################################################################################
44
44
 
45
45
  DEFAULT_CONFIG_FILE = 'multigit.toml'
@@ -153,14 +153,7 @@ def find_configuration(default_config_file):
153
153
  def show_progress(width, msg):
154
154
  """Show a single line progress message"""
155
155
 
156
- name = msg[:width-1]
157
-
158
- colour.write(f'{name}', newline=False)
159
-
160
- if len(name) < width-1:
161
- colour.write(' '*(width-len(name)), newline=False)
162
-
163
- colour.write('\r', newline=False)
156
+ colour.write(msg[:width-1], newline=False, cleareol=True, cr=True)
164
157
 
165
158
  ################################################################################
166
159
 
@@ -298,9 +291,10 @@ def mg_init(args, config, console):
298
291
 
299
292
  colour.write(f'Added [BOLD:{repo}] with default branch [BLUE:{default_branch}]')
300
293
 
301
- # Look for configuration entries that are no longer present and delete them
294
+ if not args.quiet:
295
+ colour.write(cleareol=True)
302
296
 
303
- colour.write()
297
+ # Look for configuration entries that are no longer present and delete them
304
298
 
305
299
  removals = []
306
300
 
@@ -571,7 +565,7 @@ def main():
571
565
 
572
566
  if not args.configuration_file:
573
567
  if args.internal_command and args.command == 'init':
574
- args.configuration_file = args.default_configuration_file
568
+ args.configuration_file = os.path.abspath(args.default_configuration_file)
575
569
  else:
576
570
  error('Cannot locate configuration file')
577
571
 
@@ -42,6 +42,8 @@ _ANSI_BMAGENTA = '\x1b[45m'
42
42
  _ANSI_BCYAN = '\x1b[46m'
43
43
  _ANSI_BWHITE = '\x1b[47m'
44
44
 
45
+ _ANSI_CLEAREOL = '\x1b[K'
46
+
45
47
  # Looking up tables for converting textual colour codes to ANSI codes
46
48
 
47
49
  ANSI_REGEXES = \
@@ -144,7 +146,7 @@ def format(txt):
144
146
 
145
147
  ################################################################################
146
148
 
147
- def write(txt=None, newline=True, stream=sys.stdout, indent=0, strip=False):
149
+ def write(txt=None, newline=True, stream=sys.stdout, indent=0, strip=False, cleareol=False, cr=False):
148
150
  """ Write to the specified stream (defaulting to stdout), converting colour codes to ANSI
149
151
  txt can be None, a string or a list of strings."""
150
152
 
@@ -163,10 +165,22 @@ def write(txt=None, newline=True, stream=sys.stdout, indent=0, strip=False):
163
165
 
164
166
  stream.write(line)
165
167
 
168
+ if cleareol:
169
+ stream.write(_ANSI_CLEAREOL)
170
+
166
171
  if newline or n < len(txt) - 1:
167
172
  stream.write('\n')
168
- elif newline:
169
- stream.write('\n')
173
+ elif cr:
174
+ stream.write('\r')
175
+
176
+ else:
177
+ if cleareol:
178
+ stream.write(_ANSI_CLEAREOL)
179
+
180
+ if newline:
181
+ stream.write('\n')
182
+ elif cr:
183
+ stream.write('\r')
170
184
 
171
185
  ################################################################################
172
186
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: skilleter_thingy
3
- Version: 0.0.97
3
+ Version: 0.0.98
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
@@ -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=ehTN6VD76i4U5k6dXuYoiqSRHI67_BP-bziklNAJSKY,4309
27
27
  skilleter_thingy/moviemover.py,sha256=QzUAWQzQ1AWWREIhl-VMaLo2h8MMhOekBnao5jGWV1s,4470
28
- skilleter_thingy/multigit.py,sha256=xcCG5M-lgeF1LFLvHAyIjEpXYa3vLZREladpFEVdMRA,22121
28
+ skilleter_thingy/multigit.py,sha256=mYEppth-mt_BPT9UTpSOOoNTyk5b1hIb4QZ4h_Q9EwI,22090
29
29
  skilleter_thingy/photodupe.py,sha256=l0hbzSLb2Vk2ceteg-x9fHXCEE1uUuFo84hz5rsZUPA,4184
30
30
  skilleter_thingy/phototidier.py,sha256=BOu-cKHMivDlBqlRqv7sL3J6Ix1K2dxWWNcderldyZo,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=T89xiH_po0nvH5T1AGgQOD5yhjKd9-LcHcmez3IORww,4604
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=-I5HOfWZNVxN85DjNPpzYLIUlzGrzMr3oLRwim7O6us,7103
47
+ skilleter_thingy/thingy/colour.py,sha256=mx7pXXoykQTiCu_BNA-JJSgFpsaUW3noY89d8YKrwBs,7411
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.97.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
65
- skilleter_thingy-0.0.97.dist-info/METADATA,sha256=MkSkIQGlsrgKS3NvYtPwA2u8rAQAtr-uo9FkdyM48ps,14528
66
- skilleter_thingy-0.0.97.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
67
- skilleter_thingy-0.0.97.dist-info/entry_points.txt,sha256=u5ymS-KPljIGTnprV5yJsAjz7qgeT2BZ-Qo_Con_PFM,2145
68
- skilleter_thingy-0.0.97.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
69
- skilleter_thingy-0.0.97.dist-info/RECORD,,
64
+ skilleter_thingy-0.0.98.dist-info/LICENSE,sha256=ljOS4DjXvqEo5VzGfdaRwgRZPbNScGBmfwyC8PChvmQ,32422
65
+ skilleter_thingy-0.0.98.dist-info/METADATA,sha256=9NyNkqOkkoHBkkx7jXFZRCfKpGIjUDd-DkKJ8-E0XOE,14528
66
+ skilleter_thingy-0.0.98.dist-info/WHEEL,sha256=nn6H5-ilmfVryoAQl3ZQ2l8SH5imPWFpm1A5FgEuFV4,91
67
+ skilleter_thingy-0.0.98.dist-info/entry_points.txt,sha256=u5ymS-KPljIGTnprV5yJsAjz7qgeT2BZ-Qo_Con_PFM,2145
68
+ skilleter_thingy-0.0.98.dist-info/top_level.txt,sha256=8-JhgToBBiWURunmvfpSxEvNkDHQQ7r25-aBXtZv61g,17
69
+ skilleter_thingy-0.0.98.dist-info/RECORD,,