Wadseeker is a library for searching for and automatically downloading a list of mods for Doom (1993). Wadseeker requires a small subset of the Qt Toolkit, namely the QtCore and QtNetwork modules. In addition, to interact with Wadseeker, you will need to use Qt to connect to the signals.
The steps required for use are:
Observe the following example on how to do these things.
Wadseeker runs asynchronously. Wadseeker::startSeek() launches the seek session and returns true
when the seek starts. Then Wadseeker operates within the Qt's event loop: it navigates the Web, parses WWW sites looking for links, downloads the files and archives, installs or unpacks them. When it's done, successful or not, it emits the Wadseeker::allDone() signal.
Any Wadseeker options must be set before Wadseeker::startSeek() is called. Once the seek session starts, any changes to the options are ignored for the currently running session.
The documentation often refers to "WADs", and the name of the library is "Wadseeker", but the library is not just limited to WAD files. It can download anything that constitutes a Doom mod. So, wherever you see "WAD", in reality it also means "PK3" or even "DEH". It will also install unpacked "ZIP" or "7z" archives if they are listed by their exact name and extension.
Wadseeker belongs to a type of tools known as Web spiders (or Web crawlers). It's specialized towards searching (scraping) websites, looking for links to Doom WADs.
When Wadseeker is in this process of scraping the Web, it is called to be in a "seek session".
Before a "seek session" can start, Wadseeker must first be told which WADs to look for – it's not designed to just go and download everything it encounters. Having the list of WADs to get, Wadseeker starts the search. For this purpose, it has an embedded (hardcoded) list of WAD hosting websites it will first go to if not told otherwise. This is where a seek session starts usually.
If the link it navigates to goes to a website, it scrapes this website looking for links that may lead to the seeked WADs. When it finds a link it suspects to lead to the WAD download, it navigates to it and checks if this link is another website or a binary file.
If the link goes to another website, Wadseeker continues the scraping on that website. It will also follow HTTP redirects. However, there's a limit for such link chains. Wadseeker doesn't let itself be led on a goose chase by prankster Webmasters ;).
If the link goes to a binary file, Wadseeker attempts to install it in the specified target directory. Downloaded files whose filenames match the seeked WADs exactly are saved in the directory as-is. Archives are unpacked and scanned for the seeked WADs. Downloads that do not match the seeked WADs are discarded.
Wadseeker declares that the "seek session" is completed when it either finds and installs all WADs that were requested (a success), or when it runs out of links to go to and websites to scrape (a failure). It can also be aborted prematurely on demand.
Aside from scraping websites, Wadseeker can also contact the API of the /idgames Archive and get the WADs from there.
It can also happen that Wadseeker's seek session is configured with a custom link going directly to the desired WAD. In such case, the Web scraping is bypassed. Wadseeker may still do it, but its results may be discarded, as Wadseeker will immediately go for the direct download.
Mod-Guns.wad
, and this file belongs to a multi-file mod named "Mod". The author of "Mod" has put all this mod's files in an archive named "Mod.7z". Wadseeker has no knowledge of the structure of this particular mod (or any mods, really) and will not know to look for Mod-Guns.wad
in Mod.7z
. This limitation can be circumvented by looking for both Mod.wad
(provided that there is Mod.wad
in Mod.7z
) and Mod-Guns.wad
in a single seek session. Wadseeker will download Mod.7z
looking for Mod.wad
and, by chance, find Mod-Guns.wad
there also.