Skip to content

Commit

Permalink
1.20: fix help, man and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zvezdochiot committed Jan 29, 2023
1 parent f40f7b0 commit 50d11d4
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 12 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

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

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

Options:
`-p content-path` path of content data,
`-e str` encoding name (iconv),
`-n` suppresses progress count,
`-h` shows all hash values,
`-c` or `-d` uses comma or dot formatted byte counts.
Expand Down
13 changes: 8 additions & 5 deletions man/man1/torrentcheck.1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.TH torrentcheck "1" "1.10" "07 Jan 2023" "User Manual"
.TH torrentcheck "1" "1.20" "29 Jan 2023" "User Manual"

.SH NAME
torrentcheck
Expand All @@ -12,13 +12,16 @@ torrentcheck torrent-file [-p content-path] [-n] [-h] [-c] [-d]
.SH OPTIONS
.TP
-p content-path
path of content data
path of content data,
.TP
-e str
encoding name (iconv),
.TP
-n
suppresses progress count
suppresses progress count,
.TP
-h
shows all hash values
shows all hash values,
.TP
-c or -d
uses comma or dot formatted byte counts.
Expand All @@ -39,7 +42,7 @@ torrentcheck my.torrent
Mike Ingle <[email protected]>

.SH SEE ALSO
torreadwrite(1), ctorrent(1), aria2c(1)
torreadwrite(1), ctorrent(1), aria2c(1), iconv(1)

.SH CONTACTS
Website: https://github.com/ximellon/torrentcheck
18 changes: 12 additions & 6 deletions src/torrentcheck.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
#include <malloc.h>
#include <string.h>

#define TORRENTCHECK_VERSION "1.2"

#ifdef ICONV_IMPLEMENTATION
#include <iconv.h>
#endif
Expand Down Expand Up @@ -532,16 +534,20 @@ int main(int argc,char* argv[])

if (torrentFile == NULL)
{
printf("torrentcheck - catalog a .torrent file and optionally verify content hashes\n");
printf("Usage: torrentcheck torrent-file [-p content-path] [-n] [-h] [-c] [-d]\n");
printf("TorrentCheck version %s\n", TORRENTCHECK_VERSION);
printf("Catalog a .torrent file and optionally verify content hashes\n");
printf("Usage:\n");
printf("\ttorrentcheck torrent-file [-p content-path] [-e str] [-n] [-h] [-c] [-d]\n");
printf("Options:\n");
printf("\t-n suppresses progress count,\n");
printf("\t-h shows all hash values,\n");
printf("\t-c or -d uses comma or dot formatted byte counts.\n");
printf("\t-p content-path path of content data,\n");
printf("\t-e str encoding name (iconv),\n");
printf("\t-n suppresses progress count,\n");
printf("\t-h shows all hash values,\n");
printf("\t-c or -d uses comma or dot formatted byte counts.\n");
printf("Returns 0 if successful, nonzero return code if errors found.\n");
printf("\n");
printf("Option:\n");
printf("\t-sha1 [optional hash] acts as a simple SHA1 filter.\n");
printf("\t-sha1 [optional hash] acts as a simple SHA1 filter.\n");
printf("If -sha1 is followed by a hex hash, the return code will be zero\n");
printf("on match and nonzero otherwise.\n");
printf("\n");
Expand Down

0 comments on commit 50d11d4

Please sign in to comment.