Path

Path

The Path pane of the Settings dialog lets you specify which paths should be included in or excluded from the download. It also provides a way to programmatically alter the names or paths of downloaded files.

Paths to Include or Exclude

The Include and Exclude path settings work in conjunction with the Path Constraint setting under the General settings and the Include Supporting Files setting under the Webpage settings according to the following rules:

  1. If this is the original URL (that is, the URL specified in the URL text field), then the file is downloaded.
  2. Otherwise, if the URL begins with one of the strings (or matches one of the regular expressions) in the Exclude table, then the file is not downloaded.
  3. Otherwise, if the URL meets the requirements of the current Path Constraint setting, then the file is downloaded.
  4. Otherwise, if the URL begins with one of the strings (or matches one of the regular expressions) in the Include table, then the file is downloaded.
  5. Otherwise, if the Include Supporting Files setting is on and the URL references a non-HTML file type, then the file is downloaded.
  6. Otherwise, the file is not downloaded.

In these tables, enter absolute URLs (that is, URLs beginning with http:// or https://) or regular expression patterns. URLs should be entered as they appear in the Safari address and search field, i.e., without encoding except for characters from the ISO-8859-1 extended character set and spaces (which are encoded as %20).

If you are adding a regular expression, check the corresponding Regex box. When using regular expressions, the pattern must match the entire URL. For example, to match any URL that contains an underscore, enter the .*_.* regular expression. The pattern syntax currently supported is that specified by ICU, which is described at Regular Expressions - ICU Documentation.

To add a row to the table, click the Plus button, enter the path or pattern, and press ↩.

To remove rows from the table, select them in the table and click the Minus button.

To modify a row, double-click on a string in the table, enter a new string, and press ↩.


Paths to Replace

The Replace path setting allows you to use regular expressions to replace the normal path or name of a downloaded file with a different path or name. See File Names for more information about how SiteSucker names downloaded files.

ReplacePath

Enter a file path pattern and a substitution template for each path you would like to replace. If the regular expression pattern matches a file's path, the path will be altered in accordance with the substitution template. For a match to occur, the regular expression must match the entire path as it would appear in the Finder relative to the destination folder. The template specifies what should be used to replace each match, with the backreference $0 representing the entire path, $1 representing the contents of the first capture group, and so on. Patterns are applied in the order in which they appear in the table, and the order of file path patterns can be rearranged by dragging them in the table. A path that matches multiple patterns may be modified more than once.

For example, in the image shown above, SiteSucker is instructed to do the following:

  1. move a site's graphics folder to the root level of the destination folder and then
  2. strip the html extension from any file that already has a php extension.

To add a row to the table, click the Plus button, enter the file path pattern and substitution template, and press ↩.

To remove rows from the table, select them in the table and click the Minus button.

To modify a row, double-click on a string in the table, enter a new string, and press ↩.