Skip to content

Commit 4ebd624

Browse files
clipassgen v0.7.3 Fix errors. Code refactoring.
1 parent df1c1da commit 4ebd624

File tree

5 files changed

+28
-23
lines changed

5 files changed

+28
-23
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# clipassgen <sup>v0.7.2</sup>
1+
# clipassgen <sup>v0.7.3</sup>
22

33
***
44

@@ -39,9 +39,10 @@ Author and developer: ___A.A. Suvorov___
3939

4040
## What's new:
4141

42+
__clipassgen__ v0.7.3
43+
4244
- Fix errors.
4345
- Code refactoring.
44-
- Performance improvement.
4546

4647
***
4748

clipassgen/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010
Console Smart Passwords Generator. Cross-platform console utility for
1111
generating cryptographically strong, recoverable, smart passwords.
1212
"""
13-
__version__ = '0.7.2'
13+
__version__ = '0.7.3'

clipassgen/app_manager.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,12 @@ def _get_login():
4646
return login
4747

4848
@staticmethod
49-
def _get_secret():
49+
def _get_secret(security_flag=True):
5050
while True:
51-
secret = getpass.getpass("Enter secret phrase (hidden): ")
51+
if security_flag:
52+
secret = getpass.getpass("Enter secret phrase (hidden): ")
53+
else:
54+
secret = input('Enter secret phrase (hidden): ')
5255
if not secret:
5356
print('No secret phrase entered!')
5457
continue

clipassgen/smart_printer.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,17 @@
44
# Copyright © 2024, A.A. Suvorov
55
# All rights reserved.
66
# --------------------------------------------------------
7-
# https://github.com/smartlegionlab//
7+
# https://github.com/smartlegionlab/
88
# --------------------------------------------------------
99
import shutil
1010

1111

1212
class CenteredTextDecorator:
1313

1414
@classmethod
15-
def decorate(cls, text='', char=''):
15+
def decorate(cls, text='', symbol=''):
1616
columns = cls._get_term_width()
17-
symbol = ' ' if not char else char
17+
symbol = ' ' if not symbol else symbol
1818
msg = (f' {text} ' if text else '').center(columns, symbol[0])
1919
return msg
2020

@@ -26,30 +26,30 @@ def _get_term_width(cls):
2626
class FramedTextDecorator:
2727

2828
@classmethod
29-
def decorate(cls, text='', top_char='-', bottom_char='-'):
29+
def decorate(cls, text='', top_symbol='-', bottom_symbol='-'):
3030
text_len = len(text)
31-
top_text = top_char * text_len
32-
bottom_text = bottom_char * text_len
31+
top_text = top_symbol * text_len
32+
bottom_text = bottom_symbol * text_len
3333
return f'{top_text}\n{text}\n{bottom_text}'
3434

3535

3636
class SmartPrinter:
3737

3838
@classmethod
39-
def print_center(cls, text='', char='-'):
40-
print(CenteredTextDecorator.decorate(text, char))
39+
def print_center(cls, text='', symbol='-'):
40+
print(CenteredTextDecorator.decorate(text, symbol))
4141

4242
@classmethod
43-
def print_framed(cls, text='', char='-'):
44-
print(FramedTextDecorator.decorate(text, char))
43+
def print_framed(cls, text='', symbol='-'):
44+
print(FramedTextDecorator.decorate(text, symbol))
4545

4646
@classmethod
47-
def show_head(cls, text='', top_char='*', main_char='-'):
48-
print(CenteredTextDecorator.decorate(char=top_char))
49-
print(CenteredTextDecorator.decorate(text=text, char=main_char))
47+
def show_head(cls, text='', top_symbol='*', main_symbol='-'):
48+
print(CenteredTextDecorator.decorate(symbol=top_symbol))
49+
print(CenteredTextDecorator.decorate(text=text, symbol=main_symbol))
5050

5151
@classmethod
52-
def show_footer(cls, url='', copyright_='', top_char='-', main_char='*'):
53-
print(CenteredTextDecorator.decorate(text=url, char=top_char))
54-
print(CenteredTextDecorator.decorate(text=copyright_, char=top_char))
55-
print(CenteredTextDecorator.decorate(char=main_char))
52+
def show_footer(cls, url='', copyright_='', top_symbol='-', main_symbol='*'):
53+
print(CenteredTextDecorator.decorate(text=url, symbol=top_symbol))
54+
print(CenteredTextDecorator.decorate(text=copyright_, symbol=top_symbol))
55+
print(CenteredTextDecorator.decorate(symbol=main_symbol))

setup.cfg

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = clipassgen
3-
version = 0.7.2
3+
version = 0.7.3
44
author = A.A. Suvorov
55
author_email = [email protected]
66
description = Console Smart Passwords Generator. Cross-platform console utility for generating cryptographically strong, recoverable, smart passwords.
@@ -26,6 +26,7 @@ classifiers =
2626
Topic :: Utilities
2727
keywords =
2828
clipassgen
29+
clipassman
2930
password generator
3031
passgen
3132
smart password generator

0 commit comments

Comments
 (0)