Skip to content

Commit 9ec8155

Browse files
committed
Better align README, man page and help text
1 parent 0bb3dce commit 9ec8155

3 files changed

Lines changed: 25 additions & 23 deletions

File tree

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
# cfv – Command-line File Verify
22

33
cfv is a utility to test and create a wide range of checksum verification files.
4-
It currently supports testing and creating sfv, sfvmd5, b3 (BLAKE3),
5-
csv, csv2, csv4, md5, bsdmd5, sha1, sha224, sha256, sha384, sha512,
6-
torrent and crc files.
4+
It currently supports testing and creating sfv, sfvmd5, csv, csv2, csv4, crc, md5, bsdmd5,
5+
sha1, sha224, sha256, sha384, sha512, b3 (BLAKE3) and torrent files.
76
Test-only support is available for par, par2.
87

98
cfv was originally written by Matthew Mueller ([original project home](http://cfv.sourceforge.net/)).
@@ -26,7 +25,7 @@ For Python 2 support, see the [python2 branch](https://github.com/cfv-project/cf
2625
* [Python Imaging Library (PIL)](https://www.pythonware.com/products/pil/) or
2726
[Pillow](https://python-pillow.org/) – only needed if you want to create the
2827
dimensions column of .crc files.
29-
* [blake3](https://pypi.org/project/blake3/) – needed for BLAKE3 (.b3) files.
28+
* [blake3](https://pypi.org/project/blake3/) – needed for BLAKE3 b3sum files (B3SUMS, .b3, .bk3).
3029
Default output is 256 bits (32 bytes).
3130
Install via `pip install blake3` or `apt install python3-blake3`.
3231

cfv.1

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.TH cfv 1 "05 Feb 2005"
22
.SH NAME
3-
cfv \- Verify file consistency with .sfv, .b3, .csv, .crc, .md5, md5sum, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, .torrent, par, or par2 files
3+
cfv \- Verify file consistency with .sfv, .csv, .crc, .md5, md5sum, sha1sum, sha224sum, sha256sum, sha384sum, sha512sum, b3sum, .torrent, .par, or .par2 files
44
.SH SYNOPSIS
55
.B cfv [\-p dir] [\-v|\-V|\-VV|\-q|\-Q] [\-\-progress VAL] [\-r|\-rr|\-R] [\-l|\-L] [\-n|\-N] [\-\-renameformat <s>] [\-s|\-S] [\-zz|\-z|\-Z|\-ZZ] [\-T|\-C] [\-m|\-M] [\-i|\-I] [\-u|\-uu|\-U] [\-\-encoding <e>] [\-\-unquote <b>] [\-\-fixpaths <s>] [\-\-strippaths <p>] [\-\-showpaths <i>] [\-\-list/\-\-list0 <l>] [\-\-announceurl <u>] [\-\-piece_size_pow2 <n>] [\-\-private_torrent] [\-\-length <n>] [\-t type] [\-f file] [files...]
66
.SH DESCRIPTION
@@ -120,38 +120,38 @@ Specify the name of the checksum file to test or create.
120120
If file is \-, stdin (for \-T) or stdout (for \-C) will be used.
121121
.IP "\-t type"
122122
Specify the type of the file.
123-
Can be sfv, sfvmd5, b3, csv, csv2, csv4, sha1, sha224, sha256, sha384, sha512, md5, bsdmd5, par, par2, torrent, crc, auto, or help.
123+
Can be sfv, sfvmd5, csv, csv2, csv4, crc, md5, bsdmd5, sha1, sha224, sha256, sha384, sha512, b3, torrent, par, par2, auto, or help.
124+
For details see supported checksum formats section.
124125
If the type is help, or an unknown type is given, a list of the types and their descriptions will be printed.
125126
The default is auto, which will detect the file type for you.
126127
When creating, if type is auto an sfv will be made, unless a different default has been set in the config file.
127128
.IP "\-\-list listset"
128129
Prints a raw listing of files in the given set (ok, bad, unverified, notfound). Usually used with \-q, but not strictly needed since specifying \-\-list will redirect all other messages to stderr.
129130
.IP "\-\-list0 listset"
130131
Like \-\-list but files are separated by a null char. Useful in combination with xargs \-0.
132+
.IP "\-\-length BYTES"
133+
Set digest length in bytes for hash types that support variable output (b3).
134+
The default for b3 is 32 (256 bits).
131135
.IP "\-\-announceurl URL"
132136
Tracker announce URL for .torrent file creation.
133137
.IP "\-\-piece_size_pow2 N"
134138
Power of two to set piece size to for .torrent file creation.
135139
The default is 18, which gives a piece size of 2^18=256KB.
136140
.IP "\-\-private_torrent"
137141
Set private flag in torrent during .torrent file creation.
138-
.IP "\-\-length BYTES"
139-
Set digest length in bytes for hash types that support variable output (b3).
140-
The default for b3 is 32 (256 bits).
141142
.IP "\-h/\-\-help"
142143
Print help info.
143144
.IP "\-\-version"
144145
Print version of cfv and modules it uses.
146+
.SH SUPPORTED CHECKSUM FILE FORMATS
147+
The following types are supported:
145148
.P
146149
.B sfv
147150
is a Simple File Verify format file
148151
.br
149152
.B sfvmd5
150153
is a Simple File Verify format file, using MD5 checksums rather than crc32.
151154
.br
152-
.B b3
153-
is a BLAKE3 checksum file (.b3). Requires the Python blake3 module.
154-
.br
155155
.B csv
156156
is a Comma Separated Value file, with the fields being name,size,crc32,
157157
.br
@@ -161,6 +161,15 @@ is a Comma Separated Value file, with the fields being name,size,
161161
.B csv4
162162
is a Comma Separated Value file, with the fields being name,size,crc32,path
163163
.br
164+
.B crc
165+
is a JPEG Sheriff format crc file
166+
.br
167+
.B md5
168+
is a GNU md5sum format file
169+
.br
170+
.B bsdmd5
171+
is a BSD md5 format file
172+
.br
164173
.B sha1
165174
is a GNU sha1sum format file
166175
.br
@@ -176,23 +185,17 @@ is a GNU sha384sum format file
176185
.B sha512
177186
is a GNU sha512sum format file
178187
.br
179-
.B md5
180-
is a GNU md5sum format file
188+
.B b3
189+
is a BLAKE3 b3sum format file (B3SUMS, .b3, .bk3). Requires the Python blake3 module.
181190
.br
182-
.B bsdmd5
183-
is a BSD md5 format file
191+
.B torrent
192+
is a BitTorrent metainfo file
184193
.br
185194
.B par
186195
is parchive v1 format file (test-only)
187196
.br
188197
.B par2
189198
is parchive v2 format file (test-only)
190-
.br
191-
.B torrent
192-
is a BitTorrent metainfo file
193-
.br
194-
.B crc
195-
is a JPEG Sheriff format crc file
196199
.SH EXIT STATUS
197200
The exit status of cfv can be examined to determine what kind of errors, if any, occurred.
198201
.P

lib/cfv/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2077,7 +2077,7 @@ def printusage(err=0):
20772077
phelp(' --announceurl=URL tracker announce url')
20782078
phelp(' --piece_size_pow2=N power of two to set the piece size to (default 18)')
20792079
phelp(' --private_torrent set private flag in torrent')
2080-
phelp('Optional modules: blake3 (BLAKE3/.b3), Pillow (CRC dimensions)')
2080+
phelp('Optional modules: blake3 (b3 format), Pillow (crc format image dimensions)')
20812081
sys.exit(err)
20822082

20832083

0 commit comments

Comments
 (0)