Browse Source

some cleanups in generated README.md

master
Georg Hopp 9 years ago
parent
commit
6e48b6a976
  1. 304
      README.md

304
README.md

@ -1,49 +1,35 @@
man
===
[NAME](#NAME)
[SYNOPSIS](#SYNOPSIS)
[DESCRIPTION](#DESCRIPTION)
[OPTIONS](#OPTIONS)
[ENVIRONMENT](#ENVIRONMENT)
[DEPENDENCIES](#DEPENDENCIES)
[SEE ALSO](#SEE%20ALSO)
[BUGS](#BUGS)
[AUTHOR](#AUTHOR)
[COPYRIGHT](#COPYRIGHT)
# accountmanager.sh
------------------------------------------------------------------------ ------------------------------------------------------------------------
NAME
----
## NAME
accountmanager.sh − source all functionality into the current shell accountmanager.sh − source all functionality into the current shell
General purpose functions: General purpose functions:
random − create a non blocking stream of random data on stdout
rand\_printable − create a random string a printable characters
- random − create a non blocking stream of random data on stdout
- rand\_printable − create a random string a printable characters
Database management functions: Database management functions:
amngrdbinit − initialize the SQLite account database
amngrdbdestroy − remove the SQLite account database
- amngrdbinit − initialize the SQLite account database
- amngrdbdestroy − remove the SQLite account database
Account management functions: Account management functions:
amngradd − add an account credential to the database
amngrcreate − create a new account credential to the database
amngrcrypt − crypt the given data with GnuPG
amngrdelete − delete an account
amngrgen − generate a encrypted random passphrase
amngrgetoldpass − copy previous password of account to X clipboard
amngrgetolduser − copy previous username of account to X clipboard
amngrgetpass − copy active password of account to X clipboard
amngrgetuser − copy active username of account to X clipboard
amngrid − write the database id of a given account name to stdout
amngrlist − list all accounts
amngrrename − rename an account
amngrsearch − pattern search accounts
SYNOPSIS
--------
- amngradd − add an account credential to the database
- amngrcreate − create a new account credential to the database
- amngrcrypt − crypt the given data with GnuPG
- amngrdelete − delete an account
- amngrgen − generate a encrypted random passphrase
- amngrgetoldpass − copy previous password of account to X clipboard
- amngrgetolduser − copy previous username of account to X clipboard
- amngrgetpass − copy active password of account to X clipboard
- amngrgetuser − copy active username of account to X clipboard
- amngrid − write the database id of a given account name to stdout
- amngrlist − list all accounts
- amngrrename − rename an account
- amngrsearch − pattern search accounts
## SYNOPSIS
source **${PATH}/accountmanager.sh** source **${PATH}/accountmanager.sh**
@ -55,10 +41,10 @@ source **${PATH}/accountmanager.sh**
**amngrdbdestroy** \[*dbfile*\] **amngrdbdestroy** \[*dbfile*\]
**amngradd -u** *username* **-p** *password* \[**-d** *description*\]
**amngradd** **-u** *username* **-p** *password* \[**-d** *description*\]
\[**-D** *dbfile*\] \[**-r** *recipient*\] *account* \[**-D** *dbfile*\] \[**-r** *recipient*\] *account*
**amngrcreate -u** *username* \[**-d** *description*\] \[**-D**
**amngrcreate** **-u** *username* \[**-d** *description*\] \[**-D**
*dbfile*\] \[**-r** *recipient*\] *account* *dbfile*\] \[**-r** *recipient*\] *account*
**amngrcrypt** \[**-r** *recipient*\] *password* **amngrcrypt** \[**-r** *recipient*\] *password*
@ -83,35 +69,22 @@ source **${PATH}/accountmanager.sh**
**amngrsearch** \[**-s** *separator*\] *pattern* **amngrsearch** \[**-s** *separator*\] *pattern*
DESCRIPTION
-----------
## DESCRIPTION
This file can either be source into the current shell or used as a This file can either be source into the current shell or used as a
standalone shell script via the provided symlinks. When used as standalone shell script via the provided symlinks. When used as
standalone script it will detect the function to call by the content of standalone script it will detect the function to call by the content of
**$0**. **$0**.
All *account* as well as all *username* arguments used below are All *account* as well as all *username* arguments used below are
limited to 128 characters. The *account* argument is always a unique limited to 128 characters. The *account* argument is always a unique
string identifier for the account to manage. The *username* argument is string identifier for the account to manage. The *username* argument is
the username part of a credential which is a (*username*, *password*) the username part of a credential which is a (*username*, *password*)
pair. pair.
<table>
<colgroup>
<col width="25%" />
<col width="25%" />
<col width="25%" />
<col width="25%" />
</colgroup>
<tbody>
<tr class="odd">
<td align="left"></td>
<td align="left"><p><strong>random</strong></p></td>
<td align="left"></td>
<td align="left"><p>Takes no arguments and connect a non blocking random source to stdout.</p></td>
</tr>
</tbody>
</table>
**random**
Takes no arguments and connect a non blocking random source to stdout.
**rand\_printable** \[*len*\] **rand\_printable** \[*len*\]
@ -137,8 +110,7 @@ given it specifies the fill path to the file to use, else the value of
**$AMNGRDB** environment variable is used. **$AMNGRDB** environment variable is used.
**amngradd -u** *username* **-p** *password* \[**-d** *description*\] **amngradd -u** *username* **-p** *password* \[**-d** *description*\]
\[**-D** *dbfile*\] \[**-r** *
recipient*\] *account*
\[**-D** *dbfile*\] \[**-r** *recipient*\] *account*
Adds an account credential and marks it as active. If the account Adds an account credential and marks it as active. If the account
already exist, the credential (*username* and *password*) is added to already exist, the credential (*username* and *password*) is added to
@ -155,8 +127,7 @@ One can specify the *dbfile* with the option **-D** if that option is
not given the **$AMNGRDB** environment variable is used. not given the **$AMNGRDB** environment variable is used.
**amngrcreate -u** *username* \[**-d** *description*\] \[**-D** **amngrcreate -u** *username* \[**-d** *description*\] \[**-D**
*dbfile*\] \[**-r** *recipient*\] *
account*
*dbfile*\] \[**-r** *recipient*\] *account*
This will create a password with **amngrgen** and use that to add an This will create a password with **amngrgen** and use that to add an
credential via **amngradd**. (See there for options description) credential via **amngradd**. (See there for options description)
@ -224,62 +195,23 @@ List accounts where *pattern* exists in either the account name, the
username or the account description. The output is like the one username or the account description. The output is like the one
described with **amngrlist**. described with **amngrlist**.
OPTIONS
-------
## OPTIONS
The options are consistent over all sub commands. However not all sub The options are consistent over all sub commands. However not all sub
commands use all options and some sub commands take arguments that other commands use all options and some sub commands take arguments that other
get per option. (See **DESCRIPTION**) get per option. (See **DESCRIPTION**)
<table>
<colgroup>
<col width="25%" />
<col width="25%" />
<col width="25%" />
<col width="25%" />
</colgroup>
<tbody>
<tr class="odd">
<td align="left"></td>
<td align="left"><p><strong>-u</strong></p></td>
<td align="left"></td>
<td align="left"><p>The login username of the credential for the account.</p></td>
</tr>
<tr class="even">
<td align="left"></td>
<td align="left"><p><strong>-p</strong></p></td>
<td align="left"></td>
<td align="left"><p>The plain text password of the credential for the account.</p></td>
</tr>
<tr class="odd">
<td align="left"></td>
<td align="left"><p><strong>-d</strong></p></td>
<td align="left"></td>
<td align="left"><p>The description for the account.</p></td>
</tr>
<tr class="even">
<td align="left"></td>
<td align="left"><p><strong>-D</strong></p></td>
<td align="left"></td>
<td align="left"><p>Select the database file to use instead of the one defined in the <strong>$AMNGRDB</strong> environment variable.</p></td>
</tr>
<tr class="odd">
<td align="left"></td>
<td align="left"><p><strong>-r</strong></p></td>
<td align="left"></td>
<td align="left"><p>Select a recipient id for GnuPG encryption to use instead of the one defined in the <strong>$AMNGRID</strong> environment variable.</p></td>
</tr>
<tr class="even">
<td align="left"></td>
<td align="left"><p><strong>-s</strong></p></td>
<td align="left"></td>
<td align="left"><p>The column separator for the <strong>amngrlist</strong> and <strong>amngrsearchcommands.</strong></p></td>
</tr>
</tbody>
</table>
ENVIRONMENT
-----------
- **-u** The login username of the credential for the account.
- **-p** The plain text password of the credential for the account.
- **-d** The description for the account.
- **-D** Select the database file to use instead of the one defined in the
**$AMNGRDB** environment variable.
- **-r** Select a recipient id for GnuPG encryption to use instead of the one
defined in the **$AMNGRID** environment variable.
- **-s** The column separator for the **amngrlist** and
**amngrsearchcommands**.
## ENVIRONMENT
**AMNGRDB** **AMNGRDB**
@ -298,8 +230,7 @@ option.
The password length to be used when generating new passwords. The password length to be used when generating new passwords.
DEPENDENCIES
------------
## DEPENDENCIES
A set of POSIX compliant shell utilities including a POSIX compliant A set of POSIX compliant shell utilities including a POSIX compliant
shell as well are needed to run this script. shell as well are needed to run this script.
@ -313,150 +244,45 @@ The existence of a reliable non blocking random source. By default this
scripts use **$(cat /dev/urandom)** which can be changed by replacing scripts use **$(cat /dev/urandom)** which can be changed by replacing
the alias **random** with something useful for your system. the alias **random** with something useful for your system.
For data storage **Sqlite &gt;= 3.6.19** is required. The version
For data storage **Sqlite >= 3.6.19** is required. The version
requirement comes from the use of foreign key constraints. requirement comes from the use of foreign key constraints.
To store the data within the X clipboard the **xclip** is needed. To store the data within the X clipboard the **xclip** is needed.
**The tools used are** **The tools used are**
<table>
<colgroup>
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
<col width="20%" />
</colgroup>
<tbody>
<tr class="odd">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>awk</strong></p></td>
<td align="left"></td>
</tr>
<tr class="even">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>basename</strong></p></td>
<td align="left"></td>
</tr>
<tr class="odd">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>cat</strong></p></td>
<td align="left"></td>
</tr>
<tr class="even">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>dnsdomainname</strong></p></td>
<td align="left"></td>
</tr>
<tr class="odd">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>echo</strong></p></td>
<td align="left"></td>
</tr>
<tr class="even">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>getopts</strong></p></td>
<td align="left"></td>
</tr>
<tr class="odd">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>gpg</strong></p></td>
<td align="left"></td>
</tr>
<tr class="even">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>head</strong></p></td>
<td align="left"></td>
</tr>
<tr class="odd">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>printf</strong></p></td>
<td align="left"></td>
</tr>
<tr class="even">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>rm</strong></p></td>
<td align="left"></td>
</tr>
<tr class="odd">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>shift</strong></p></td>
<td align="left"></td>
</tr>
<tr class="even">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>SQLite3</strong> (&gt;= 3.6.19 for foreign key constraints)</p></td>
<td align="left"></td>
</tr>
<tr class="odd">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>test</strong> and <strong>[</strong></p></td>
<td align="left"></td>
</tr>
<tr class="even">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>tr</strong></p></td>
<td align="left"></td>
</tr>
<tr class="odd">
<td align="left"></td>
<td align="left"><p></p></td>
<td align="left"></td>
<td align="left"><p><strong>xclip</strong></p></td>
<td align="left"></td>
</tr>
</tbody>
</table>
SEE ALSO
--------
- **awk**
- **basename**
- **cat**
- **dnsdomainname**
- **echo**
- **getopts**
- **gpg**
- **head**
- **printf**
- **rm
- **shift**
- **SQLite3** (>= 3.6.19 for foreign key constraints)
- **test** and **[**
- **tr**
- **xclip**
## SEE ALSO
gpg2(1), gpg-agent(1) gpg2(1), gpg-agent(1)
BUGS
----
## BUGS
No known bugs. No known bugs.
AUTHOR
------
## AUTHOR
Georg Hopp (georg@steffers.org.in) Georg Hopp (georg@steffers.org.in)
COPYRIGHT
---------
## COPYRIGHT
Copyright © 2017 Georg Hopp License GPLv3+: GNU GPL version 3 or later Copyright © 2017 Georg Hopp License GPLv3+: GNU GPL version 3 or later
&lt;http://gnu.org/licenses/gpl.html&gt;.
<http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it. This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. There is NO WARRANTY, to the extent permitted by law.

Loading…
Cancel
Save