Path

The Path settings provide a way to programmatically alter the names and paths of downloaded files.

Path

The Path screen provides the following controls:

Ignore Filename in Headers

Switch on this control to have SiteSucker ignore the filename directive in all HTTP Content-Disposition headers. See File Names for more information about how SiteSucker names downloaded files.

Replace Special Characters with ‘_’

Switch on this control to have SiteSucker replace special characters with the ‘_’ character in folder and file names. Special characters are either characters that should never appear in a folder or file name (such as, ‘/’, ‘:’, and ‘\’) or characters that could cause problems loading a downloaded file in a web browser (such as, ‘#’, ‘%’, ‘?’, and ‘|’). If this switch is not on, special characters are replaced with look-alike characters.

Make All File Paths Lowercase

This setting makes all file paths (including file names) lowercase.

The iOS file system is case-sensitive, which could present a problem when downloading sites from web servers that are case-insensitive. For example, downloading the pages

https://stackoverflow.com/questions/7996919/should-url-be-case-sensitive

and

https://stackoverflow.com/QUESTIONS/7996919/SHOULD-URL-BE-CASE-SENSITIVE

would download the same page, but SiteSucker, by default, would save the two pages with different names in different directories. You can use this setting to avoid this problem.


Replace Path Setting

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.

PathsToReplace

Enter a search pattern and a substitution template for each path you would like to replace. If the search pattern matches a file’s path, the path will be altered in accordance with the substitution template. The search pattern must match the entire path 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. Search patterns are applied in the order in which they appear in the list, and the order of search patterns can be rearranged by dragging them in the list when editing. A path that matches multiple search 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.

If you tap the Edit button in the Replace screen, SiteSucker displays a toolbar with the following buttons:

Delete Delete

Deletes the selected paths.

Edit Edit

Allows you to edit the selected path.

Add Add

Allows you to add a new path.