| > Exactly. Most of the callbacks are issued, while an HTML
> page is analyzed or while links are checked if they should
> be included in the mirror. In other words, it's pretty
> low level stuff
I add the following: httrack (the commandline tool),
winhttrack (the windoz GUI) and webhttrack are all "simple"
programs, that link to libhttrack, registering their
callbacks.
Here's the httrack.c main() function:
int main(int argc, char **argv) {
int ret = 0;
hts_init(); // initialize libhttrack
// register our callbacks
htswrap_add("init",htsshow_init);
htswrap_add("free",htsshow_uninit);
htswrap_add("start",htsshow_start);
...
htswrap_add("receive-header", htsshow_receiveheader);
// launch
ret = hts_main(argc,argv);
if (ret) {
fprintf(stderr, "* %s\n", hts_errmsg());
}
return ret;
}
.. and that's all. WinHTTrack and WebHTTrack almost do the
same, except that the callbacks are very differents: they
all build a commandline, initialize the library, register
callbacks, and start the engine.
(BTW, reading httrack.c is a good tutorial for writing a
GUI for httrack :) )
| |