Changeset 11 in code for trunk


Ignore:
Timestamp:
Oct 18, 2022, 9:57:56 PM (3 years ago)
Author:
koizumi.aoi
Message:

Moved addons to their own directory. Add kanako_gen, Removed
kanako-init, etc.

Signed-off-by: Aoi K <koizumi.aoi@…>

Location:
trunk
Files:
4 added
4 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/README.md

    r10 r11  
    11# kanako (神奈子)
    2 the adaptable password manager.
     2the adaptable password manager. named after [Kanako Yasaka](https://en.touhouwiki.net/wiki/Kanako_Yasaka)
    33
    44## Backends supported
     
    1010* Any of the above, depending how you configured it
    1111* `ls(1)` or `tree(1)` for printing a list
    12 * busybox `tr(1)` for password generation
    1312* `mandoc(1)` for documentation
    1413
    1514## Add-ons
    1615
    17 ### kanakomenu
     16### kanako_gen
     17random username and password generator, requires `busybox(1)`
     18
     19### kanako_menu
    1820quick graphical front-end for kanako, works with either of `dmenu(1)`
    19 or `bemenu(1)`, useful for copying passwords to clipboard. it's configured
    20 through kanakomenu.conf
     21or `bemenu(1)`, useful for copying passwords to clipboard.
    2122
    22 ### kanakototp
     23### kanako_totp
    2324time-based one time password addon for kanako, requires `oathtool(1)`
    2425from oath-toolkit.
  • trunk/kanako

    r10 r11  
    66
    77if test -d "${store_dir}"; then
    8         cd "${store_dir}"
     8    cd "${store_dir}"
    99else
    10         echo "Password store not found!"
    11         echo "Please run kanako-init"
    12         exit 1
     10    echo "Password store not found!"
     11    echo "Create it with `mkdir -p $store_dir`"
     12    exit 1
    1313fi
    1414
    1515if test -f "${conf_dir}/kanako.conf"; then
    16         . "${conf_dir}/kanako.conf";
     16    . "${conf_dir}/kanako.conf";
    1717else
    18         echo "Configuration file has not been found!"
    19         echo "Copy kanako.conf from the examples directory,"
    20         echo "and edit accordingly."
    21         exit 1
     18    echo "Configuration file has not been found!"
     19    echo "Copy kanako.conf from the examples directory,"
     20    echo "and edit accordingly."
     21    exit 1
    2222fi
    2323
     
    3030    ${encrypt_cmd} ${encrypt_args} ${1%%.enc} > ${1%%.enc}.enc
    3131    rm "${1%%.enc}"
    32 }
    33 fn_generate() {
    34         busybox tr -dc '[A-Z][a-z][0-9]' </dev/urandom | dd bs=1 count=${1:-80} 2>/dev/null; echo
    3532}
    3633fn_list() {
     
    5653    cat <<EOF
    5754Usage:
    58 kanako [-ceglnrRv] <arguments>
    59 kanako [copy|edit|gen|list|add|trash|trashd|view] <arguments>
     55kanako [-celnrRv] <arguments>
    6056EOF
    6157}
     
    7167
    7268case $1 in
    73     -c | copy) fn_copy $2 ;;
    74     -e | edit) fn_edit $2 ;;
    75     -g | gen) fn_generate $2 ;;
    76     -l | list) fn_list ;;
    77     -n | add) fn_new $2 ;;
    78     -r | trash) fn_trash_entry $2 ;;
    79     -R | trashd) fn_trash_directory $2 ;;
    80     -v | view) fn_view $2 ;;
     69    -c) fn_copy $2 ;;
     70    -e) fn_edit $2 ;;
     71    -l) fn_list ;;
     72    -n) fn_new $2 ;;
     73    -r) fn_trash_entry $2 ;;
     74    -R) fn_trash_directory $2 ;;
     75    -v) fn_view $2 ;;
    8176    *) fn_usage ;;
    8277esac
  • trunk/kanako.mdoc

    r3 r11  
    1 .Dd Bureaucracy 65, 3188
     1.Dd Bureaucracy 72, 3188
    22.Dt KANAKO 1
    33.Os
     
    99.Sh USAGE
    1010.Bl -tag -width 11n -compact
    11 .It add, -n
     11.It -n
    1212Add a new entry
    13 .It copy, -c
     13.It -c
    1414Copy an entry's text to the clipboard
    15 .It edit, -e
     15.It -e
    1616Edit an entry
    17 .It gen, -g
    18 Generate a random password
    19 .It list, -l
     17.It -l
    2018List all entries
    21 .It trash, -r
     19.It -r
    2220Remove single entries
    23 .It trashd, -R
     21.It -R
    2422Remove recursively a directory w/ entries
    25 .It view, -v
     23.It -v
    2624View an entry
    2725.Bl
  • trunk/mkfile

    r9 r11  
    66install-bin:
    77        install -m$EXEC_MODE kanako $PREFIX/bin/kanako
    8         install -m$EXEC_MODE kanako-init $PREFIX/bin/kanako-init
    9         install -m$EXEC_MODE kanakomenu $PREFIX/bin/kanakomenu
    10         install -m$EXEC_MODE kanakototp $PREFIX/bin/kanakototp
    118install-examples:
    129        install -m$FILE_MODE kanako.conf.example $PREFIX/share/examples/kanako/kanako.conf
    13         install -m$FILE_MODE kanakomenu.conf.example $PREFIX/share/examples/kanako/kanakomenu.conf
    1410install-man:
    1511        install -m$FILE_MODE kanako.mdoc $PREFIX/share/man/man1/kanako.1
    1612        install -m$FILE_MODE kanako.conf.mdoc $PREFIX/share/man/man5/kanako.conf.5
    1713uninstall-bin:
    18         rm -f $PREFIX/bin/kanako $PREFIX/bin/kanako-init $PREFIX/bin/kanakomenu $PREFIX/bin/kanakototp
     14        rm -f $PREFIX/bin/kanako
    1915uninstall-examples:
    2016        rm -f $PREFIX/share/examples/kanako/kanako.conf $PREFIX/share/exmaples/kanako/kanakomenu.conf
Note: See TracChangeset for help on using the changeset viewer.