Skip to content
This repository has been archived by the owner on Aug 21, 2018. It is now read-only.

Commit

Permalink
Update docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
dashohoxha committed Feb 20, 2016
1 parent aab861e commit c1104e3
Show file tree
Hide file tree
Showing 4 changed files with 146 additions and 39 deletions.
59 changes: 47 additions & 12 deletions man/pw.1
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ Copy to clipboard the password (it will be cleared in a few seconds)\.
Print out the password contained in the given file\.
.
.IP "\(bu" 4
\fBgen\fR \fIpwfile\fR [\fIlength\fR] [\fB\-n\fR,\fB\-\-no\-symbols\fR] [\fB\-i\fR,\fB\-\-in\-place\fR | \fB\-f\fR,\fB\-\-force\fR]
.
.IP
Generate a new password with optionally no symbols\. Put it on the clipboard and clear board after a few seconds\. Prompt before overwriting existing password unless forced\. Optionally replace only the first line of an existing file with a new password\.
.
.IP "\(bu" 4
\fBset\fR \fIpwfile\fR [\fB\-e\fR,\fB\-\-echo\fR | \fB\-m\fR,\fB\-\-multiline\fR] [\fB\-f\fR,\fB\-\-force\fR]
.
.IP
Expand All @@ -51,12 +45,6 @@ Insert new password\. Optionally, echo the password back to the console during e
Edit or add a password file using vi\.
.
.IP "\(bu" 4
\fBfind\fR \fIpattern\fR [\fB\-t\fR,\fB\-\-tree\fR]
.
.IP
List pwfiles that match pattern, optionally in tree format\.
.
.IP "\(bu" 4
\fBgrep\fR \fIsearch\-string\fR
.
.IP
Expand Down Expand Up @@ -127,6 +115,34 @@ Show version information\.
.
.IP "" 0
.
.SH "EXTERNAL COMMANDS"
.
.IP "\(bu" 4
\fBgen\fR \fIpwfile\fR [\fIlength\fR] [\fB\-n\fR,\fB\-\-no\-symbols\fR] [\fB\-i\fR,\fB\-\-in\-place\fR | \fB\-f\fR,\fB\-\-force\fR]
.
.IP
Generate a new password with optionally no symbols\. Put it on the clipboard and clear board after a few seconds\. Prompt before overwriting existing password unless forced\. Optionally replace only the first line of an existing file with a new password\.
.
.IP "\(bu" 4
\fBfind\fR \fIpattern\fR
.
.IP
List pwfiles that match pattern\.
.
.IP "\(bu" 4
\fBfield\fR \fIpwfile\fR \fIfieldname\fR
.
.IP
Display the value of the given field from pwfile\. The field name starts at the begining of line and ends with a column, for example: \'username: \.\.\.\' or \'url: \.\.\.\'\.
.
.IP "\(bu" 4
\fBqr\fR \fIpwfile\fR
.
.IP
Display the password as a QR image\.
.
.IP "" 0
.
.SH "FILES"
\fB~/\.pw/\fR
.
Expand Down Expand Up @@ -166,6 +182,19 @@ Show version information\.
.
.IP "" 0
.
.P
\fB~/\.pw/customize\.sh\fR
.
.IP "" 4
.
.nf

Optional customization file\.
.
.fi
.
.IP "" 0
.
.SH "ENVIRONMENT VARIABLES"
\fBPW_DIR\fR
.
Expand All @@ -192,6 +221,12 @@ Show version information\.
.
.IP "" 0
.
.SH "CUSTOMIZATION"
The file \fB$PW_DIR/customize\.sh\fR can be used to redefine and customize some functions, without having to touch the code of the main script\. Also, external commands can be customized (or new commands can be defined) by adding the file \fB$PW_DIR/cmd_command\.sh\fR, which contains the function \fBcmd_command() { \. \. \. }\fR\.
.
.P
In general, for an external command the script will first look for \fB$PW_DIR/cmd_command\.sh\fR, then for \fB$LIB/ext/$PLATFORM/cmd_command\.sh\fR, and finally for \fB$LIB/ext/cmd_command\.sh\fR\. The first that is found is loaded and used\.
.
.SH "SIMPLE EXAMPLE"
Some basic usage is demonstrated on the examples below\.
.
Expand Down
52 changes: 43 additions & 9 deletions man/pw.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

