Clean up help message for the public suffix list processor

The grep given in the help from the program to process the
effective-TLD list only worked for voodoo reasons.
Replaced it with an actually-correct use of grep.

The commands given used the name effective_tld_names.dat in the URL
fetched; however, the relevant file has (for some time now) said
explicitly "Please pull this list from, and only from
https://publicsuffix.org/list/public_suffix_list.dat"
Changed the name used to match that URL.

Revised the output file's suggested name and the instructions for what
to do with its contents, making clear they *replace* what was there
before ...

Fixed some typos and related ugliness.

Change-Id: Iacd186c0003227d657099716262eb3a89c9e5f1b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
This commit is contained in:
Edward Welbourne 2019-02-20 12:17:19 +01:00
parent ed66c932b1
commit 40d9ac93e0

View File

@ -57,15 +57,15 @@ int main(int argc, char **argv) {
QCoreApplication app(argc, argv);
if (argc < 3) {
printf("\nusage: %s inputFile outputFile\n\n", argv[0]);
printf("\nUsage: ./%s inputFile outputFile\n\n", argv[0]);
printf("'inputFile' should be a list of effective TLDs, one per line,\n");
printf("as obtained from http://publicsuffix.org . To create indices and data file\n");
printf("as obtained from http://publicsuffix.org/. To create indices and data\n");
printf("file, do the following:\n\n");
printf(" wget https://publicsuffix.org/list/effective_tld_names.dat -O effective_tld_names.dat\n");
printf(" grep '^[^\\/\\/]' effective_tld_names.dat > effective_tld_names.dat.trimmed\n");
printf(" %s effective_tld_names.dat.trimmed effective_tld_names.dat.qt\n\n", argv[0]);
printf("Now copy the data from effective_tld_names.dat.qt to the file src/corelib/io/qurltlds_p.h in your Qt repo\n\n");
exit(1);
printf(" wget https://publicsuffix.org/list/public_suffix_list.dat -O public_suffix_list.dat\n");
printf(" grep -v '^//' public_suffix_list.dat | grep . > public_suffix_list.dat.trimmed\n");
printf(" ./%s public_suffix_list.dat.trimmed public_suffix_list.cpp\n\n", argv[0]);
printf("Now replace the code in qtbase/src/corelib/io/qurltlds_p.h with public_suffix_list.cpp's contents\n\n");
return 1;
}
QFile file(argv[1]);
QFile outFile(argv[2]);