New major release, ironically enough, no major changes done yet
Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja> git-svn-id: file:///srv/svn/repo/kanako/trunk@18 62e5d677-aa6e-8c4a-b8cb-b9416171cb8e
This commit is contained in:
parent
b9bd346535
commit
8fcbaa3e98
10
Makefile
10
Makefile
@ -1,15 +1,15 @@
|
|||||||
include config.mk
|
PREFIX=/usr/local
|
||||||
|
|
||||||
install: install-bin install-examples install-man
|
install: install-bin install-examples install-man
|
||||||
uninstall: uninstall-bin uninstall-examples uninstall-man
|
uninstall: uninstall-bin uninstall-examples uninstall-man
|
||||||
|
|
||||||
install-bin:
|
install-bin:
|
||||||
install -Dm${EXEC_MODE} kanako ${PREFIX}/bin/kanako
|
install -Dm0755 kanako ${DESTDIR}${PREFIX}/bin/kanako
|
||||||
install-examples:
|
install-examples:
|
||||||
install -Dm${FILE_MODE} kanako.conf.example ${PREFIX}/share/examples/kanako/kanako.conf
|
install -Dm0600 kanako.conf.example ${DESTDIR}${PREFIX}/share/examples/kanako/kanako.conf
|
||||||
install-man:
|
install-man:
|
||||||
install -Dm${FILE_MODE} kanako.mdoc ${PREFIX}/share/man/man1/kanako.1
|
install -Dm0600 kanako.mdoc ${DESTDIR}${PREFIX}/share/man/man1/kanako.1
|
||||||
install -Dm${FILE_MODE} kanako.conf.mdoc ${PREFIX}/share/man/man5/kanako.conf.5
|
install -Dm0600 kanako.conf.mdoc ${DESTDIR}${PREFIX}/share/man/man5/kanako.conf.5
|
||||||
uninstall-bin:
|
uninstall-bin:
|
||||||
rm -f ${PREFIX}/bin/kanako
|
rm -f ${PREFIX}/bin/kanako
|
||||||
uninstall-examples:
|
uninstall-examples:
|
||||||
|
@ -9,7 +9,7 @@ the adaptable password manager. named after [Kanako Yasaka](https://en.touhouwik
|
|||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
* Any of the above, depending how you configured it
|
* Any of the above, depending how you configured it
|
||||||
* `ls(1)` or `tree(1)` for printing a list
|
* `tree(1)` for printing a list
|
||||||
* `mandoc(1)` for documentation
|
* `mandoc(1)` for documentation
|
||||||
|
|
||||||
## Add-ons
|
## Add-ons
|
||||||
@ -31,7 +31,6 @@ from oath-toolkit.
|
|||||||
* [Beerware License (Revision 42.1)](COPYING)
|
* [Beerware License (Revision 42.1)](COPYING)
|
||||||
|
|
||||||
## Related software
|
## Related software
|
||||||
* [akoizumi/ayu](https://git.shelltalk.net/akoizumi/ayu) [predecessor]
|
|
||||||
* [beastie/aps](https://codeberg.org/beastie/aps)
|
* [beastie/aps](https://codeberg.org/beastie/aps)
|
||||||
* [biox/pa](https://github.com/biox/pa)
|
* [biox/pa](https://github.com/biox/pa)
|
||||||
* [e-zk/page](https://github.com/e-zk/page)
|
* [e-zk/page](https://github.com/e-zk/page)
|
||||||
|
48
kanako
48
kanako
@ -1,5 +1,5 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# $TheSupernovaDuo: kanako,v 1.9 2023/5/18 21:9:33 yakumo_izuru Exp $
|
# $TheSupernovaDuo: kanako,v 2.0 2023/08/23 23:33:45 yakumo_izuru Exp $
|
||||||
|
|
||||||
readonly kanako_conf_dir="${kanako_conf_dir:-$HOME/.config/kanako}"
|
readonly kanako_conf_dir="${kanako_conf_dir:-$HOME/.config/kanako}"
|
||||||
readonly kanako_key_dir="${kanako_key_dir:-$HOME/.kanako}"
|
readonly kanako_key_dir="${kanako_key_dir:-$HOME/.kanako}"
|
||||||
@ -22,20 +22,20 @@ else
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fn_copy() {
|
copy() {
|
||||||
fn_view $1 | "${kanako_clip_cmd}"
|
view $1 | "${kanako_clip_cmd}"
|
||||||
}
|
}
|
||||||
fn_edit() {
|
edit() {
|
||||||
${kanako_encrypt_cmd} ${kanako_decrypt_args} ${1%%.enc}.enc > ${1%%.enc}
|
${kanako_encrypt_cmd} ${kanako_decrypt_args} ${1%%.enc}.enc > ${1%%.enc}
|
||||||
"${EDITOR}" "${1%%.enc}"
|
"${EDITOR}" "${1%%.enc}"
|
||||||
${kanako_encrypt_cmd} ${kanako_encrypt_args} ${1%%.enc} > ${1%%.enc}.enc
|
${kanako_encrypt_cmd} ${kanako_encrypt_args} ${1%%.enc} > ${1%%.enc}.enc
|
||||||
rm "${1%%.enc}"
|
rm "${1%%.enc}"
|
||||||
}
|
}
|
||||||
fn_list() {
|
list() {
|
||||||
"${kanako_list_cmd}" "${kanako_store_dir}/"
|
$(which tree) "${kanako_store_dir}/"
|
||||||
}
|
}
|
||||||
fn_new() {
|
new() {
|
||||||
test -d $1 && fn_usage && exit 1
|
test -d $1 && usage && exit 1
|
||||||
|
|
||||||
tmpfile="$(mktemp)"
|
tmpfile="$(mktemp)"
|
||||||
"${EDITOR}" "${tmpfile}"
|
"${EDITOR}" "${tmpfile}"
|
||||||
@ -44,34 +44,34 @@ fn_new() {
|
|||||||
${kanako_encrypt_cmd} ${kanako_encrypt_args} ${tmpfile} > ${1%%.enc}.enc
|
${kanako_encrypt_cmd} ${kanako_encrypt_args} ${tmpfile} > ${1%%.enc}.enc
|
||||||
rm ${tmpfile}
|
rm ${tmpfile}
|
||||||
}
|
}
|
||||||
fn_trash_directory() {
|
trash_directory() {
|
||||||
rm -rf "$1"
|
rm -r -I "$1"
|
||||||
}
|
}
|
||||||
fn_trash_file() {
|
trash_file() {
|
||||||
rm -f "${1}${2}".enc
|
rm -i "${1}${2}".enc
|
||||||
}
|
}
|
||||||
fn_usage() {
|
usage() {
|
||||||
printf "Usage: %s [-c|-e|-h|-l|-n|-R|-r|-v [file or directory]]\n" "$0"
|
printf "Usage: %s [-c|-e|-h|-l|-n|-R|-r|-v [file or directory]]\n" "$0"
|
||||||
printf "The arguments for all switches except for '-h' are relative to\n"
|
printf "The arguments for all switches except for '-h' are relative to\n"
|
||||||
printf "\t\$kanako_store_dir which is set to %s\n\n" "{$kanako_store_dir}"
|
printf "\t\$kanako_store_dir which is set to %s\n\n" "{$kanako_store_dir}"
|
||||||
}
|
}
|
||||||
fn_view() {
|
view() {
|
||||||
if [ -f "${1%%.enc}".enc ]; then
|
if [ -f "${1%%.enc}".enc ]; then
|
||||||
${kanako_encrypt_cmd} ${kanako_decrypt_args} "${1%%.enc}".enc
|
${kanako_encrypt_cmd} ${kanako_decrypt_args} "${1%%.enc}".enc
|
||||||
elif [ -d "${1:-.}" ]; then
|
elif [ -d "${1:-.}" ]; then
|
||||||
${kanako_list_cmd} "${1:-.}"
|
$(which tree) "${1:-.}"
|
||||||
else
|
else
|
||||||
fn_usage
|
usage
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
-c) fn_copy $2 ;;
|
-c) copy $2 ;;
|
||||||
-e) fn_edit $2 ;;
|
-e) edit $2 ;;
|
||||||
-l) fn_list ;;
|
-l) list ;;
|
||||||
-n) fn_new $2 ;;
|
-n) new $2 ;;
|
||||||
-R) fn_trash_directory $2 ;;
|
-R) trash_directory $2 ;;
|
||||||
-r) fn_trash_file $2 ;;
|
-r) trash_file $2 ;;
|
||||||
-v) fn_view $2 ;;
|
-v) view $2 ;;
|
||||||
*) fn_usage ;;
|
*) usage ;;
|
||||||
esac
|
esac
|
||||||
|
@ -2,7 +2,6 @@
|
|||||||
|
|
||||||
#kanako_clip_cmd="xclip -i"
|
#kanako_clip_cmd="xclip -i"
|
||||||
#kanako_clip_cmd="wl-copy --primary"
|
#kanako_clip_cmd="wl-copy --primary"
|
||||||
#kanako_list_cmd="tree"
|
|
||||||
#kanako_menu_cmd="dmenu"
|
#kanako_menu_cmd="dmenu"
|
||||||
|
|
||||||
## age
|
## age
|
||||||
@ -23,4 +22,4 @@
|
|||||||
## salty
|
## salty
|
||||||
#kanako_encrypt_cmd="salty"
|
#kanako_encrypt_cmd="salty"
|
||||||
#kanako_encrypt_args="-e -r $(cat ${kanako_key_dir}/pub.slt)"
|
#kanako_encrypt_args="-e -r $(cat ${kanako_key_dir}/pub.slt)"
|
||||||
#kanako_decrypt_args="-d -i ${kanako_key_dir}/priv.slt"
|
#kanako_decrypt_args="-d -i ${kanako_key_dir}/priv.slt"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
.Dd Aftermath 41, 3188
|
.Dd $Mdocdate$
|
||||||
.Dt KANAKO.CONF 5
|
.Dt KANAKO.CONF 5
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -19,9 +19,6 @@ passed to kanako_encrypt_cmd
|
|||||||
.It kanako_encrypt_cmd
|
.It kanako_encrypt_cmd
|
||||||
Encryption executable to
|
Encryption executable to
|
||||||
be used with the program
|
be used with the program
|
||||||
.It kanako_list_cmd
|
|
||||||
Listing executable to
|
|
||||||
be used with the -l switch
|
|
||||||
.It kanako_menu_cmd
|
.It kanako_menu_cmd
|
||||||
Menu executable to
|
Menu executable to
|
||||||
be used with kanako_menu
|
be used with kanako_menu
|
||||||
@ -29,5 +26,5 @@ be used with kanako_menu
|
|||||||
.Sh SEE ALSO
|
.Sh SEE ALSO
|
||||||
.Xr kanako 1
|
.Xr kanako 1
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
.An Aoi Koizumi Aq Mt koizumi.aoi@kyoko-project.wer.ee
|
.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja
|
||||||
|
|
||||||
|
10
kanako.mdoc
10
kanako.mdoc
@ -1,4 +1,4 @@
|
|||||||
.Dd Bureaucracy 73, 3188
|
.Dd $Mdocdate$
|
||||||
.Dt KANAKO 1
|
.Dt KANAKO 1
|
||||||
.Os
|
.Os
|
||||||
.Sh NAME
|
.Sh NAME
|
||||||
@ -33,9 +33,11 @@ Edit an entry
|
|||||||
.It -l
|
.It -l
|
||||||
List all entries
|
List all entries
|
||||||
.It -r
|
.It -r
|
||||||
Remove single entries
|
Remove single entries,
|
||||||
|
will prompt for confirmation
|
||||||
.It -R
|
.It -R
|
||||||
Remove recursively a directory w/ entries
|
Remove recursively a directory w/ entries,
|
||||||
|
will prompt for confirmation
|
||||||
.It -v
|
.It -v
|
||||||
View an entry
|
View an entry
|
||||||
.Bl
|
.Bl
|
||||||
@ -54,7 +56,7 @@ View an entry
|
|||||||
.%D 1983
|
.%D 1983
|
||||||
.Re
|
.Re
|
||||||
.Sh AUTHORS
|
.Sh AUTHORS
|
||||||
.An Aoi Koizumi Aq Mt koizumi.aoi@kyoko-project.wer.ee
|
.An Izuru Yakumo Aq Mt yakumo.izuru@chaotic.ninja
|
||||||
.Sh BUGS
|
.Sh BUGS
|
||||||
Under the Wayland display protocol,
|
Under the Wayland display protocol,
|
||||||
the clipboard subcommand won't work,
|
the clipboard subcommand won't work,
|
||||||
|
10
mkfile
10
mkfile
@ -1,15 +1,15 @@
|
|||||||
<config.mk
|
PREFIX=/usr/local
|
||||||
|
|
||||||
install:V: install-bin install-examples install-man
|
install:V: install-bin install-examples install-man
|
||||||
uninstall:V: uninstall-bin uninstall-examples uninstall-man
|
uninstall:V: uninstall-bin uninstall-examples uninstall-man
|
||||||
|
|
||||||
install-bin:
|
install-bin:
|
||||||
install -Dm$EXEC_MODE kanako $PREFIX/bin/kanako
|
install -Dm0755 kanako $DESTDIR$PREFIX/bin/kanako
|
||||||
install-examples:
|
install-examples:
|
||||||
install -Dm$FILE_MODE kanako.conf.example $PREFIX/share/examples/kanako/kanako.conf
|
install -Dm0600 kanako.conf.example $DESTDIR$PREFIX/share/examples/kanako/kanako.conf
|
||||||
install-man:
|
install-man:
|
||||||
install -Dm$FILE_MODE kanako.mdoc $PREFIX/share/man/man1/kanako.1
|
install -Dm0600 kanako.mdoc $DESTDIR$PREFIX/share/man/man1/kanako.1
|
||||||
install -Dm$FILE_MODE kanako.conf.mdoc $PREFIX/share/man/man5/kanako.conf.5
|
install -Dm0600 kanako.conf.mdoc $DESTDIR$PREFIX/share/man/man5/kanako.conf.5
|
||||||
uninstall-bin:
|
uninstall-bin:
|
||||||
rm -f $PREFIX/bin/kanako
|
rm -f $PREFIX/bin/kanako
|
||||||
uninstall-examples:
|
uninstall-examples:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user