Skip to content

Commit 30039fa

Browse files
author
Anand
committed
Updated usage and added export section
1 parent e366dc8 commit 30039fa

File tree

1 file changed

+62
-18
lines changed

1 file changed

+62
-18
lines changed

README.md

Lines changed: 62 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Table of Contents
1212
* [Encryption and Security](#encryption-and-security)
1313
* [Databases](#databases)
1414
* [Listing and Searching](#listing-and-searching)
15+
* [Export](#export)
1516
* [Configuration](#configuration)
1617
* [License](#license)
1718
* [Feedback](#feedback)
@@ -75,35 +76,35 @@ Usage
7576

7677
EDIT/CREATE ACTIONS:
7778

78-
-e --encrypt Encrypt the current database
79-
-A --add Add a new entry
80-
-I --init <path> Initialize a new database
81-
-C --copy <id> Copy an entry
82-
-R --remove <id> Remove an entry
83-
-d --decrypt <path> Decrypt password database
84-
-U --use-db <path> Set as active database
85-
-E --edit <id> Edit entry by id
79+
-E --edit <id> Edit entry by id
80+
-e --encrypt Encrypt the current database
81+
-U --use-db <path> Set as active database
82+
-d --decrypt <path> Decrypt password database
83+
-C --copy <id> Copy an entry
84+
-R --remove <id> Remove an entry
85+
-A --add Add a new entry
86+
-I --init <path> Initialize a new database
8687

8788
FIND/LIST ACTIONS:
8889

89-
-l --list-entry <id> List entry by id
90-
-p --path Show current database path
91-
-a --list-all List all entries in current database
92-
-f --find <term> Search entries
90+
-f --find <term> Search entries
91+
-x --export <filename> Export all entries to <filename>
92+
-p --path Show current database path
93+
-a --list-all List all entries in current database
94+
-l --list-entry <id> List entry by id
9395

9496
HELP ACTIONS:
9597

96-
-v --version Show version information and exit
97-
-h --help Print this help message and exit
98+
-v --version Show version information and exit
99+
-h --help Print this help message and exit
98100

99101
FLAGS:
100102

101-
-s --show Show passwords when listing entries
103+
-s --show Show passwords when listing entries
102104

103105

104-
AUTHORS
105-
Copyright (C) 2021 Anand B Pillai <[email protected]>
106-
106+
AUTHORS
107+
Copyright (C) 2021 Anand B Pillai <[email protected]>
107108

108109
The command line flags are grouped into `Edit/Create`, `Find/List` and `Help` actions. The first group of actions allows you to work with password databases and perform create/edit as well as encrypt/decrypt actions. The second set of actions allows you to work with an active decrypted database and view/search/list entries.
109110

@@ -387,6 +388,49 @@ To turn on visible passwords, modify the configuration setting (see below) or us
387388
$ varuh -p
388389
/home/anand/mypasswds
389390

391+
Export
392+
======
393+
394+
`Varuh` allows to export password databases to the following formats.
395+
396+
1. `csv`
397+
2. `markdown`
398+
3. `html`
399+
4. `pdf`
400+
401+
To export use the `-x` option. The type of file is automatically figured out from the filename extension.
402+
403+
$ varuh -x passwds.csv
404+
!WARNING: Passwords are stored in plain-text!
405+
Exported 14 records to passwds.csv .
406+
Exported to passwds.csv.
407+
408+
$ varuh -x passwds.html
409+
Exported to passwds.html.
410+
411+
PDF export is supported if `pandoc` is installed along with the required `pdflatex` packages. The following command (on `Debian` and derived systems) should install the required dependencies.
412+
413+
$ sudo apt-get install pandoc texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra texlive-xetex lmodern -y
414+
415+
$ varuh -x passwds.pdf
416+
pdftk not found, PDF won't be secure!
417+
418+
File passwds.pdf created without password.
419+
Exported to passwds.pdf.
420+
421+
PDF files are exported in landscape mode with 150 dpi and 600 columns. To avoid the data not fitting into one page the fields `Notes` and `URL` are not exported.
422+
423+
If `pdftk` is installed, the PDF files will be encrypted with an (optional) password.
424+
425+
$ sudo apt-get install pdftk -y
426+
427+
$ varuh -x passwds.pdf
428+
Password:
429+
File passwds.pdf created without password.
430+
Added password to passwds.pdf.
431+
Exported to passwds.pdf.
432+
433+
390434
Configuration
391435
=============
392436

0 commit comments

Comments
 (0)