I am looking at the following code in /staticimporter/code/StaticImporter.php:
// STEP 1
/**
* Downloads a website using wget.
*/
function doDownload() {
$url = self::$url;
if(!$url) {
trigger_error('StaticImporter URL was not set.', E_USER_ERROR);
}
// Create the accepted extensions argument to pass to wget
$accepted = array();
foreach(self::$allowed_extensions as $extension) {
$accepted[] = "*.$extension";
}
$acceptedTxt = implode(',', $accepted);
if(!file_exists('../assets/staticimport')) {
mkdir('../assets/staticimport');
$command = "wget -r -nH --directory-prefix=../assets/staticimport -A "
. escapeshellarg($acceptedTxt) . ' ' . escapeshellarg($url);
echo "<p>Running $command</p>";
exec($command);
echo "<p><b>Done!</b></p>";
} else {
echo '<p><b>Site already downloaded.</b></p>';
}
}
I see the command for wget. I am able to use wget my self, with command line. I have successfully downloaded and processed a couple sites using the regular windows Command Prompt. However, I want to use the StaticImporter as it is intended. So, I am wondering, is there a config setting in the plugin, so that it knows where the local wget is?
In my case, I have two installations of wget now:
C:\Program Files\GnuWin32\bin\
C:\Wget\
The first was with the Windows installer version (already mentioned) and the second was with the standard version here:
http://www.christopherlewis.com/WGet/WGetFiles.htm