52 changes: 41 additions & 11 deletions man/pw.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,6 @@ pw(1) -- simple password manager

Print out the password contained in the given file.

* `gen` <pwfile> [<length>] [`-n`,`--no-symbols`] [`-i`,`--in-place` | `-f`,`--force`]

Generate a new password with optionally no symbols. Put it on the
clipboard and clear board after a few seconds. Prompt before
overwriting existing password unless forced. Optionally replace
only the first line of an existing file with a new password.

* `set` <pwfile> [`-e`,`--echo` | `-m`,`--multiline`] [`-f`,`--force`]

Insert new password. Optionally, echo the password back to the
Expand All @@ -48,10 +41,6 @@ pw(1) -- simple password manager

Edit or add a password file using vi.

* `find` <pattern> [`-t`,`--tree`]

List pwfiles that match pattern, optionally in tree format.

* `grep` <search-string>

Search for password files containing <search-string> when decrypted.
Expand Down Expand Up @@ -101,6 +90,30 @@ pw(1) -- simple password manager
Show version information.


## EXTERNAL COMMANDS

* `gen` <pwfile> [<length>] [`-n`,`--no-symbols`] [`-i`,`--in-place` | `-f`,`--force`]

Generate a new password with optionally no symbols. Put it on the
clipboard and clear board after a few seconds. Prompt before
overwriting existing password unless forced. Optionally replace
only the first line of an existing file with a new password.

* `find` <pattern>

List pwfiles that match pattern.

* `field` <pwfile> <fieldname>

Display the value of the given field from pwfile. The field name
starts at the begining of line and ends with a column, for
example: 'username: ...' or 'url: ...'.

* `qr` <pwfile>

Display the password as a QR image.


## FILES

`~/.pw/`
Expand All @@ -112,6 +125,9 @@ pw(1) -- simple password manager
`~/.pw/config.sh`
The configuration file.

`~/.pw/customize.sh`
Optional customization file.


## ENVIRONMENT VARIABLES

Expand All @@ -122,6 +138,20 @@ pw(1) -- simple password manager
The location of the text editor used by edit.


## CUSTOMIZATION

The file `$PW_DIR/customize.sh` can be used to redefine and customize
some functions, without having to touch the code of the main script.
Also, external commands can be customized (or new commands can be
defined) by adding the file `$PW_DIR/cmd_command.sh`, which contains
the function `cmd_command() { . . . }`.

In general, for an external command the script will first look for
`$PW_DIR/cmd_command.sh`, then for `$LIB/ext/$PLATFORM/cmd_command.sh`,
and finally for `$LIB/ext/cmd_command.sh`. The first that is found is
loaded and used.


## SIMPLE EXAMPLE

Some basic usage is demonstrated on the examples below.
Expand Down
22 changes: 15 additions & 7 deletions src/pw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -236,13 +236,6 @@ Commands and their options are listed below.
show pwfile
Print out the password contained in the given file.
gen pwfile [length] [-n,--no-symbols] [-i,--in-place | -f,--force]
Generate a new password with optionally no symbols. Put it on
the clipboard and clear board after $CLIP_TIME seconds.
Prompt before overwriting existing password unless forced.
Optionally replace only the first line of an existing file
with a new password.
set pwfile [-e,--echo | -m,--multiline] [-f,--force]
Insert new password. Optionally, echo the password back to the
console during entry. Or, optionally, the entry may be multiline.
Expand Down Expand Up @@ -289,9 +282,24 @@ Commands and their options are listed below.
External commands:
gen pwfile [length] [-n,--no-symbols] [-i,--in-place | -f,--force]
Generate a new password with optionally no symbols. Put it on
the clipboard and clear board after $CLIP_TIME seconds.
Prompt before overwriting existing password unless forced.
Optionally replace only the first line of an existing file
with a new password.
find pattern
List pwfiles that match pattern.
field pwfile field-name
Display the value of the given field from pwfile. The field
name starts at the begining of line and ends with a column,
for example: 'username: ...' or 'url: ...'.
qr pwfile
Display the password as a QR image.
More information may be found in the pw(1) man page.
_EOF
Expand Down

0 comments on commit c1104e3

Please sign in to comment.