4 Commits
0.2.3 ... 0.2.4

Author SHA1 Message Date
aea5284279 NO_COLOR info 2022-07-26 19:16:42 +03:00
a1bc755181 file password file name 2022-06-26 23:54:21 +03:00
9fae7124be fix "finded records" for all query 2022-05-21 00:07:33 +03:00
0e6ed176b3 fix README 2022-05-02 11:34:18 +03:00
5 changed files with 46 additions and 33 deletions

View File

@@ -6,6 +6,12 @@
- - Information
- ♻️ - Edited
## 0.2.4 - [26/07/2022]
- - Added hint for fix file permissions error.
- - Crystal version raise to 1.5.0 for NO_COLOR support
- ✔️ - Fixed output finding records for all queryes
- ✔️ - Fixed check password file name info
## 0.2.3 - [02/05/2022]
- ♻️ - Password outdated date change to 3 month
- - Added `pmng` logo

View File

@@ -1,12 +1,16 @@
# 🔑 The very simple password manager for humans
# The very simple password manager for humans
![pmng](./docs/logo.png)
![pmng](./.docs/logo.png)
# 📷 Screenshots
![License](https://img.shields.io/badge/license-public_domain-brightgreen?style=for-the-badge&color=ffcc68)
![NO_COLOR](https://img.shields.io/badge/no__color-support-brightgreen?style=for-the-badge&color=d44e52)
![Emojy](https://img.shields.io/badge/emojy-like-brightgreen?style=for-the-badge&color=ec8a4b)
![Passwords](./docs/passwords.png)
# Screenshots
# 💾 Download
![Passwords](./.docs/passwords.png)
# Download
**Coming soon**

View File

@@ -2,5 +2,5 @@ version: 2.0
shards:
ameba:
git: https://github.com/crystal-ameba/ameba.git
version: 0.14.3
version: 1.0.0

View File

@@ -1,5 +1,5 @@
name: pmng
version: 0.2.3
version: 0.2.4
authors:
- Alexander Popov <iiiypuk@iiiypuk.me>
@@ -11,8 +11,8 @@ targets:
development_dependencies:
ameba:
github: crystal-ameba/ameba
version: ~> 0.14.0
version: ~> 1.0.0
crystal: 1.3.2
crystal: 1.5.0
license: MIT

View File

@@ -22,8 +22,8 @@ class Password
property update : Int32
end
VERSION = "0.2.3"
VERSION = "0.2.4"
PASSWORD_FILE_PATH = "#{ENV["HOME"]}/.pwd.yml"
ASCII_LOGO = "
██████╗ ███╗ ███╗███╗ ██╗ ██████╗
██╔══██╗████╗ ████║████╗ ██║██╔════╝
@@ -70,15 +70,26 @@ rescue ex
puts ex.message, ""
end
PASSWORD_FILE_PATH = "#{ENV["HOME"]}/.pwd.yml"
# check password file exists
if File.exists?(PASSWORD_FILE_PATH)
yaml = File.open(PASSWORD_FILE_PATH) do |file|
YAML.parse(file)
end
else
puts "No password.yml file exists."
print "~/.pwd.yml".colorize(:red).mode(:bold)
puts ": No such file"
exit(1)
end
# check file ppermissions
password_file_permissions = File.info(PASSWORD_FILE_PATH).permissions.to_s
if /\d{3}/.match(password_file_permissions).try &.[0] != "600"
puts "Password file permissions is not RW for you.".colorize(:red)
print "Execute: ".colorize(:yellow)
print "(chmod 600 ~/.pwd.yml) ".colorize(:green).mode(:bold)
puts "for fix.".colorize(:yellow)
exit(1)
end
@@ -91,15 +102,6 @@ while count < yaml.size
count += 1
end
# check file ppermissions
password_file_permissions = File.info(PASSWORD_FILE_PATH).permissions.to_s
if /\d{3}/.match(password_file_permissions).try &.[0] != "600"
puts "Password file permissions is not RW for you.".colorize(:red)
exit(1)
end
# pmng title
system "clear"
puts ASCII_LOGO.colorize(:yellow)
@@ -121,10 +123,7 @@ while loop
if password_string.to_s == ":q"
# if ':q' to close program
system "clear"
puts "Bye! 👋"
exit(0)
loop = false
elsif password_string.to_s.size == 0
# if puts empty, retry prompt
puts
@@ -197,12 +196,16 @@ while loop
passwords_finded_array += 1
end
end
end
puts
print "Finded ".colorize(:yellow).mode(:bold)
print passwords_finded_array.colorize(:red).mode(:bold)
puts " records".colorize(:yellow).mode(:bold)
puts "-----".colorize(:dark_gray).mode(:bold)
end
puts
end
system "clear"
puts "Bye! 👋"