skilleter-thingy 0.0.93__tar.gz → 0.0.94__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.

Potentially problematic release.


This version of skilleter-thingy might be problematic. Click here for more details.

Files changed (74) hide show
  1. {skilleter_thingy-0.0.93/skilleter_thingy.egg-info → skilleter_thingy-0.0.94}/PKG-INFO +1 -1
  2. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/pyproject.toml +1 -1
  3. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/multigit.py +38 -16
  4. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94/skilleter_thingy.egg-info}/PKG-INFO +1 -1
  5. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/LICENSE +0 -0
  6. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/README.md +0 -0
  7. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/setup.cfg +0 -0
  8. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/__init__.py +0 -0
  9. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/addpath.py +0 -0
  10. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/borger.py +0 -0
  11. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/box.py +0 -0
  12. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/console_colours.py +0 -0
  13. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/diskspacecheck.py +0 -0
  14. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/docker_purge.py +0 -0
  15. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/ffind.py +0 -0
  16. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/ggit.py +0 -0
  17. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/ggrep.py +0 -0
  18. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_br.py +0 -0
  19. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_ca.py +0 -0
  20. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_cleanup.py +0 -0
  21. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_co.py +0 -0
  22. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_common.py +0 -0
  23. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_hold.py +0 -0
  24. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_mr.py +0 -0
  25. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_parent.py +0 -0
  26. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_review.py +0 -0
  27. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_update.py +0 -0
  28. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/git_wt.py +0 -0
  29. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/gitcmp_helper.py +0 -0
  30. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/gitprompt.py +0 -0
  31. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/gl.py +0 -0
  32. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/gphotosync.py +0 -0
  33. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/linecount.py +0 -0
  34. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/moviemover.py +0 -0
  35. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/photodupe.py +0 -0
  36. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/phototidier.py +0 -0
  37. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/py_audit.py +0 -0
  38. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/readable.py +0 -0
  39. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/remdir.py +0 -0
  40. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/rmdupe.py +0 -0
  41. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/rpylint.py +0 -0
  42. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/splitpics.py +0 -0
  43. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/strreplace.py +0 -0
  44. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/sysmon.py +0 -0
  45. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/tfm.py +0 -0
  46. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/tfparse.py +0 -0
  47. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/__init__.py +0 -0
  48. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/colour.py +0 -0
  49. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/dc_curses.py +0 -0
  50. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/dc_defaults.py +0 -0
  51. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/dc_util.py +0 -0
  52. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/dircolors.py +0 -0
  53. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/docker.py +0 -0
  54. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/files.py +0 -0
  55. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/git.py +0 -0
  56. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/git2.py +0 -0
  57. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/gitlab.py +0 -0
  58. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/path.py +0 -0
  59. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/popup.py +0 -0
  60. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/process.py +0 -0
  61. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/run.py +0 -0
  62. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/tfm_pane.py +0 -0
  63. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/tidy.py +0 -0
  64. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/thingy/venv_template.py +0 -0
  65. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/trimpath.py +0 -0
  66. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/venv_create.py +0 -0
  67. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/window_rename.py +0 -0
  68. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/xchmod.py +0 -0
  69. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy/yamlcheck.py +0 -0
  70. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy.egg-info/SOURCES.txt +0 -0
  71. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy.egg-info/dependency_links.txt +0 -0
  72. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy.egg-info/entry_points.txt +0 -0
  73. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy.egg-info/requires.txt +0 -0
  74. {skilleter_thingy-0.0.93 → skilleter_thingy-0.0.94}/skilleter_thingy.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: skilleter_thingy
3
- Version: 0.0.93
3
+ Version: 0.0.94
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
@@ -7,7 +7,7 @@ name = "skilleter_thingy"
7
7
 
8
8
  # Version must be incremented to install updated Thingy
9
9
 
10
- version = "0.0.93"
10
+ version = "0.0.94"
11
11
 
