fix README
This commit is contained in:
@@ -6,6 +6,8 @@
|
|||||||
- ℹ️ - Information
|
- ℹ️ - Information
|
||||||
- ♻️ - Edited
|
- ♻️ - Edited
|
||||||
|
|
||||||
|
## 0.2.4 - [02/05/2022]
|
||||||
|
|
||||||
## 0.2.3 - [02/05/2022]
|
## 0.2.3 - [02/05/2022]
|
||||||
- ♻️ - Password outdated date change to 3 month
|
- ♻️ - Password outdated date change to 3 month
|
||||||
- ➕ - Added `pmng` logo
|
- ➕ - Added `pmng` logo
|
||||||
|
@@ -1,10 +1,10 @@
|
|||||||
# 🔑 The very simple password manager for humans
|
# 🔑 The very simple password manager for humans
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
# 📷 Screenshots
|
# 📷 Screenshots
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
# 💾 Download
|
# 💾 Download
|
||||||
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
name: pmng
|
name: pmng
|
||||||
version: 0.2.3
|
version: 0.2.4
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Alexander Popov <iiiypuk@iiiypuk.me>
|
- Alexander Popov <iiiypuk@iiiypuk.me>
|
||||||
|
32
src/pmng.cr
32
src/pmng.cr
@@ -22,9 +22,9 @@ class Password
|
|||||||
property update : Int32
|
property update : Int32
|
||||||
end
|
end
|
||||||
|
|
||||||
VERSION = "0.2.3"
|
VERSION = "0.2.4b"
|
||||||
|
PASSWORD_FILE_PATH = "#{ENV["HOME"]}/.pwd.yml"
|
||||||
ASCII_LOGO = "
|
ASCII_LOGO = "
|
||||||
██████╗ ███╗ ███╗███╗ ██╗ ██████╗
|
██████╗ ███╗ ███╗███╗ ██╗ ██████╗
|
||||||
██╔══██╗████╗ ████║████╗ ██║██╔════╝
|
██╔══██╗████╗ ████║████╗ ██║██╔════╝
|
||||||
██████╔╝██╔████╔██║██╔██╗ ██║██║ ███╗
|
██████╔╝██╔████╔██║██╔██╗ ██║██║ ███╗
|
||||||
@@ -70,8 +70,6 @@ rescue ex
|
|||||||
puts ex.message, ""
|
puts ex.message, ""
|
||||||
end
|
end
|
||||||
|
|
||||||
PASSWORD_FILE_PATH = "#{ENV["HOME"]}/.pwd.yml"
|
|
||||||
|
|
||||||
# check password file exists
|
# check password file exists
|
||||||
if File.exists?(PASSWORD_FILE_PATH)
|
if File.exists?(PASSWORD_FILE_PATH)
|
||||||
yaml = File.open(PASSWORD_FILE_PATH) do |file|
|
yaml = File.open(PASSWORD_FILE_PATH) do |file|
|
||||||
@@ -83,14 +81,6 @@ else
|
|||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
# fill passwords array
|
|
||||||
passwords_array = [] of Password
|
|
||||||
count = 0
|
|
||||||
while count < yaml.size
|
|
||||||
passwords_array << Password.from_yaml(yaml[count].to_yaml)
|
|
||||||
count += 1
|
|
||||||
end
|
|
||||||
|
|
||||||
# check file ppermissions
|
# check file ppermissions
|
||||||
password_file_permissions = File.info(PASSWORD_FILE_PATH).permissions.to_s
|
password_file_permissions = File.info(PASSWORD_FILE_PATH).permissions.to_s
|
||||||
|
|
||||||
@@ -100,6 +90,14 @@ if /\d{3}/.match(password_file_permissions).try &.[0] != "600"
|
|||||||
exit(1)
|
exit(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# fill passwords array
|
||||||
|
passwords_array = [] of Password
|
||||||
|
count = 0
|
||||||
|
while count < yaml.size
|
||||||
|
passwords_array << Password.from_yaml(yaml[count].to_yaml)
|
||||||
|
count += 1
|
||||||
|
end
|
||||||
|
|
||||||
# pmng title
|
# pmng title
|
||||||
system "clear"
|
system "clear"
|
||||||
puts ASCII_LOGO.colorize(:yellow)
|
puts ASCII_LOGO.colorize(:yellow)
|
||||||
@@ -121,10 +119,7 @@ while loop
|
|||||||
|
|
||||||
if password_string.to_s == ":q"
|
if password_string.to_s == ":q"
|
||||||
# if ':q' to close program
|
# if ':q' to close program
|
||||||
system "clear"
|
loop = false
|
||||||
puts "Bye! 👋"
|
|
||||||
|
|
||||||
exit(0)
|
|
||||||
elsif password_string.to_s.size == 0
|
elsif password_string.to_s.size == 0
|
||||||
# if puts empty, retry prompt
|
# if puts empty, retry prompt
|
||||||
puts
|
puts
|
||||||
@@ -206,3 +201,6 @@ while loop
|
|||||||
puts "-----".colorize(:dark_gray).mode(:bold)
|
puts "-----".colorize(:dark_gray).mode(:bold)
|
||||||
puts
|
puts
|
||||||
end
|
end
|
||||||
|
|
||||||
|
system "clear"
|
||||||
|
puts "Bye! 👋"
|
||||||
|
Reference in New Issue
Block a user