mirror of
https://codeberg.org/scip/diceware.git
synced 2025-12-17 10:50:57 +01:00
added debug, enhanced docs
This commit is contained in:
22
Makefile
22
Makefile
@@ -18,15 +18,17 @@
|
|||||||
#
|
#
|
||||||
# You can contact me by mail: <tom AT vondein DOT org>.
|
# You can contact me by mail: <tom AT vondein DOT org>.
|
||||||
|
|
||||||
CFLAGS = -Wall -Wextra -Werror -O1 -g
|
CFLAGS = -Wall -Wextra -Werror -O1 -g
|
||||||
LDFLAGS=
|
LDFLAGS =
|
||||||
OBJS = dicepwgen.o dictfile.o tossing.o
|
OBJS = dicepwgen.o dictfile.o tossing.o debug.o
|
||||||
DST = dicepwgen
|
DST = dicepwgen
|
||||||
PREFIX = /usr/local
|
PREFIX = /usr/local
|
||||||
UID = root
|
UID = root
|
||||||
GID = 0
|
GID = 0
|
||||||
MAN = dicepwgen.1
|
MAN = dicepwgen.1
|
||||||
POD = dicepwgen.pod
|
POD = dicepwgen.pod
|
||||||
|
DICTFILE = /usr/share/dict/american-english
|
||||||
|
|
||||||
|
|
||||||
all: $(DST)
|
all: $(DST)
|
||||||
|
|
||||||
@@ -34,7 +36,7 @@ $(DST): $(OBJS)
|
|||||||
gcc $(OBJS) -o $(DST)
|
gcc $(OBJS) -o $(DST)
|
||||||
|
|
||||||
%.o: %.c
|
%.o: %.c
|
||||||
gcc -c $(CFLAGS) $*.c -o $*.o
|
gcc -c $(CFLAGS) -DDICTFILE=$(DICTFILE) $*.c -o $*.o
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f *.o $(DST)
|
rm -f *.o $(DST)
|
||||||
|
|||||||
31
README.md
31
README.md
@@ -29,6 +29,12 @@ compile the source code:
|
|||||||
cd diceware
|
cd diceware
|
||||||
make
|
make
|
||||||
|
|
||||||
|
Although dicepwgen has an option to specify a dictionary file
|
||||||
|
on the commandline, there's also a built-in default. This default
|
||||||
|
can be modified during compilation, e.g.:
|
||||||
|
|
||||||
|
make DICTFILE=/usr/local/share/dict/german.txt
|
||||||
|
|
||||||
To install, type this command:
|
To install, type this command:
|
||||||
|
|
||||||
sudo make install
|
sudo make install
|
||||||
@@ -42,16 +48,21 @@ modify `$PREFIX` during installation time like this:
|
|||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```
|
Usage: dice [-tcfvhd]
|
||||||
Usage: dice [-tcfvh]
|
Options:
|
||||||
Options:
|
-t --humantoss Asks interactively for rolled dices
|
||||||
-t Asks interactively for tossed dices
|
-c --wordcount <count> Number of words (default: 4)
|
||||||
-c <count> Number of words (default: 4)
|
-f --dictfile <dictfile> Dictionary file to use (default:
|
||||||
-f <dictfile> Dictionary file to use (default:
|
/usr/share/dict/american-english)
|
||||||
/usr/share/dict/american-english)
|
-l --minlen <count> Minimum word len (default: 5)
|
||||||
-v Print program version
|
-m --maxlen <count> Maximum word len (default: 10)
|
||||||
-h Print this help screen
|
-d --debug Enable debug output
|
||||||
```
|
-v --version Print program version
|
||||||
|
-h -? --help Print this help screen
|
||||||
|
|
||||||
|
If you want to generate a truly random diceware password, use
|
||||||
|
the option -t. In that case you have to roll physical dices and
|
||||||
|
enter the results (dicepwgen will ask you for them).
|
||||||
|
|
||||||
## Getting help
|
## Getting help
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user