Skip to content

Commit 50d11d4

Browse files
committed
1.20: fix help, man and docs
1 parent f40f7b0 commit 50d11d4

File tree

3 files changed

+23
-12
lines changed

3 files changed

+23
-12
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
torrentcheck - catalog a `.torrent` file and optionally verify content hashes.
44

5-
Usage: `torrentcheck torrent-file [-p content-path] [-n] [-h] [-c] [-d]`
5+
Usage: `torrentcheck torrent-file [-p content-path] [-e] [-n] [-h] [-c] [-d]`
66

77
Options:
8+
`-p content-path` path of content data,
9+
`-e str` encoding name (iconv),
810
`-n` suppresses progress count,
911
`-h` shows all hash values,
1012
`-c` or `-d` uses comma or dot formatted byte counts.

man/man1/torrentcheck.1

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH torrentcheck "1" "1.10" "07 Jan 2023" "User Manual"
1+
.TH torrentcheck "1" "1.20" "29 Jan 2023" "User Manual"
22

33
.SH NAME
44
torrentcheck
@@ -12,13 +12,16 @@ torrentcheck torrent-file [-p content-path] [-n] [-h] [-c] [-d]
1212
.SH OPTIONS
1313
.TP
1414
-p content-path
15-
path of content data
15+
path of content data,
16+
.TP
17+
-e str
18+
encoding name (iconv),
1619
.TP
1720
-n
18-
suppresses progress count
21+
suppresses progress count,
1922
.TP
2023
-h
21-
shows all hash values
24+
shows all hash values,
2225
.TP
2326
-c or -d
2427
uses comma or dot formatted byte counts.
@@ -39,7 +42,7 @@ torrentcheck my.torrent
3942
Mike Ingle <[email protected]>
4043

4144
.SH SEE ALSO
42-
torreadwrite(1), ctorrent(1), aria2c(1)
45+
torreadwrite(1), ctorrent(1), aria2c(1), iconv(1)
4346

4447
.SH CONTACTS
4548
Website: https://github.com/ximellon/torrentcheck

src/torrentcheck.c

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
#include <malloc.h>
1717
#include <string.h>
1818

19+
#define TORRENTCHECK_VERSION "1.2"
20+
1921
#ifdef ICONV_IMPLEMENTATION
2022
#include <iconv.h>
2123
#endif
@@ -532,16 +534,20 @@ int main(int argc,char* argv[])
532534

533535
if (torrentFile == NULL)
534536
{
535-
printf("torrentcheck - catalog a .torrent file and optionally verify content hashes\n");
536-
printf("Usage: torrentcheck torrent-file [-p content-path] [-n] [-h] [-c] [-d]\n");
537+
printf("TorrentCheck version %s\n", TORRENTCHECK_VERSION);
538+
printf("Catalog a .torrent file and optionally verify content hashes\n");
539+
printf("Usage:\n");
540+
printf("\ttorrentcheck torrent-file [-p content-path] [-e str] [-n] [-h] [-c] [-d]\n");
537541
printf("Options:\n");
538-
printf("\t-n suppresses progress count,\n");
539-
printf("\t-h shows all hash values,\n");
540-
printf("\t-c or -d uses comma or dot formatted byte counts.\n");
542+
printf("\t-p content-path path of content data,\n");
543+
printf("\t-e str encoding name (iconv),\n");
544+
printf("\t-n suppresses progress count,\n");
545+
printf("\t-h shows all hash values,\n");
546+
printf("\t-c or -d uses comma or dot formatted byte counts.\n");
541547
printf("Returns 0 if successful, nonzero return code if errors found.\n");
542548
printf("\n");
543549
printf("Option:\n");
544-
printf("\t-sha1 [optional hash] acts as a simple SHA1 filter.\n");
550+
printf("\t-sha1 [optional hash] acts as a simple SHA1 filter.\n");
545551
printf("If -sha1 is followed by a hex hash, the return code will be zero\n");
546552
printf("on match and nonzero otherwise.\n");
547553
printf("\n");

0 commit comments

Comments
 (0)