Command Line
Site Visualizer lets you to run most of its commands via the command line interface. Thus, you can run it in MS-DOS mode with defined parameters, or in batch mode by using a *.BAT file, or by the Windows Scheduler. This mode also allows you to use Site Visualizer from within your application, script, cron job, and so on. Below are listed the commands, with their syntax and parameters.
Crawl a website
The command runs crawling of a website using existing project. Syntax:
svzpro -crawl "D:\path\site.com.svz"
Create the project once using graphic interface mode of Site Visualizer, and you can use it command-line mode after. The command uses the project to take the URL to crawl, as well as all other options. When crawling is complete, the project will be saved.
Generate XML Sitemap
Use this command to create XML sitemap of the project specified in the 1st parameter, and save it to a file (2nd parameter):
svzpro -generatexml "D:\path\site.com.svz" "D:\path\sitemap.xml"
Upload File
The command uploads a file specified in the 2nd parameter (e.g., XML sitemap) to your website using FTP settings from the project specified in the 1st parameter:
svzpro -upload "D:\path\site.com.svz" "D:\path\sitemap.xml"
Run Report
The command opens the project specified in the 1st parameter, executes the report (predefined or custom) by its name (2nd parameter), then saves the result set to a CSV file (3rd parameter):
svzpro -report "D:\path\site.com.svz" "client error responses (4xx)" "D:\path\result.csv"
Import Data
Use it to import data from a text file in batch mode:
svzpro -import "D:\path\site.com.svz" "D:\path\source.csv" "result_tablename" "," 7 -frfn -edt
- The first parameter is a Site Visualizer project to import data to.
- Source text file with a delimiter (CSV, TSV, or any other) to import data from.
- Destination table name.
- Delimiter used in the source text file.
- Line number of the source file to start import from.
- -frfn - 'First row contains field names'. It's an optional parameter. Use it, if the source file contains column names in the 1st row to be imported, and you'd like to use them as column names of the result table.
- -edt - 'Empty destination table'. Optional parameter also. Use it for overwriting data in the destination table.
Silent mode, or saving errors to a log file
In this mode, all command-line operations are done without the "Press Enter" prompt. Any errors occurring when executing the commands will be saved to a log file defined in the second parameter. The syntax is as follows:
svzpro -silent "D:\path\log.txt"
If the log file already exists, it will be replaced on each execution of the -silent command. If you launch multiple commands at once (for example, from a BAT file), any errors occurring when executing these commands will be appended to the same log file.
If the second parameter is empty, execution of this command will disable the silent mode. The command
svzpro -silent ""
turns the silent mode off. From this point on, any errors will be displayed in a separate console window (by default).