summaryrefslogtreecommitdiff
path: root/src/htshelp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/htshelp.c')
-rw-r--r--src/htshelp.c622
1 files changed, 622 insertions, 0 deletions
diff --git a/src/htshelp.c b/src/htshelp.c
new file mode 100644
index 0000000..3d743fe
--- /dev/null
+++ b/src/htshelp.c
@@ -0,0 +1,622 @@
+/* ------------------------------------------------------------ */
+/*
+HTTrack Website Copier, Offline Browser for Windows and Unix
+Copyright (C) Xavier Roche and other contributors
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+
+Important notes:
+
+- We hereby ask people using this source NOT to use it in purpose of grabbing
+emails addresses, or collecting any other private information on persons.
+This would disgrace our work, and spoil the many hours we spent on it.
+
+
+Please visit our Website: http://www.httrack.com
+*/
+
+
+/* ------------------------------------------------------------ */
+/* File: httrack.c subroutines: */
+/* command-line help system */
+/* Author: Xavier Roche */
+/* ------------------------------------------------------------ */
+
+#include "htshelp.h"
+
+/* specific definitions */
+#include "htsbase.h"
+#include "htscoremain.h"
+#include "htscatchurl.h"
+#include "htslib.h"
+#include "htsalias.h"
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#if HTS_WIN
+#else
+#include <unistd.h>
+#endif
+/* END specific definitions */
+
+#define waitkey if (more) { char s[4]; printf("\nMORE.. q to quit\n"); linput(stdin,s,4); if (strcmp(s,"q")==0) quit=1; else printf("Page %d\n\n",++m); }
+void infomsg(char* msg) {
+ int l=0;
+ int m=0;
+ int more=0;
+ int quit=0;
+ int done=0;
+ //
+ if (msg==NULL)
+ quit=0;
+ if (msg) {
+ if (!quit) {
+ if (strlen(msg)==1) {
+ if (msg[0]=='1') {
+ more=1;
+ return;
+ }
+ }
+
+ /* afficher alias? */
+ if (((int)strlen(msg)) > 4) {
+ if (msg[0]==' ') {
+ if (msg[2]!=' ') {
+ if ((msg[3]==' ') || (msg[4]==' ')) {
+ char cmd[32]="-";
+ int p=0;
+ while(cmd[p]==' ') p++;
+ sscanf(msg+p,"%s",cmd+strlen(cmd));
+ /* clears cN -> c */
+ if ((p=strlen(cmd))>2)
+ if (cmd[p-1]=='N')
+ cmd[p-1]='\0';
+ /* finds alias (if any) */
+ p=optreal_find(cmd);
+ if (p>=0) {
+ /* fings type of parameter: number,param,param concatenated,single cmd */
+ if (strcmp(opttype_value(p),"param") == 0)
+ printf("%s (--%s[=N])\n",msg,optalias_value(p));
+ else if (strcmp(opttype_value(p),"param1") == 0)
+ printf("%s (--%s <param>)\n",msg,optalias_value(p));
+ else if (strcmp(opttype_value(p),"param0") == 0)
+ printf("%s (--%s<param>)\n",msg,optalias_value(p));
+ else
+ printf("%s (--%s)\n",msg,optalias_value(p));
+ done=1;
+ }
+ }
+ }
+ }
+ }
+
+ /* sinon */
+ if (!done)
+ printf("%s\n",msg);
+ l++;
+ if (l>20) {
+ l=0;
+ waitkey;
+ }
+ }
+ }
+}
+void help_wizard(httrackp* opt) {
+ char* urls = (char*) malloc(HTS_URLMAXSIZE*2);
+ char* mainpath = (char*) malloc(256);
+ char* projname = (char*) malloc(256);
+ char* stropt = (char*) malloc(2048); // options
+ char* stropt2 = (char*) malloc(2048); // options longues
+ char* strwild = (char*) malloc(2048); // wildcards
+ char* cmd = (char*) malloc(4096);
+ char* str = (char*) malloc(256);
+ char** argv = (char**) malloc(256 * sizeof(char*));
+ //
+ char* a;
+ //
+ if (urls == NULL || mainpath == NULL || projname == NULL || stropt == NULL
+ || stropt2 == NULL || strwild == NULL || cmd == NULL || str == NULL || argv == NULL) {
+ fprintf(stderr, "* memory exhausted in %s, line %d\n", __FILE__, __LINE__);
+ return;
+ }
+ urls[0] = mainpath[0] = projname[0] = stropt[0] = stropt2[0] = strwild[0] = cmd[0] = str[0] = '\0';
+ //
+ strcpy(stropt,"-");
+ mainpath[0]=projname[0]=stropt2[0]=strwild[0]='\0';
+ //
+
+ printf("\n");
+ printf("Welcome to HTTrack Website Copier (Offline Browser) "HTTRACK_VERSION"\n");
+ printf("Copyright (C) Xavier Roche and other contributors\n");
+#ifdef _WIN32
+ printf("Note: You are running the commandline version,\n");
+ printf("run 'WinHTTrack.exe' to get the GUI version.\n");
+#endif
+#ifdef HTTRACK_AFF_WARNING
+ printf("NOTE: "HTTRACK_AFF_WARNING"\n");
+#endif
+#ifdef HTS_PLATFORM_NAME
+#if USE_BEGINTHREAD
+ printf("[compiled: "HTS_PLATFORM_NAME" - MT]\n");
+#else
+ printf("[compiled: "HTS_PLATFORM_NAME"]\n");
+#endif
+#endif
+ printf("To see the option list, enter a blank line or try httrack --help\n");
+ //
+ // Project name
+ while(strnotempty(projname)==0) {
+ printf("\n");
+ printf("Enter project name :");
+ fflush(stdout);
+ linput(stdin,projname,250);
+ if (strnotempty(projname)==0)
+ help("httrack",1);
+ }
+ //
+ // Path
+ if (strnotempty(hts_gethome()))
+ printf("\nBase path (return=%s/websites/) :",hts_gethome());
+ else
+ printf("\nBase path (return=current directory) :");
+ linput(stdin,str,250);
+ if (!strnotempty(str)) {
+ strcat(str,hts_gethome());
+ strcat(str,"/websites/");
+ }
+ if (strnotempty(str))
+ if ((str[strlen(str)-1]!='/') && (str[strlen(str)-1]!='\\'))
+ strcat(str,"/");
+ strcat(stropt2,"-O \""); strcat(stropt2,str); strcat(stropt2,projname); strcat(stropt2,"\" ");
+ // Créer si ce n'est fait un index.html 1er niveau
+ make_empty_index(str);
+ //
+ printf("\n");
+ printf("Enter URLs (separated by commas or blank spaces) :");
+ fflush(stdout);
+ linput(stdin,urls,250);
+ if (strnotempty(urls)) {
+ while( (a=strchr(urls,',')) ) *a=' ';
+ while( (a=strchr(urls,'\t')) ) *a=' ';
+
+ // Action
+ printf("\nAction:\n");
+ switch(help_query("Mirror Web Site(s)|Mirror Web Site(s) with Wizard|Just Get Files Indicated|Mirror ALL links in URLs (Multiple Mirror)|Test Links In URLs (Bookmark Test)|Update/Continue a Mirror",1)) {
+ case 1: break;
+ case 2: strcat(stropt,"W"); break;
+ case 3: strcat(stropt2,"--get "); break;
+ case 4: strcat(stropt2,"--mirrorlinks "); break;
+ case 5: strcat(stropt2,"--testlinks "); break;
+ case 6: strcat(stropt2,"--update "); break;
+ case 0: return; break;
+ }
+
+ // Proxy
+ printf("\nProxy (return=none) :");
+ linput(stdin,str,250);
+ if (strnotempty(str)) {
+ while( (a=strchr(str,' ')) ) *a=':'; // port
+ if (!strchr(jump_identification(str),':')) {
+ char str2[256];
+ printf("\nProxy port (return=8080) :");
+ linput(stdin,str2,250);
+ strcat(str,":");
+ if (strnotempty(str2)==0)
+ strcat(str,"8080");
+ else
+ strcat(str,str2);
+ }
+ strcat(stropt2,"-P "); strcat(stropt2,str); strcat(stropt2," ");
+ }
+
+ // Display
+ strcat(stropt2," -%v ");
+
+ // Wildcards
+ printf("\nYou can define wildcards, like: -*.gif +www.*.com/*.zip -*img_*.zip\n");
+ printf("Wildcards (return=none) :");
+ linput(stdin,strwild,250);
+
+ // Options
+ do {
+ printf("\nYou can define additional options, such as recurse level (-r<number>), separed by blank spaces\n");
+ printf("To see the option list, type help\n");
+ printf("Additional options (return=none) :");
+ linput(stdin,str,250);
+ if (strfield2(str,"help")) {
+ help("httrack",2);
+ } else if (strnotempty(str)) {
+ strcat(stropt2,str);
+ strcat(stropt2," ");
+ }
+ } while(strfield2(str,"help"));
+
+ {
+ int argc=1;
+ int g=0;
+ int i=0;
+ //
+ printf("\n");
+ if (strlen(stropt)==1)
+ stropt[0]='\0'; // aucune
+ sprintf(cmd,"%s %s %s %s",urls,stropt,stropt2,strwild);
+ printf("---> Wizard command line: httrack %s\n\n",cmd);
+ printf("Ready to launch the mirror? (Y/n) :");
+ fflush(stdout);
+ linput(stdin,str,250);
+ if (strnotempty(str)) {
+ if (!((str[0]=='y') || (str[0]=='Y')))
+ exit(0);
+ }
+ printf("\n");
+
+ // couper en morceaux
+ argv[0]="winhttrack";
+ argv[1]=cmd;
+ argc++;
+ while(cmd[i]) {
+ if(cmd[i]=='\"') g=!g;
+ if(cmd[i]==' '){
+ if(!g){
+ cmd[i]='\0';
+ argv[argc++]=cmd+i+1;
+ }
+ }
+ i++;
+ }
+#if HTS_ANALYSTE
+ hts_main(argc,argv);
+#else
+ main(argc,argv);
+#endif
+ }
+ //} else {
+ // help("httrack",1);
+ }
+
+ /* Free buffers */
+ free(urls);
+ free(mainpath);
+ free(projname);
+ free(stropt);
+ free(stropt2);
+ free(strwild);
+ free(cmd);
+ free(str);
+}
+int help_query(char* list,int def) {
+ char s[256];
+ char* a;
+ int opt;
+ int n=1;
+ a=list;
+ while(strnotempty(a)) {
+ char* b = strchr(a,'|');
+ if (b) {
+ char str[256];
+ str[0]='\0';
+ //
+ strncat(str,a,(int) (b - a));
+ if (n==def)
+ printf("(enter)\t%d\t%s\n",n++,str);
+ else
+ printf("\t%d\t%s\n",n++,str);
+ a=b+1;
+ } else
+ a=list+strlen(list);
+ }
+ printf("\t0\tQuit");
+ do {
+ printf("\n: ");
+ fflush(stdout);
+ linput(stdin,s,250);
+ } while ((strnotempty(s)!=0) && (sscanf(s,"%d",&opt)!=1));
+ if (strnotempty(s))
+ return opt;
+ else
+ return def;
+}
+
+// Capture d'URL
+void help_catchurl(char* dest_path) {
+ char adr_prox[HTS_URLMAXSIZE*2];
+ int port_prox;
+ T_SOC soc=catch_url_init_std(&port_prox,adr_prox);
+ if (soc!=INVALID_SOCKET) {
+ char url[HTS_URLMAXSIZE*2];
+ char method[32];
+ char data[32768];
+ url[0]=method[0]=data[0]='\0';
+ //
+ printf("Okay, temporary proxy installed.\nSet your browser's preferences to:\n\n");
+ printf("\tProxy's address: \t%s\n\tProxy's port: \t%d\n",adr_prox,port_prox);
+ //
+ if (catch_url(soc,url,method,data)) {
+ char dest[HTS_URLMAXSIZE*2];
+ int i=0;
+ do {
+ sprintf(dest,"%s%s%d",dest_path,"hts-post",i);
+ i++;
+ } while(fexist(dest));
+ {
+ FILE* fp=fopen(dest,"wb");
+ if (fp) {
+ fwrite(data,strlen(data),1,fp);
+ fclose(fp);
+ }
+ }
+ // former URL!
+ {
+ char finalurl[HTS_URLMAXSIZE*2];
+ escape_check_url(dest);
+ sprintf(finalurl,"%s"POSTTOK"file:%s",url,dest);
+ printf("\nThe URL is: \"%s\"\n",finalurl);
+ printf("You can capture it through: httrack \"%s\"\n",finalurl);
+ }
+ } else
+ printf("Unable to analyse the URL\n");
+#ifdef _WIN32
+ closesocket(soc);
+#else
+ close(soc);
+#endif
+ } else
+ printf("Unable to create a temporary proxy (no remaining port)\n");
+}
+
+// Créer un index.html vide
+void make_empty_index(char* str) {
+#if 0
+ if (!fexist(fconcat(str,"index.html"))) {
+ FILE* fp=fopen(fconcat(str,"index.html"),"wb");
+ if (fp) {
+ fprintf(fp,"<!-- "HTS_TOPINDEX" -->"CRLF);
+ fprintf(fp,"<HTML><BODY>Index is empty!<BR>(File used to index all HTTrack projects)</BODY></HTML>"CRLF);
+ fclose(fp);
+ }
+ }
+#endif
+}
+
+// mini-aide (h: help)
+// y
+void help(char* app,int more) {
+ infomsg("");
+ if (more)
+ infomsg("1");
+ if (more != 2) {
+ char info[2048];
+ infomsg("HTTrack version "HTTRACK_VERSION" (compiled "__DATE__")");
+#ifdef HTTRACK_AFF_WARNING
+ infomsg("NOTE: "HTTRACK_AFF_WARNING);
+#endif
+ sprintf(info,"\tusage: %s <URLs> [-option] [+<FILTERs>] [-<FILTERs>]",app);
+ infomsg(info);
+ infomsg("\twith options listed below: (* is the default value)");
+ infomsg("");
+ }
+ infomsg("General options:");
+ infomsg(" O path for mirror/logfiles+cache (-O path_mirror[,path_cache_and_logfiles])");
+#ifndef HTS_WIN
+ infomsg(" %O chroot path to, must be r00t (-%O root_path)");
+#endif
+ infomsg("");
+ infomsg("Action options:");
+ infomsg(" w *mirror web sites");
+ infomsg(" W mirror web sites, semi-automatic (asks questions)");
+ infomsg(" g just get files (saved in the current directory)");
+ infomsg(" i continue an interrupted mirror using the cache");
+ infomsg(" Y mirror ALL links located in the first level pages (mirror links)");
+ infomsg("");
+ infomsg("Proxy options:");
+ infomsg(" P proxy use (-P proxy:port or -P user:pass@proxy:port)");
+ infomsg(" %f *use proxy for ftp (f0 don't use)");
+ infomsg("");
+ infomsg("Limits options:");
+ infomsg(" rN set the mirror depth to N (* r9999)");
+ infomsg(" %eN set the external links depth to N (* %e0)");
+ infomsg(" mN maximum file length for a non-html file");
+ infomsg(" mN,N2 maximum file length for non html (N) and html (N2)");
+ infomsg(" MN maximum overall size that can be uploaded/scanned");
+ infomsg(" EN maximum mirror time in seconds (60=1 minute, 3600=1 hour)");
+ infomsg(" AN maximum transfer rate in bytes/seconds (1000=1KB/s max)");
+ infomsg(" %cN maximum number of connections/seconds (*%c10)");
+ infomsg(" GN pause transfer if N bytes reached, and wait until lock file is deleted");
+ infomsg("");
+ infomsg("Flow control:");
+ infomsg(" cN number of multiple connections (*c8)");
+ infomsg(" TN timeout, number of seconds after a non-responding link is shutdown");
+ infomsg(" RN number of retries, in case of timeout or non-fatal errors (*R1)");
+ infomsg(" JN traffic jam control, minimum transfert rate (bytes/seconds) tolerated for a link");
+ infomsg(" HN host is abandonned if: 0=never, 1=timeout, 2=slow, 3=timeout or slow");
+ infomsg("");
+ infomsg("Links options:");
+ infomsg(" %P *extended parsing, attempt to parse all links, even in unknown tags or Javascript (%P0 don't use)");
+ infomsg(" n get non-html files 'near' an html file (ex: an image located outside)");
+ infomsg(" t test all URLs (even forbidden ones)");
+ infomsg(" %L <file> add all URL located in this text file (one URL per line)");
+ infomsg("");
+ infomsg("Build options:");
+ infomsg(" NN structure type (0 *original structure, 1+: see below)");
+ infomsg(" or user defined structure (-N \"%h%p/%n%q.%t\")");
+ infomsg(" LN long names (L1 *long names / L0 8-3 conversion / L2 ISO9660 compatible)");
+ infomsg(" KN keep original links (e.g. http://www.adr/link) (K0 *relative link, K absolute links, K4 original links, K3 absolute URI links)");
+ infomsg(" x replace external html links by error pages");
+ infomsg(" %x do not include any password for external password protected websites (%x0 include)");
+ infomsg(" %q *include query string for local files (useless, for information purpose only) (%q0 don't include)");
+ infomsg(" o *generate output html file in case of error (404..) (o0 don't generate)");
+ infomsg(" X *purge old files after update (X0 keep delete)");
+ infomsg(" %p preserve html files 'as is' (identical to '-K4 -%F \"\"')");
+ infomsg("");
+ infomsg("Spider options:");
+ infomsg(" bN accept cookies in cookies.txt (0=do not accept,* 1=accept)");
+ infomsg(" u check document type if unknown (cgi,asp..) (u0 don't check, * u1 check but /, u2 check always)");
+ infomsg(" j *parse Java Classes (j0 don't parse)");
+ infomsg(" sN follow robots.txt and meta robots tags (0=never,1=sometimes,* 2=always)");
+ infomsg(" %h force HTTP/1.0 requests (reduce update features, only for old servers or proxies)");
+ infomsg(" %B tolerant requests (accept bogus responses on some servers, but not standard!)");
+ infomsg(" %s update hacks: various hacks to limit re-transfers when updating (identical size, bogus response..)");
+ infomsg(" %A assume that a type (cgi,asp..) is always linked with a mime type (-%A php3,cgi=text/html;dat,bin=application/x-zip)");
+ infomsg(" shortcut: '--assume standard' is equivalent to -%A "HTS_ASSUME_STANDARD);
+ infomsg(" @iN internet protocol (0=both ipv6+ipv4, 4=ipv4 only, 6=ipv6 only)");
+ infomsg("");
+ infomsg("Browser ID:");
+ infomsg(" F user-agent field (-F \"user-agent name\")");
+ infomsg(" %F footer string in Html code (-%F \"Mirrored [from host %s [file %s [at %s]]]\"");
+ infomsg(" %l preffered language (-%l \"fr, en, jp, *\"");
+ infomsg("");
+ infomsg("Log, index, cache");
+ infomsg(" C create/use a cache for updates and retries (C0 no cache,C1 cache is prioritary,* C2 test update before)");
+ infomsg(" k store all files in cache (not useful if files on disk)");
+ infomsg(" %n do not re-download locally erased files");
+ infomsg(" %v display on screen filenames downloaded (in realtime) - * %v1 short version");
+ infomsg(" Q no log - quiet mode");
+ infomsg(" q no questions - quiet mode");
+ infomsg(" z log - extra infos");
+ infomsg(" Z log - debug");
+ infomsg(" v log on screen");
+ infomsg(" f *log in files");
+ infomsg(" f2 one single log file");
+ infomsg(" I *make an index (I0 don't make)");
+ infomsg(" %I make an searchable index for this mirror (* %I0 don't make)");
+ infomsg("");
+ infomsg("Expert options:");
+ infomsg(" pN priority mode: (* p3)");
+ infomsg(" p0 just scan, don't save anything (for checking links)");
+ infomsg(" p1 save only html files");
+ infomsg(" p2 save only non html files");
+ infomsg(" *p3 save all files");
+ infomsg(" p7 get html files before, then treat other files");
+ infomsg(" S stay on the same directory");
+ infomsg(" D *can only go down into subdirs");
+ infomsg(" U can only go to upper directories");
+ infomsg(" B can both go up&down into the directory structure");
+ infomsg(" a *stay on the same address");
+ infomsg(" d stay on the same principal domain");
+ infomsg(" l stay on the same TLD (eg: .com)");
+ infomsg(" e go everywhere on the web");
+ infomsg(" %H debug HTTP headers in logfile");
+ infomsg("");
+ infomsg("Guru options: (do NOT use if possible)");
+ infomsg(" #0 Filter test (-#0 '*.gif' 'www.bar.com/foo.gif')");
+ infomsg(" #f Always flush log files");
+ infomsg(" #FN Maximum number of filters");
+ infomsg(" #h Version info");
+ infomsg(" #K Scan stdin (debug)");
+ infomsg(" #L Maximum number of links (-#L1000000)");
+ infomsg(" #p Display ugly progress information");
+ infomsg(" #P Catch URL");
+ infomsg(" #R Old FTP routines (debug)");
+ infomsg(" #T Generate transfer ops. log every minutes");
+ infomsg(" #u Wait time");
+ infomsg(" #Z Generate transfer rate statictics every minutes");
+ infomsg(" #! Execute a shell command (-#! \"echo hello\")");
+ infomsg("");
+ infomsg("Command-line specific options:");
+ infomsg(" V execute system command after each files ($0 is the filename: -V \"rm \\$0\")");
+ infomsg(" %U run the engine with another id when called as root (-%U smith)");
+ /* infomsg(" %O do a chroot before setuid"); */
+ infomsg("");
+ infomsg("Details: Option N");
+ infomsg(" N0 Site-structure (default)");
+ infomsg(" N1 HTML in web/, images/other files in web/images/");
+ infomsg(" N2 HTML in web/HTML, images/other in web/images");
+ infomsg(" N3 HTML in web/, images/other in web/");
+ infomsg(" N4 HTML in web/, images/other in web/xxx, where xxx is the file extension (all gif will be placed onto web/gif, for example)");
+ infomsg(" N5 Images/other in web/xxx and HTML in web/HTML");
+ infomsg(" N99 All files in web/, with random names (gadget !)");
+ infomsg(" N100 Site-structure, without www.domain.xxx/");
+ infomsg(" N101 Identical to N1 exept that \"web\" is replaced by the site's name");
+ infomsg(" N102 Identical to N2 exept that \"web\" is replaced by the site's name");
+ infomsg(" N103 Identical to N3 exept that \"web\" is replaced by the site's name");
+ infomsg(" N104 Identical to N4 exept that \"web\" is replaced by the site's name");
+ infomsg(" N105 Identical to N5 exept that \"web\" is replaced by the site's name");
+ infomsg(" N199 Identical to N99 exept that \"web\" is replaced by the site's name");
+ infomsg(" N1001 Identical to N1 exept that there is no \"web\" directory");
+ infomsg(" N1002 Identical to N2 exept that there is no \"web\" directory");
+ infomsg(" N1003 Identical to N3 exept that there is no \"web\" directory (option set for g option)");
+ infomsg(" N1004 Identical to N4 exept that there is no \"web\" directory");
+ infomsg(" N1005 Identical to N5 exept that there is no \"web\" directory");
+ infomsg(" N1099 Identical to N99 exept that there is no \"web\" directory");
+ infomsg("Details: User-defined option N");
+ infomsg(" '%n' Name of file without file type (ex: image)");
+ infomsg(" '%N' Name of file, including file type (ex: image.gif)");
+ infomsg(" '%t' File type (ex: gif)");
+ infomsg(" '%p' Path [without ending /] (ex: /someimages)");
+ infomsg(" '%h' Host name (ex: www.someweb.com)");
+ infomsg(" '%M' URL MD5 (128 bits, 32 ascii bytes)");
+ infomsg(" '%Q' query string MD5 (128 bits, 32 ascii bytes)");
+ infomsg(" '%q' small query string MD5 (16 bits, 4 ascii bytes)");
+ infomsg(" '%s?' Short name version (ex: %sN)");
+ infomsg(" '%[param]' param variable in query string");
+ infomsg("");
+ infomsg("Details: Option K");
+ infomsg(" K0 foo.cgi?q=45 -> foo4B54.html?q=45 (relative URI, default)");
+ infomsg(" K -> http://www.foobar.com/folder/foo.cgi?q=45 (absolute URL)");
+ infomsg(" K4 -> foo.cgi?q=45 (original URL)");
+ infomsg(" K3 -> /folder/foo.cgi?q=45 (absolute URI)");
+ infomsg("");
+ infomsg("Shortcuts:");
+ infomsg("--mirror <URLs> *make a mirror of site(s) (default)");
+ infomsg("--get <URLs> get the files indicated, do not seek other URLs (-qg)");
+ infomsg("--list <text file> add all URL located in this text file (-%L)");
+ infomsg("--mirrorlinks <URLs> mirror all links in 1st level pages (-Y)");
+ infomsg("--testlinks <URLs> test links in pages (-r1p0C0I0t)");
+ infomsg("--spider <URLs> spider site(s), to test links: reports Errors & Warnings (-p0C0I0t)");
+ infomsg("--testsite <URLs> identical to --spider");
+ infomsg("--skeleton <URLs> make a mirror, but gets only html files (-p1)");
+ infomsg("--update update a mirror, without confirmation (-iC2)");
+ infomsg("--continue continue a mirror, without confirmation (-iC1)");
+ infomsg("");
+ infomsg("--catchurl create a temporary proxy to capture an URL or a form post URL");
+ infomsg("--clean erase cache & log files");
+ infomsg("");
+ infomsg("--http10 force http/1.0 requests (-%h)");
+ infomsg("");
+ infomsg("");
+ infomsg("example: httrack www.someweb.com/bob/");
+ infomsg("means: mirror site www.someweb.com/bob/ and only this site");
+ infomsg("");
+ infomsg("example: httrack www.someweb.com/bob/ www.anothertest.com/mike/ +*.com/*.jpg");
+ infomsg("means: mirror the two sites together (with shared links) and accept any .jpg files on .com sites");
+ infomsg("");
+ infomsg("example: httrack www.someweb.com/bob/bobby.html +* -r6");
+ infomsg("means get all files starting from bobby.html, with 6 link-depth, and possibility of going everywhere on the web");
+ infomsg("");
+ infomsg("example: httrack www.someweb.com/bob/bobby.html --spider -P proxy.myhost.com:8080");
+ infomsg("runs the spider on www.someweb.com/bob/bobby.html using a proxy");
+ infomsg("");
+ infomsg("example: httrack --update");
+ infomsg("updates a mirror in the current folder");
+ infomsg("");
+ infomsg("example: httrack");
+ infomsg("will bring you to the interactive mode");
+ infomsg("");
+ infomsg("example: httrack --continue");
+ infomsg("continues a mirror in the current folder");
+ infomsg("");
+ infomsg("HTTrack version "HTTRACK_VERSION" (compiled "__DATE__")");
+ infomsg("Copyright (C) Xavier Roche and other contributors");
+#ifdef HTS_PLATFORM_NAME
+ infomsg("[compiled: "HTS_PLATFORM_NAME"]");
+#endif
+ infomsg(NULL);
+
+// infomsg(" R *relative links (e.g ../link)\n");
+// infomsg(" A absolute links (e.g /www.adr/link)\n");
+}
+
+