if (/Firefox\/[23]/.test(navigator.userAgent)){
alert("OutWit wizards cannot run on your version of Firefox. Please update to the current version and try again.");
wizard.close();
} else if (!("witscript" in window) || !witscript.version || !witscript.version("2.0.1")){
alert("This wizard is not compatible with your version of the OutWit Kernel. Please download the latest version (2.0.1 or higher)");
wizard.close();
}
if(witscript.version("2.1")){$(".owui-wizard-homelink").html("Hub Tutorials")};
userSpace.setWizardPreferences();
wizardKit.say(this.parentNode);
Version 2.0 - New Features
The present tutorial is destined to users of OutWit Hub 1.0 who want an idea of the novelties in this version.
If you do not know the application and want to discover the main functions, you should start with the "Quick Overview" tutorial.
$("#warning").html("");
wizardKit.say(this.parentNode);
OutWit's built-in Tutorial and Wizard System.
The first important addition of this version is the WitScript Engine, which allows us to create tutorials like this one. WitScript will become a very powerful environment allowing complex extraction scripts, automatic explorations and conditional actions. We have started producing a collection of tutorials to help you discover the important functions of the Hub.
wizardKit.say(this.parentNode);
While this window is showing instructions, the user interface of OutWit Hub remains operational.
if(!witscript.version("2.1")){
witscript.wait(500);
witscript.menus.file.open()
var top = wizard.getPosition().top;
var bottom = wizard.getPosition().bottom;
var left = wizard.getPosition().left;
var right = wizard.getPosition().right;
var originalTop = top;
var originalLeft = left;
for(var i= 31;(i > -31) && (top > 0) && (bottom > 0) && (left > 0) && (right > 0) ;i-=3){
top = wizard.getPosition().top;
bottom = wizard.getPosition().bottom;
left = wizard.getPosition().left;
right = wizard.getPosition().right;
wizard.moveBy(8*Math.sin(i/10),5*Math.cos(i/10));
// witscript.wait(0);
}
wizard.moveTo(originalLeft,originalTop);
witscript.wait(500);
}
wizardKit.say(this.parentNode);
You can still interact normally with the application and you can move this tutorial window around on the screen to see the parts of the interface that you want.
userSpace.generalFeatures = [];
userSpace.generalFeatures.push({title : "Disabling Images and Plugins.", description : "If you wish to cut as many unnecessary processes as possible to save time on long extractions, a right-click on 'page' in the side bar allows you to set or disable images and plugins like flash..."});
if(userSpace.updateFocusTimer){
window.clearInterval(userSpace.updateFocusTimer)
userSpace.updateFocusTimer = null;
};
var step = Number(wizard.stepNumber());
wizardKit.hideCatch();
wizardKit.hideLog();
witscript.views.page.display();
witscript.menutree.focus();
userSpace.GFList ="";
userSpace.GFDescription = "";
for(var i=0;i <= step;i++){
userSpace.GFList = "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>";
}
userSpace.GFDescription = userSpace.generalFeatures[step].description;
$("#GFList").html(userSpace.GFList);
$("#GFDescription").html(userSpace.GFDescription);
wizardKit.say(this.parentNode);
wizardKit.eyeCatcher(witscript.menutree.treechildren,1,.1,0,-15);
wizardKit.eyeCatcher(witscript.menutree.treechildren,1,.1,0,-15);
General Features
userSpace.generalFeatures.push({title : "Finer temporization and pause preference settings.", description : "Additional settings were added to the time preferences for fine tuning the temporization between queries in fast scraping mode, as well as adding periodic pauses, while scraping large number of URLs."});
var step = Number(wizard.stepNumber());
witscript.views.page.display();
witscript.menutree.focus();
userSpace.GFList = "";
userSpace.GFDescription = "";
for(var i=0;i <= step;i++){
userSpace.GFList = userSpace.GFList + "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>";
}
userSpace.GFDescription = userSpace.generalFeatures[step].description;
$("#GFList").html(userSpace.GFList);
$("#GFDescription").html(userSpace.GFDescription);
wizardKit.say((userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," ")).replace(/paus/g,"pos"));
witscript.openPreferences("TimeSettings");
userSpace.top = wizard.getPosition().top;
userSpace.left = wizard.getPosition().left;
witscript.menus.tools.preferences.click();
userSpace.updateFocusTimer = userSpace.updateFocusTimer|| window.setInterval(userSpace.updateFocus,500);
userSpace.generalFeatures.push({title : "Auto-load the Hub when launching Firefox.", description : "Check the automatic loading preference to instruct Firefox to automatically run OutWit Hub when loading."});
var step = Number(wizard.stepNumber());
witscript.views.page.display();
witscript.menutree.focus();
userSpace.GFList = "";
userSpace.GFDescription = "";
for(var i=0;i <= step;i++){
userSpace.GFList = userSpace.GFList + "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>";
}
userSpace.GFDescription = userSpace.generalFeatures[step].description;
$("#GFList").html(userSpace.GFList);
$("#GFDescription").html(userSpace.GFDescription);
wizardKit.say(userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," "));
witscript.openPreferences("Main");
userSpace.top = wizard.getPosition().top;
userSpace.left = wizard.getPosition().left;
witscript.menus.tools.preferences.click();
userSpace.updateFocusTimer = userSpace.updateFocusTimer || window.setInterval(userSpace.updateFocus,500);
userSpace.generalFeatures.push({title : "Refactoring of all datasheets of the application.", description : "The datasheets are now able to handle hundreds of thousands of rows of data."});
witscript.views.links.display();
wizardKit.showCatch();
var step = Number(wizard.stepNumber());
userSpace.GFList = "";
userSpace.GFDescription = "";
for(var i=0;i <= step;i++){
userSpace.GFList = userSpace.GFList + "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>";
}
userSpace.GFDescription = userSpace.generalFeatures[step].description;
$("#GFList").html(userSpace.GFList);
$("#GFDescription").html(userSpace.GFDescription);
wizardKit.say(userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," "));
window.clearInterval(userSpace.updateFocusTimer);
userSpace.updateFocusTimer = null;
userSpace.generalFeatures.push({title : "Optimized Export.", description : "Performance was dramatically enhanced when exporting large volumes of data. At the bottom of the application's datasheets, you will now find an Export (or Download) button. Its function is the same as the equivallent options in the top and right-click menus."});
witscript.views.links.display();
wizardKit.showCatch();
var step = Number(wizard.stepNumber());
userSpace.GFList = "";
userSpace.GFDescription = "";
for(var i=0;i <= step;i++){
userSpace.GFList = userSpace.GFList + "<li class='note'>"+userSpace.generalFeatures[i].title+"</li>";
}
userSpace.GFDescription = userSpace.generalFeatures[step].description;
$("#GFList").html(userSpace.GFList);
$("#GFDescription").html(userSpace.GFDescription);
wizardKit.say(userSpace.generalFeatures[step].title + "..." + userSpace.generalFeatures[step].description.replace(/<[^<>]+>/g," "));
wizardKit.eyeCatcher(witscript.views.links.bottomPanel.exportButton,1.5,1.5,-10,-5);
wizardKit.eyeCatcher(witscript.catch.exportButton,1.5,1.5,-10,-5);
wizardKit.eyeCatcher(witscript.views.links.bottomPanel.exportButton,1.5,1.5,-10,-5);
wizardKit.eyeCatcher(witscript.catch.exportButton,1.5,1.5,-10,-5);
userSpace.scraperFeatures = [];
userSpace.scraperFeatures.push({title : "Dynamic source scraping.", description : "You can now set a scraper to use either the 'original' source code as downloaded by your browser or the modified 'dynamic' source code as altered by <span pronunciation=''>Javascript</span> scripts. This allows you to scrape AJAX pages that couldn't be scraped before. The dynamic source code is displayed on a pale yellow background. Note that as scripts are not executed in Fast Scraping mode, the dynamic source cannot be used in that mode."});
witscript.views.page.load("http://www.outwit.com");
var step = Number(wizard.stepNumber());
wizardKit.hideCatch();
wizardKit.hideLog();
witscript.views.scrapers.display();
var currentAutomator = witscript.views.scrapers.manager.currentAutomator();
if (currentAutomator && currentAutomator.automatorId == -1) {
witscript.views.scrapers.editor.manageButton.click();
}
if (!userSpace.automatorName || userSpace.automatorName != currentAutomator.name) {
userSpace.automatorName = witscript.views.scrapers.manager.createAutomator("Tutorial - Scraper New Features").currentAutomator().name;
}
witscript.views.scrapers.editor.sourceSelector.static.click()
witscript.menutree.focus();
userSpace.SFList ="";
userSpace.SFDescription = "";
for(var i=0;i <= step;i++){
userSpace.SFList = "<li class='note'>"+userSpace.scraperFeatures[i].title+"</li>";
}
userSpace.SFDescription = userSpace.scraperFeatures[step].description;
$("#SFList").html(userSpace.SFList);
$("#SFDescription").html(userSpace.SFDescription);
wizardKit.say(this.parentNode);
wizardKit.eyeCatcher(witscript.views.scrapers.editor.sourceSelector);
witscript.views.scrapers.editor.sourceSelector.DOM.click()
wizardKit.eyeCatcher(witscript.views.scrapers.editor.sourceSelector);
Scraper Features
userSpace.scraperFeatures.push({title : "Easier Scrapers.", description : "One of the main limitations of the previous scraper system was removed: the same data can be extracted by several lines of the scraper.<br /><br />In this example the Title of the page is extracted twice."});
var step = Number(wizard.stepNumber());
witscript.views.scrapers.display();
userSpace.SFList = "";
userSpace.SFDescription = "";
for(var i=0;i <= step;i++){
userSpace.SFList = userSpace.SFList + "<li class='note'>"+userSpace.scraperFeatures[i].title+"</li>";
}
userSpace.SFDescription = userSpace.scraperFeatures[step].description;
$("#SFList").html(userSpace.SFList);
$("#SFDescription").html(userSpace.SFDescription);
wizardKit.say(userSpace.scraperFeatures[step].title + "..." + userSpace.scraperFeatures[step].description.replace(/<[^<>]+>/g," "));
witscript.views.scrapers.editor.display();
witscript.views.scrapers.editor.datasheet.focus();
witscript.views.scrapers.editor.datasheet.select(0);
wizardKit.eyeCatcher(witscript.views.scrapers.editor,.5,.5,0,0);
wizardKit.typeCellValue(witscript.views.scrapers.editor.datasheet, 0, 2, "Page Title");
wizardKit.typeCellValue(witscript.views.scrapers.editor.datasheet, 0, 3, '<title>');
wizardKit.typeCellValue(witscript.views.scrapers.editor.datasheet, 0, 4, '</title>');
wizardKit.typeCellValue(witscript.views.scrapers.editor.datasheet, 1, 2, "Name");
wizardKit.typeCellValue(witscript.views.scrapers.editor.datasheet, 1, 3, '<title>');
wizardKit.typeCellValue(witscript.views.scrapers.editor.datasheet, 1, 4, ' - ');
witscript.views.scrapers.editor.display();
witscript.menutree.focus();
witscript.views.scrapers.editor.saveButton.click();
//userSpace.scraperFeatures.push({title : "20+ New Directives and Scraper Functions.", description : "Many new directives were added to the scraper toolkit. Here is one of them:<br /><br />#NextPage# allows you to use the data extracted by a scraper line as the Next Page link for automatic browsing. When the scraper is applied, the link replaces the one found automatically by OutWit in the 'Next In Series' and 'Browse' buttons.<br /><br />See the <a href='scrapers' target='help'>help center</a> for the detailed list of all the new directives and functions."});
userSpace.scraperFeatures.push({title : "20+ New Directives and Scraper Functions.", description : "Many new directives were added to the scraper toolkit. Here is one of them:<br /><br />#NextPage# allows you to use the data extracted by a scraper line as the Next Page link for automatic browsing. When the scraper is applied, the link replaces the one found automatically by OutWit in the 'Next In Series' and 'Browse' buttons.<br /><br />See the help center for the detailed list of all the new directives and functions."});
var step = Number(wizard.stepNumber());
witscript.views.scrapers.display();
userSpace.SFList = "";
userSpace.SFDescription = "";
for(var i=0;i <= step;i++){
userSpace.SFList = userSpace.SFList + "<li class='note'>"+userSpace.scraperFeatures[i].title+"</li>";
}
userSpace.SFDescription = userSpace.scraperFeatures[step].description;
$("#SFList").html(userSpace.SFList);
$("#SFDescription").html(userSpace.SFDescription);
wizardKit.say(userSpace.scraperFeatures[step].title + "..." + userSpace.scraperFeatures[step].description.replace(/<[^<>]+>/g," ").replace(/#NextPage#/g,"next page"));
witscript.views.scrapers.editor.display();
witscript.views.scrapers.editor.datasheet.focus();
witscript.views.scrapers.editor.datasheet.select(0);
wizardKit.typeCellValue(witscript.views.scrapers.editor.datasheet, 3, 2, "#NextPage#");
wizardKit.typeCellValue(witscript.views.scrapers.editor.datasheet, 3, 3, '<h2><a class="link" href="');
wizardKit.typeCellValue(witscript.views.scrapers.editor.datasheet, 3, 4, '"');
witscript.views.scrapers.editor.display();
witscript.menutree.focus();
witscript.views.scrapers.editor.saveButton.click();
userSpace.scraperFeatures.push({title : "Displaying scraper line matches in the source.", description : "Right-clicking on a scraper field, you can now highlight the matches for the selected string or regular expression in the source code. If you do the same on a line description, the whole scraper line will be looked for in the source.<br /><br />This makes the fabrication of scrapers much easier."});
var step = Number(wizard.stepNumber());
witscript.views.scrapers.display();
userSpace.SFList = "";
userSpace.SFDescription = "";
for(var i=0;i <= step;i++){
userSpace.SFList = userSpace.SFList + "<li class='note'>"+userSpace.scraperFeatures[i].title+"</li>";
}
userSpace.SFDescription = userSpace.scraperFeatures[step].description;
$("#SFList").html(userSpace.SFList);
$("#SFDescription").html(userSpace.SFDescription);
wizardKit.say(userSpace.scraperFeatures[step].title + "..." + userSpace.scraperFeatures[step].description.replace(/<[^<>]+>/g," "));
witscript.views.scrapers.editor.display();
witscript.views.scrapers.editor.datasheet.focus();
witscript.views.scrapers.editor.datasheet.select(3);
var thePattern = witscript.lineRegExp([witscript.views.scrapers.editor.datasheet.getCell(3, 2),witscript.convertLiterals(witscript.views.scrapers.editor.datasheet.getCell(3, 3)),witscript.convertLiterals(witscript.views.scrapers.editor.datasheet.getCell(3, 4)),""]);
witscript.views.scrapers.source.findBar.toggleHighlight(false);
witscript.views.scrapers.source.findBar.toggleHighlight(true, "/"+thePattern+"/gi");
witscript.views.scrapers.editor.display();
witscript.views.scrapers.source.scrollToPercent(.48);
witscript.menutree.focus();
Our Tour is Now Over.
witscript.views.page.display();
wizardKit.say(this.parentNode);
if(witscript.version("2.1")){$(".owui-wizard-homelink").attr("style","color: #DFFFF9 !important; float:left;").html("More Tutorials")};
These were only the most important new features of this version. Please check out the help center for detailed information on all the exploration and extraction functions of the application.
We will progressively publish several tutorials to lead you through the main features of OutWit Hub. Stay tuned.