9 Commits
0.2.5 ... 0.2.6

10 changed files with 55 additions and 10 deletions

View File

@@ -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
.gitignore vendored
View File

@@ -1,4 +1,5 @@
/docs/ /docs/
/dist/
/lib/ /lib/
/bin/ /bin/
/.shards/ /.shards/

View File

@@ -6,6 +6,10 @@
- - Information - - Information
- ♻️ - Edited - ♻️ - Edited
## 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

View File

@@ -7,13 +7,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/.../)

5
SCREENSHOTS.md Normal file
View File

@@ -0,0 +1,5 @@
## 📷 Screenshots
![pmng](./.docs/logo.png)
![Passwords](./.docs/passwords.png)

25
build_release.sh Executable file
View File

@@ -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

View File

@@ -1,5 +1,5 @@
name: pmng name: pmng
version: 0.2.5 version: 0.2.6
authors: authors:
- Alexander Popov <iiiypuk@iiiypuk.me> - Alexander Popov <iiiypuk@iiiypuk.me>

View File

@@ -1,3 +1,13 @@
def password_file
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
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 = 60

View File

@@ -4,5 +4,5 @@ ASCII_LOGO = "
██████╔╝██╔████╔██║██╔██╗ ██║██║ ███╗ ██████╔╝██╔████╔██║██╔██╗ ██║██║ ███╗
██╔═══╝ ██║╚██╔╝██║██║╚██╗██║██║ ██║ ██╔═══╝ ██║╚██╔╝██║██║╚██╗██║██║ ██║
██║ ██║ ╚═╝ ██║██║ ╚████║╚██████╔╝ ██║ ██║ ╚═╝ ██║██║ ╚████║╚██████╔╝
╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═══╝ ╚═════╝ #{VERSION}
" "

View File

@@ -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