From 40d9ac93e0bf974439ae2abecbcc979c7dc9d06d Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Wed, 20 Feb 2019 12:17:19 +0100 Subject: 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 --- util/corelib/qurl-generateTLDs/main.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'util/corelib/qurl-generateTLDs') diff --git a/util/corelib/qurl-generateTLDs/main.cpp b/util/corelib/qurl-generateTLDs/main.cpp index 7268fb077a..e1fe97646f 100644 --- a/util/corelib/qurl-generateTLDs/main.cpp +++ b/util/corelib/qurl-generateTLDs/main.cpp @@ -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]); -- cgit v1.2.3