Compare commits
14 Commits
Author | SHA1 | Date |
---|---|---|
Alexander Popov | a0775932ec | |
Alexander Popov | 45897a4f81 | |
Alexander Popov | 8e01c4adb0 | |
Alexander Popov | 1fda6f7b14 | |
Alexander Popov | abdb758aa2 | |
Alexander Popov | 2ce1701039 | |
Alexander Popov | 068c3a48f4 | |
Alexander Popov | dd67a7095c | |
Alexander Popov | 3b6c8af8cc | |
Alexander Popov | b820b7bb4d | |
Alexander Popov | 7d200ec423 | |
Alexander Popov | 0ce3e506bb | |
Alexander Popov | 0a5f51ff8f | |
Alexander Popov | 51a09ffe61 |
|
@ -13,3 +13,6 @@ indent_size = 2
|
||||||
[{*.ecr,*.json}]
|
[{*.ecr,*.json}]
|
||||||
indent_style = tab
|
indent_style = tab
|
||||||
indent_size = 4
|
indent_size = 4
|
||||||
|
|
||||||
|
[README.md]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
/docs/
|
/docs/
|
||||||
|
/dist/
|
||||||
/lib/
|
/lib/
|
||||||
/bin/
|
/bin/
|
||||||
/.shards/
|
/.shards/
|
||||||
|
|
|
@ -6,6 +6,14 @@
|
||||||
- ℹ️ - Information
|
- ℹ️ - Information
|
||||||
- ♻️ - Edited
|
- ♻️ - Edited
|
||||||
|
|
||||||
|
## 0.2.7b - [14/04/2023]
|
||||||
|
- ➕ - Added environment variable for custom input timeout
|
||||||
|
- ✔️ - User input is converted to lowercase
|
||||||
|
|
||||||
|
## 0.2.6 - [03/08/2022]
|
||||||
|
- ➕ - Added environment variable for custom password file path
|
||||||
|
- ➕ - Added version in to ASCII logo
|
||||||
|
|
||||||
## 0.2.5 - [31/07/2022]
|
## 0.2.5 - [31/07/2022]
|
||||||
- ➕ - Added timeout user input
|
- ➕ - Added timeout user input
|
||||||
- ♻️ - Source file separated
|
- ♻️ - Source file separated
|
||||||
|
|
10
README.md
10
README.md
|
@ -1,5 +1,6 @@
|
||||||
# 🔑 The very simple password manager for humans
|
# 🔑 The very simple password manager for humans
|
||||||
|
|
||||||
|
![Crystal](https://img.shields.io/badge/Crystal-000000?style=for-the-badge&color=000000&logo=crystal)
|
||||||
![License](https://img.shields.io/badge/license-public_domain-brightgreen?style=for-the-badge&color=ffcc68)
|
![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)
|
![NO_COLOR](https://img.shields.io/badge/no__color-support-brightgreen?style=for-the-badge&color=d44e52)
|
||||||
![Emoji](https://img.shields.io/badge/emoji-like-brightgreen?style=for-the-badge&color=ec8a4b)
|
![Emoji](https://img.shields.io/badge/emoji-like-brightgreen?style=for-the-badge&color=ec8a4b)
|
||||||
|
@ -7,13 +8,8 @@
|
||||||
|
|
||||||
## 📷 Screenshots
|
## 📷 Screenshots
|
||||||
|
|
||||||
![pmng](./.docs/logo.png)
|
See [SCREENSHOTS.md](SCREENSHOTS.md).
|
||||||
|
|
||||||
![Passwords](./.docs/passwords.png)
|
|
||||||
|
|
||||||
## 💾 Download
|
## 💾 Download
|
||||||
|
|
||||||
- [Linux x86_64](https://me.a2s.su/.../)
|
[![Linux x86_64](https://img.shields.io/badge/linux-x86--64-brightgreen?style=for-the-badge&color=55a894)](https://data.iiiypuk.me/pmng/alpha/pmng-0.2.6-linux-x86_64.tar.xz)
|
||||||
- [Linux x86](https://me.a2s.su/.../)
|
|
||||||
- [Linux x86_64 musl](https://me.a2s.su/.../)
|
|
||||||
- [OpenBSD x86_64](https://me.a2s.su/.../)
|
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
## 📷 Screenshots
|
||||||
|
|
||||||
|
![pmng](./.docs/logo.png)
|
||||||
|
|
||||||
|
![Passwords](./.docs/passwords.png)
|
|
@ -0,0 +1,25 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Preparing
|
||||||
|
if [ -d "./dist/" ];
|
||||||
|
then
|
||||||
|
rm dist/* 2> /dev/null
|
||||||
|
else
|
||||||
|
mkdir dist/
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Detect Musl C library
|
||||||
|
# thx @Unmanned Player https://stackoverflow.com/a/60471114
|
||||||
|
|
||||||
|
libc=$(ldd /bin/ls | grep 'musl' | head -1 | cut -d ' ' -f1)
|
||||||
|
if [ -z $libc ];
|
||||||
|
then
|
||||||
|
# build libc
|
||||||
|
OUTPUT=pmng-$(shards version)-linux-x86_64
|
||||||
|
crystal build ./src/pmng.cr --release --progress -o ./dist/$OUTPUT
|
||||||
|
tar -cJf ./dist/$OUTPUT.tar.xz ./dist/$OUTPUT
|
||||||
|
else
|
||||||
|
# Build musl
|
||||||
|
crystal build ./src/pmng.cr --release --progress -o ./dist/pmng-$(shards version)-linux-musl-x86_64
|
||||||
|
fi
|
||||||
|
|
|
@ -2,5 +2,5 @@ version: 2.0
|
||||||
shards:
|
shards:
|
||||||
ameba:
|
ameba:
|
||||||
git: https://github.com/crystal-ameba/ameba.git
|
git: https://github.com/crystal-ameba/ameba.git
|
||||||
version: 1.0.0
|
version: 1.4.3
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
name: pmng
|
name: pmng
|
||||||
version: 0.2.5
|
version: 0.2.7
|
||||||
|
|
||||||
authors:
|
authors:
|
||||||
- Alexander Popov <iiiypuk@iiiypuk.me>
|
- Alexander Popov <iiiypuk@iiiypuk.me>
|
||||||
|
@ -11,8 +11,8 @@ targets:
|
||||||
development_dependencies:
|
development_dependencies:
|
||||||
ameba:
|
ameba:
|
||||||
github: crystal-ameba/ameba
|
github: crystal-ameba/ameba
|
||||||
version: ~> 1.0.0
|
version: ~> 1.4.0
|
||||||
|
|
||||||
crystal: 1.5.0
|
crystal: 1.7.0
|
||||||
|
|
||||||
license: MIT
|
license: MIT
|
||||||
|
|
|
@ -94,7 +94,7 @@ module Pmng
|
||||||
passwords_finded_array = 0
|
passwords_finded_array = 0
|
||||||
|
|
||||||
passwords_array.each do |item|
|
passwords_array.each do |item|
|
||||||
if item.url.includes?(password_string.to_s)
|
if item.url.includes?(password_string.to_s.downcase)
|
||||||
Functions.show_item(item)
|
Functions.show_item(item)
|
||||||
|
|
||||||
puts "-----".colorize(:dark_gray).mode(:bold)
|
puts "-----".colorize(:dark_gray).mode(:bold)
|
||||||
|
|
|
@ -1,3 +1,28 @@
|
||||||
|
def password_file
|
||||||
|
# Return password file path
|
||||||
|
|
||||||
|
begin
|
||||||
|
file_path = "#{ENV["PMNG_PWD_FILE"]}"
|
||||||
|
file_path.to_s
|
||||||
|
rescue KeyError
|
||||||
|
file_path = "#{ENV["HOME"]}/.pwd.yml"
|
||||||
|
file_path.to_s
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
def input_timeout
|
||||||
|
# Return user input timeout
|
||||||
|
|
||||||
|
user_input_timeout = 60
|
||||||
|
|
||||||
|
begin
|
||||||
|
user_input_timeout = "#{ENV["PMNG_TIMEOUT"]}"
|
||||||
|
user_input_timeout.to_i
|
||||||
|
rescue KeyError
|
||||||
|
user_input_timeout.to_i # return default 60s
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
VERSION = {{ `shards version "#{__DIR__}"`.chomp.stringify }}
|
VERSION = {{ `shards version "#{__DIR__}"`.chomp.stringify }}
|
||||||
PASSWORD_FILE_PATH = "#{ENV["HOME"]}/.pwd.yml"
|
PASSWORD_FILE_PATH = password_file()
|
||||||
USER_INPUT_TIMEOUT = 60
|
USER_INPUT_TIMEOUT = input_timeout()
|
||||||
|
|
|
@ -4,5 +4,5 @@ ASCII_LOGO = "
|
||||||
██████╔╝██╔████╔██║██╔██╗ ██║██║ ███╗
|
██████╔╝██╔████╔██║██╔██╗ ██║██║ ███╗
|
||||||
██╔═══╝ ██║╚██╔╝██║██║╚██╗██║██║ ██║
|
██╔═══╝ ██║╚██╔╝██║██║╚██╗██║██║ ██║
|
||||||
██║ ██║ ╚═╝ ██║██║ ╚████║╚██████╔╝
|
██║ ██║ ╚═╝ ██║██║ ╚████║╚██████╔╝
|
||||||
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝
|
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ #{VERSION}
|
||||||
"
|
"
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
module Pmng::Functions
|
module Pmng::Functions
|
||||||
|
extend self
|
||||||
|
|
||||||
class Statistics
|
class Statistics
|
||||||
getter passwords : Array(Password)
|
getter passwords : Array(Password)
|
||||||
getter outdated : Int32
|
getter outdated : Int32
|
||||||
|
|
Loading…
Reference in New Issue