multiSSH3 5.45__py3-none-any.whl → 5.47__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-5.45.dist-info → multiSSH3-5.47.dist-info}/METADATA +1 -1
- multiSSH3-5.47.dist-info/RECORD +6 -0
- multiSSH3.py +22 -14
- multiSSH3-5.45.dist-info/RECORD +0 -6
- {multiSSH3-5.45.dist-info → multiSSH3-5.47.dist-info}/WHEEL +0 -0
- {multiSSH3-5.45.dist-info → multiSSH3-5.47.dist-info}/entry_points.txt +0 -0
- {multiSSH3-5.45.dist-info → multiSSH3-5.47.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
multiSSH3.py,sha256=fLoImfnt8GQDs9kLWsySLcFFcB7yXyprRMfntEz_-jk,135786
|
|
2
|
+
multiSSH3-5.47.dist-info/METADATA,sha256=b9DlbOVp-wi3Lu7nU5MuVcSk6CFZpAcdBDV02N_e328,18001
|
|
3
|
+
multiSSH3-5.47.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
4
|
+
multiSSH3-5.47.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
|
|
5
|
+
multiSSH3-5.47.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
|
|
6
|
+
multiSSH3-5.47.dist-info/RECORD,,
|
multiSSH3.py
CHANGED
|
@@ -46,8 +46,9 @@ except AttributeError:
|
|
|
46
46
|
# If neither is available, use a dummy decorator
|
|
47
47
|
def cache_decorator(func):
|
|
48
48
|
return func
|
|
49
|
-
version = '5.
|
|
49
|
+
version = '5.47'
|
|
50
50
|
VERSION = version
|
|
51
|
+
COMMIT_DATE = '2025-01-30'
|
|
51
52
|
|
|
52
53
|
CONFIG_FILE_CHAIN = ['./multiSSH3.config.json',
|
|
53
54
|
'~/multiSSH3.config.json',
|
|
@@ -1718,13 +1719,16 @@ def _curses_add_string_to_window(window, line = '', y = 0, x = 0, number_of_char
|
|
|
1718
1719
|
charsWritten = 0
|
|
1719
1720
|
boxAttr = __parse_ansi_escape_sequence_to_curses_attr(box_ansi_color)
|
|
1720
1721
|
# first add the lead_str
|
|
1721
|
-
|
|
1722
|
-
|
|
1722
|
+
if len(lead_str) > 0:
|
|
1723
|
+
window.addnstr(y, x, lead_str, numChar, boxAttr)
|
|
1724
|
+
charsWritten = min(len(lead_str), numChar)
|
|
1723
1725
|
# process centering
|
|
1724
1726
|
if centered:
|
|
1725
1727
|
fill_length = numChar - len(lead_str) - len(trail_str) - sum([len(segment) for segment in segments if not segment.startswith("\x1b[")])
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
+
leading_fill_length = fill_length // 2
|
|
1729
|
+
if leading_fill_length > 0:
|
|
1730
|
+
window.addnstr(y, x + charsWritten, fill_char * (leading_fill_length // len(fill_char) + 1), leading_fill_length, boxAttr)
|
|
1731
|
+
charsWritten += leading_fill_length
|
|
1728
1732
|
# add the segments
|
|
1729
1733
|
for segment in segments:
|
|
1730
1734
|
if not segment:
|
|
@@ -1734,17 +1738,17 @@ def _curses_add_string_to_window(window, line = '', y = 0, x = 0, number_of_char
|
|
|
1734
1738
|
newAttr = __parse_ansi_escape_sequence_to_curses_attr(segment,color_pair_list)
|
|
1735
1739
|
else:
|
|
1736
1740
|
# Add text with current color
|
|
1737
|
-
if charsWritten < numChar:
|
|
1741
|
+
if charsWritten < numChar and len(segment) > 0:
|
|
1738
1742
|
window.addnstr(y, x + charsWritten, segment, numChar - charsWritten, color_pair_list[2])
|
|
1739
1743
|
charsWritten += min(len(segment), numChar - charsWritten)
|
|
1740
1744
|
# if we have finished printing segments but we still have space, we will fill it with fill_char
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
else:
|
|
1745
|
+
trail_fill_length = numChar - charsWritten - len(trail_str)
|
|
1746
|
+
if trail_fill_length > 0:
|
|
1747
|
+
window.addnstr(y, x + charsWritten,fill_char * (trail_fill_length // len(fill_char) + 1), trail_fill_length, boxAttr)
|
|
1748
|
+
charsWritten += trail_fill_length
|
|
1749
|
+
if len(trail_str) > 0 and charsWritten < numChar:
|
|
1747
1750
|
window.addnstr(y, x + charsWritten, trail_str, numChar - charsWritten, boxAttr)
|
|
1751
|
+
charsWritten += min(len(trail_str), numChar - charsWritten)
|
|
1748
1752
|
|
|
1749
1753
|
def _get_hosts_to_display (hosts, max_num_hosts, hosts_to_display = None):
|
|
1750
1754
|
'''
|
|
@@ -1875,7 +1879,11 @@ def __generate_display(stdscr, hosts, lineToDisplay = -1,curserPosition = 0, min
|
|
|
1875
1879
|
# with open('keylog.txt','a') as f:
|
|
1876
1880
|
# f.write(str(key)+'\n')
|
|
1877
1881
|
if key == 410: # 410 is the key code for resize
|
|
1878
|
-
return (lineToDisplay,curserPosition , min_char_len, min_line_len, single_window, 'Terminal resize requested')
|
|
1882
|
+
return (lineToDisplay,curserPosition , min_char_len, min_line_len, single_window, 'Terminal resize requested')
|
|
1883
|
+
# if the user pressed ctrl + d and the last line is empty, we will exit by adding 'exit\n' to the last line
|
|
1884
|
+
elif key == 4 and not __keyPressesIn[-1]:
|
|
1885
|
+
__keyPressesIn[-1].extend('exit\n')
|
|
1886
|
+
__keyPressesIn.append([])
|
|
1879
1887
|
elif key == 95 and not __keyPressesIn[-1]: # 95 is the key code for _
|
|
1880
1888
|
# if last line is empty, we will reconfigure the wh to be smaller
|
|
1881
1889
|
if min_line_len != 1:
|
|
@@ -2767,7 +2775,7 @@ def main():
|
|
|
2767
2775
|
parser.add_argument('--store_config_file',type = str,nargs='?',help=f'Store the default config file from command line argument and current config. Same as --store_config_file --config_file=<path>',const='multiSSH3.config.json')
|
|
2768
2776
|
parser.add_argument('--debug', action='store_true', help='Print debug information')
|
|
2769
2777
|
parser.add_argument('-ci','--copy_id', action='store_true', help='Copy the ssh id to the hosts')
|
|
2770
|
-
parser.add_argument("-V","--version", action='version', version=f'%(prog)s {version} with [ {", ".join(_binPaths.keys())} ] by {AUTHOR} ({AUTHOR_EMAIL})')
|
|
2778
|
+
parser.add_argument("-V","--version", action='version', version=f'%(prog)s {version} @ {COMMIT_DATE} with [ {", ".join(_binPaths.keys())} ] by {AUTHOR} ({AUTHOR_EMAIL})')
|
|
2771
2779
|
|
|
2772
2780
|
# parser.add_argument('-u', '--user', metavar='user', type=str, nargs=1,
|
|
2773
2781
|
# help='the user to use to connect to the hosts')
|
multiSSH3-5.45.dist-info/RECORD
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
multiSSH3.py,sha256=2rWmKOIbJ4_iRZnRdghYiCpndZbnpXcqPNsL6HCL8xY,135383
|
|
2
|
-
multiSSH3-5.45.dist-info/METADATA,sha256=MwSMoniNIAsjCvkxg6o3tkePVfYMYZJKxVDvEytPAVs,18001
|
|
3
|
-
multiSSH3-5.45.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
4
|
-
multiSSH3-5.45.dist-info/entry_points.txt,sha256=xi2rWWNfmHx6gS8Mmx0rZL2KZz6XWBYP3DWBpWAnnZ0,143
|
|
5
|
-
multiSSH3-5.45.dist-info/top_level.txt,sha256=tUwttxlnpLkZorSsroIprNo41lYSxjd2ASuL8-EJIJw,10
|
|
6
|
-
multiSSH3-5.45.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|