12
12
  authors = [
13
13
  {name="John Skilleter", email="john@skilleter.org.uk"},
@@ -15,22 +15,23 @@ import thingy.colour as colour
15
15
  ################################################################################
16
16
 
17
17
  # DONE: / Output name of each git repo as it is processed as command sits there seeming to do nothing otherwise.
18
+ # DONE: Better error-handling - e.g. continue/abort option after failure in one repo
18
19
  # DONE: Don't save the configuration on exit if it hasn't changed
19
20
  # DONE: Don't use a fixed list of default branch names
21
+ # DONE: If the config file isn't in the current directory then search up the directory tree for it but run in the current directory
20
22
  # DONE: Use the configuration file
21
23
  # DONE: init function
22
- # TODO: -j option to run in parallel?
24
+ # NOPE: Dry-run option - just pass the option to the Git command
25
+ # NOPE: Is it going to be a problem if the same repo is checked out twice or more in the same workspace - user problem
23
26
  # NOPE: Pull/fetch - only output after running command and only if something updated
24
- # DONE: Better error-handling - e.g. continue/abort option after failure in one repo
27
+ # NOPE: Switch to tomlkit
28
+ # TODO: -j option to run in parallel - yes, but it will only work with non-interactive Git commands
29
+ # TODO: Command that takes partial repo name and either returns full path or pops up window to autocomplete until single match found
25
30
  # TODO: Consistent colours in output
26
- # TODO: Dry-run option
27
- # DONE: If the config file isn't in the current directory then search up the directory tree for it but run in the current directory
28
31
  # TODO: If run in a subdirectory, only process repos in that tree (or have an option to do so)
29
- # TODO: Is it going to be a problem if the same repo is checked out twice or more in the same workspace
30
- # NOPE: Switch to tomlkit
31
32
  # TODO: Verbose option
32
33
  # TODO: When specifying list of repos, if repo name doesn't contain '/' prefix it with '*'?
33
-
34
+ # TODO: select_git_repos() and +dir should use consist way of selecting repos if possible
34
35
  ################################################################################
35
36
 
36
37
  DEFAULT_CONFIG_FILE = 'multigit.toml'
@@ -248,9 +249,9 @@ def mg_init(args, config, console):
248
249
 
249
250
  if 'origin' in remote:
250
251
  config[repo]['origin'] = remote['origin']
251
- config[repo]['name']= os.path.basename(remote['origin']).removesuffix('.git')
252
+ config[repo]['repo name']= os.path.basename(remote['origin']).removesuffix('.git')
252
253
  else:
253
- config[repo]['name'] = os.path.basename(repo)
254
+ config[repo]['repo name'] = os.path.basename(repo)
254
255
 
255
256
  ################################################################################
256
257
 
@@ -268,18 +269,39 @@ def mg_dir(args, config, console):
268
269
  error('The +dir command takes no more than one parameter - the name of the working tree to search for')
269
270
  elif args.parameters:
270
271
  location = []
271
- search_dir = args.parameters[0]
272
+ wild_prefix_location = []
273
+ wild_location = []
274
+
275
+ search_name = args.parameters[0]
276
+
277
+ # Search for exact matches, matches if prefixed by '*' or prefixed and suffixed with '*'
278
+ # unless it already contains '*'
272
279
 
273
280
  for repo in select_git_repos(args, config):
274
- if fnmatch.fnmatch(repo['name'], search_dir):
281
+ if fnmatch.fnmatch(repo['repo name'], search_name):
275
282
  location.append(repo.name)
276
283
 
277
- if len(location) == 0:
278
- error(f'No matches with [BLUE:{search_dir}]')
279
- elif len(location) > 1:
280
- error(f'Multiple matches with [BLUE:{search_dir}] - {" ".join(location)}')
284
+ elif '*' not in search_name:
285
+ if fnmatch.fnmatch(repo['repo name'], f'*{search_name}'):
286
+ wild_prefix_location.append(repo.name)
287
+
288
+ elif fnmatch.fnmatch(repo['repo name'], f'*{search_name}*'):
289
+ wild_location.append(repo.name)
290
+
291
+ for destinations in (location, wild_prefix_location, wild_location):
292
+ if len(destinations) == 1:
293
+ destination = destinations
294
+ break
295
+ elif len(destinations) > 1:
296
+ destination = destinations
297
+
298
+ if not destination:
299
+ error(f'No matches with [BLUE:{search_name}]')
300
+
301
+ if len(destination) > 1:
302
+ error(f'Multiple matches with [BLUE:{search_name}] - {" ".join(destination)}')
281
303
 
282
- colour.write(os.path.join(os.path.dirname(args.configuration_file), location[0]))
304
+ colour.write(os.path.join(os.path.dirname(args.configuration_file), destination[0]))
283
305
  else:
284
306
  colour.write(os.path.dirname(args.configuration_file))
285
307
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: skilleter_thingy
3
- Version: 0.0.93
3
+ Version: 0.0.94
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