multiSSH3 5.98__py3-none-any.whl → 5.99__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 multiSSH3 might be problematic. Click here for more details.
- multiSSH3.py +27 -13
- {multissh3-5.98.dist-info → multissh3-5.99.dist-info}/METADATA +1 -1
- multissh3-5.99.dist-info/RECORD +6 -0
- multissh3-5.98.dist-info/RECORD +0 -6
- {multissh3-5.98.dist-info → multissh3-5.99.dist-info}/WHEEL +0 -0
- {multissh3-5.98.dist-info → multissh3-5.99.dist-info}/entry_points.txt +0 -0
- {multissh3-5.98.dist-info → multissh3-5.99.dist-info}/top_level.txt +0 -0
multiSSH3.py
CHANGED
|
@@ -84,7 +84,7 @@ except Exception:
|
|
|
84
84
|
print('Warning: functools.lru_cache is not available, multiSSH3 will run slower without cache.',file=sys.stderr)
|
|
85
85
|
def cache_decorator(func):
|
|
86
86
|
return func
|
|
87
|
-
version = '5.
|
|
87
|
+
version = '5.99'
|
|
88
88
|
VERSION = version
|
|
89
89
|
__version__ = version
|
|
90
90
|
COMMIT_DATE = '2025-10-24'
|
|
@@ -2839,7 +2839,7 @@ def mergeOutput(merging_hostnames,outputs_by_hostname,output,diff_display_thresh
|
|
|
2839
2839
|
indexes = Counter({hostname: 0 for hostname in merging_hostnames})
|
|
2840
2840
|
working_index_keys = set(merging_hostnames)
|
|
2841
2841
|
previousBuddies = set()
|
|
2842
|
-
hostnameWrapper = textwrap.TextWrapper(width=line_length -1, tabsize=4, replace_whitespace=False, drop_whitespace=False, break_on_hyphens=False,initial_indent='
|
|
2842
|
+
hostnameWrapper = textwrap.TextWrapper(width=line_length -1, tabsize=4, replace_whitespace=False, drop_whitespace=False, break_on_hyphens=False,initial_indent=' ', subsequent_indent='- ')
|
|
2843
2843
|
hostnameWrapper.wordsep_simple_re = re.compile(r'([,]+)')
|
|
2844
2844
|
diff_display_item_count = max(1,int(max(map(len, outputs_by_hostname.values())) * (1 - diff_display_threshold)))
|
|
2845
2845
|
def get_multiset_index_for_hostname(hostname):
|
|
@@ -2874,6 +2874,13 @@ def mergeOutput(merging_hostnames,outputs_by_hostname,output,diff_display_thresh
|
|
|
2874
2874
|
# futures[hostname] # ensure it's initialized
|
|
2875
2875
|
futures = {hostname: get_multiset_index_for_hostname(hostname) for hostname in merging_hostnames}
|
|
2876
2876
|
currentLines = defaultdict(set)
|
|
2877
|
+
color_cap = get_terminal_color_capability()
|
|
2878
|
+
if color_cap == 'None':
|
|
2879
|
+
green_str = ''
|
|
2880
|
+
reset_str = ''
|
|
2881
|
+
else:
|
|
2882
|
+
green_str = rgb_to_ansi_color_string(*COLOR_PALETTE.get('green', __DEFAULT_COLOR_PALETTE['green']))
|
|
2883
|
+
reset_str = '\033[0m'
|
|
2877
2884
|
for hostname in merging_hostnames:
|
|
2878
2885
|
currentLines[outputs_by_hostname[hostname][0]].add(hostname)
|
|
2879
2886
|
while indexes:
|
|
@@ -2911,14 +2918,18 @@ def mergeOutput(merging_hostnames,outputs_by_hostname,output,diff_display_thresh
|
|
|
2911
2918
|
if buddy != previousBuddies:
|
|
2912
2919
|
hostnameStr = ','.join(compact_hostnames(buddy))
|
|
2913
2920
|
hostnameLines = hostnameWrapper.wrap(hostnameStr)
|
|
2914
|
-
hostnameLines = [line.ljust(line_length) for line in hostnameLines]
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2921
|
+
# hostnameLines = [line.ljust(line_length) for line in hostnameLines]
|
|
2922
|
+
if color_cap == 'None':
|
|
2923
|
+
hostnameLines[0] = f"■{hostnameLines[0]}"
|
|
2924
|
+
elif len(buddy) < len(merging_hostnames):
|
|
2925
|
+
color = int_to_unique_ansi_color(hash(hostnameStr))
|
|
2926
|
+
hostnameLines[0] = f"{color}■{hostnameLines[0]}"
|
|
2927
|
+
hostnameLines[-1] += reset_str
|
|
2928
|
+
else:
|
|
2929
|
+
hostnameLines[0] = f"{green_str}■{reset_str}{hostnameLines[0]}"
|
|
2919
2930
|
output.extend(hostnameLines)
|
|
2920
2931
|
previousBuddies = buddy
|
|
2921
|
-
output.append(lineToAdd
|
|
2932
|
+
output.append(lineToAdd)
|
|
2922
2933
|
currentLines[lineToAdd].difference_update(buddy)
|
|
2923
2934
|
if not currentLines[lineToAdd]:
|
|
2924
2935
|
del currentLines[lineToAdd]
|
|
@@ -2946,19 +2957,22 @@ def mergeOutputs(outputs_by_hostname, merge_groups, remaining_hostnames, diff_di
|
|
|
2946
2957
|
if color_cap == 'None':
|
|
2947
2958
|
color_line = ''
|
|
2948
2959
|
color_reset = ''
|
|
2960
|
+
green_str = ''
|
|
2949
2961
|
else:
|
|
2950
2962
|
color_line = rgb_to_ansi_color_string(*COLOR_PALETTE.get('white', __DEFAULT_COLOR_PALETTE['white']))
|
|
2951
2963
|
color_reset = '\033[0m'
|
|
2964
|
+
green_str = rgb_to_ansi_color_string(*COLOR_PALETTE.get('green', __DEFAULT_COLOR_PALETTE['green']))
|
|
2952
2965
|
output.append(color_line+'─'*(line_length)+color_reset)
|
|
2953
|
-
hostnameWrapper = textwrap.TextWrapper(width=line_length - 1, tabsize=4, replace_whitespace=False, drop_whitespace=False, break_on_hyphens=False,initial_indent='
|
|
2966
|
+
hostnameWrapper = textwrap.TextWrapper(width=line_length - 1, tabsize=4, replace_whitespace=False, drop_whitespace=False, break_on_hyphens=False,initial_indent=' ', subsequent_indent='- ')
|
|
2954
2967
|
hostnameWrapper.wordsep_simple_re = re.compile(r'([,]+)')
|
|
2955
2968
|
for merging_hostnames in merge_groups:
|
|
2956
2969
|
mergeOutput(merging_hostnames, outputs_by_hostname, output, diff_display_threshold,line_length)
|
|
2957
2970
|
output.append(color_line+'─'*(line_length)+color_reset)
|
|
2958
2971
|
for hostname in remaining_hostnames:
|
|
2959
2972
|
hostnameLines = hostnameWrapper.wrap(','.join(compact_hostnames([hostname])))
|
|
2960
|
-
|
|
2961
|
-
output.extend(
|
|
2973
|
+
hostnameLines[0] = f"{green_str}■{color_reset}{hostnameLines[0]}"
|
|
2974
|
+
output.extend(hostnameLines)
|
|
2975
|
+
output.extend(outputs_by_hostname[hostname])
|
|
2962
2976
|
output.append(color_line+'─'*(line_length)+color_reset)
|
|
2963
2977
|
if output:
|
|
2964
2978
|
output.pop()
|
|
@@ -3148,12 +3162,12 @@ def generate_output(hosts, usejson = False, greppable = False,quiet = False,enco
|
|
|
3148
3162
|
outputs = mergeOutputs(outputs_by_hostname, merge_groups,remaining_hostnames, diff_display_threshold,line_length)
|
|
3149
3163
|
if keyPressesIn[-1]:
|
|
3150
3164
|
CMDsOut = [''.join(cmd).encode(encoding=encoding,errors='backslashreplace').decode(encoding=encoding,errors='backslashreplace').replace('\\n', '↵') for cmd in keyPressesIn if cmd]
|
|
3151
|
-
outputs.append(color_reset_str + "
|
|
3165
|
+
outputs.append(color_reset_str + "░ User Inputs:".ljust(line_length,'─'))
|
|
3152
3166
|
cmdOut = []
|
|
3153
3167
|
for line in CMDsOut:
|
|
3154
3168
|
cmdOut.extend(textwrap.wrap(line, width=line_length-1, tabsize=4, replace_whitespace=False, drop_whitespace=False,
|
|
3155
3169
|
initial_indent=' ', subsequent_indent='-'))
|
|
3156
|
-
outputs.extend(
|
|
3170
|
+
outputs.extend(cmdOut)
|
|
3157
3171
|
keyPressesIn[-1].clear()
|
|
3158
3172
|
if not outputs:
|
|
3159
3173
|
if quiet:
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
multiSSH3.py,sha256=Of3ONtNehRGAXWF3E3m8ao7OwmbgEu2YGv524CX0ytw,185227
|
|
2
|
+
multissh3-5.99.dist-info/METADATA,sha256=CLc8mLA6ufLHHF3Xip041K1nvdXcZwcwmsDsARshSoo,18093
|
|
3
|
+
multissh3-5.99.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
+
multissh3-5.99.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
|
|
5
|
+
multissh3-5.99.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
|
|
6
|
+
multissh3-5.99.dist-info/RECORD,,
|
multissh3-5.98.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
multiSSH3.py,sha256=oIb2TT_bbUmMRKA-7GT75w7xdW5QpsibmUb-nHrjUtM,184779
|
|
2
|
-
multissh3-5.98.dist-info/METADATA,sha256=Oqw0T08ZrfV_eIBGvKqgK7sR5clxE1uOZamYOgVX4ws,18093
|
|
3
|
-
multissh3-5.98.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
4
|
-
multissh3-5.98.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
|
|
5
|
-
multissh3-5.98.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
|
|
6
|
-
multissh3-5.98.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|