mirror of
https://github.com/rwinkhart/sshyp.git
synced 2026-08-28 04:46:34 -04:00
Updated entry reader with more consistent color styling
This commit is contained in:
@@ -65,14 +65,14 @@ def entry_reader(_decrypted_entry):
|
||||
for _num in range(len(_entry_lines)):
|
||||
try:
|
||||
if _num == 0 and _entry_lines[1] != '\n':
|
||||
print(f"\u001b[38;5;0;48;5;15mUsername:\u001b[0m\n{_entry_lines[1]}")
|
||||
print(f"\u001b[38;5;7;48;5;238musername:\u001b[0m\n{_entry_lines[1]}")
|
||||
elif _num == 1 and _entry_lines[0] != '\n':
|
||||
print(f"\u001b[38;5;0;48;5;15mPassword:\u001b[0m\n{_entry_lines[0]}")
|
||||
print(f"\u001b[38;5;7;48;5;238mpassword:\u001b[0m\n{_entry_lines[0]}")
|
||||
elif _num == 2 and _entry_lines[2] != '\n':
|
||||
print(f"\u001b[38;5;0;48;5;15mURL:\u001b[0m\n{_entry_lines[_num]}")
|
||||
print(f"\u001b[38;5;7;48;5;238murl:\u001b[0m\n{_entry_lines[_num]}")
|
||||
elif _num >= 3 and _entry_lines[_num] != '\n' and _notes_flag != 1:
|
||||
_notes_flag = 1
|
||||
print('\u001b[38;5;0;48;5;15mNotes:\u001b[0m\n' + _entry_lines[_num].replace('\n', ''))
|
||||
print('\u001b[38;5;7;48;5;238mnotes:\u001b[0m\n' + _entry_lines[_num].replace('\n', ''))
|
||||
elif _num >= 3 and _notes_flag == 1:
|
||||
print(_entry_lines[_num].replace('\n', ''))
|
||||
if _notes_flag == 1:
|
||||
@@ -82,7 +82,7 @@ def entry_reader(_decrypted_entry):
|
||||
print()
|
||||
except IndexError:
|
||||
if _num == 0:
|
||||
print(f"\u001b[38;5;0;48;5;15mPassword:\u001b[0m\n{_entry_lines[0]}")
|
||||
print(f"\u001b[38;5;15;48;5;238mpassword:\u001b[0m\n{_entry_lines[0]}")
|
||||
|
||||
|
||||
def replace_line(file_name, line_num, text): # replaces text in a given line with different text
|
||||
|
||||
Reference in New Issue
Block a user