[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] further help needed!!

From: Darshit Shah
Subject: Re: [Bug-wget] further help needed!!
Date: Tue, 8 May 2018 10:31:48 +0200
User-agent: NeoMutt/20180323


Please do not create a separate thread when replying to a previous email.
It makes it hard for us to keep track of the context.

Answering inline...

* Sameeran Joshi <address@hidden> [180506 16:16]:
> thanks for u r address@hidden Shah
> 1.GOAL:To learn the internal logic of simple wget command 'wget
> www.google.com' and get acquainted with the code base of any open source
> project

This command looks simple, but in reality a lot goes on underneath.
If you're interested in the logic, I would suggest you start from the main()
function in `src/wget.c` and follow the logic. Dig deeper into any function
call which you think leads to downloading the web-page.

Hint: The actual download is always done on a separate thread. Look for the
thread function calls.

> 2.how do you come to know which directory contains what and does what,

Usually, we try to keep the naming pretty accurate. So, if you see a directory
called, `libwget`, it contains the source for "libwget". Similarly, if a file
is called, "http_highlevel.c", then there's a fairly good chance that the file
contains the highlevel HTTP API. Now, what is highlevel may be ambiguous, but
that is something you'll just have to look for.

In general, follow the names.

>  2.A.while looking at /docs I found it dosen't contain the documentation
> which tells you about the structure and use of functions

Run `make` first. It will build the libwget API documentation.

>  2.B.googling out gives me this
>     https://www.gnu.org/software/wget/manual/wget.html#Wgetrc-Location
>     which too tells about the use of wget
That's for Wget 1.x, not Wget2. 


Firstly, please remember that on the internet, ALL CAPS is considered shouting
and it generally frowned upon.

Specifically what kind of documentation are you looking for? If you simply want
to use the libwget API, you can take a look at 

This should also serve as decent documentation for understanding what function
does what.

You can build this documentation locally using `make` as well.

> 3.Are there any kind of algorithms or flowcharts describing the working of
> the file?,as it would be easy rather to dive into code to understand it
> better.

Sadly, nope. We don't have any design documentation. You'll just have to wade
through the code to figure it out. If you're stuck on something, you can ask on
the mailing lists / IRC.

Any help / efforts on improving the documentation are definitely appreciated :)

Thanking You,
Darshit Shah
PGP Fingerprint: 7845 120B 07CB D8D6 ECE5 FF2B 2A17 43ED A91A 35B6

Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]