Creating Custom Rules
Using custom subscriptions, you can create flexible and powerful rules to match pretty much any content. Start by setting a name for the subscription, and a source URL, which is the URL of the feed. You can then use the rule editor to construct rules.
To add or remove rows, click the "+" or "-" buttons in each row. Option-click the "+" button to add a nested row. You can also drag rows to change their nest order.
If you've set a valid source URL, you can click "Load Preview...". Automatic will apply the rules against the current content of the feed, so you can see the effect they will have.
You can use various attributes of the feed items to construct rules:
- Title: the title of the feed item. It is very common for content-focused feeds to set the title to the name of the file that is enclosed or linked.
- Date: the date and time on which the item was originally published. Note that for periodic content with a set schedule, such as TV shows, this is usually not the same as the air date.
- Content: the description text for the item. This is the "main body" of the feed item, and often contains additional information about the file, such as a plot summary for a TV episode.
- Enclosure URL: the URL of the enclosed file. This is often a "direct link", meaning that the filename itself is included in the URL. Example: http://example.com/enclosed_file.zip.
- Enclosure size: the filesize of the enclosed file.
- Enclosure kind: the kind of file that is enclosed. This can be audio for podcasts, video for videocasts, or torrent for torrentcasts.
- Link: this is the URL that the item links to. Some feeds do not provide enclosures, but instead use this URL to link to files. Feeds that provide enclosures usually set this URL to be the same as the enclosure URL.
- Episode: this is the episode number for the item, as parsed by Automatic from the title. The formats recognized are '99x99', '99 x 99', 's99e99', 'yyyy.mm.dd', 'mm.dd.yyyy'. The format entered in the criterion field does not necessarily have to match the format in the item title.
Most operators are self-explanatory (for example, 'contains'). A couple require some discussion:
- 'matches': this will apply the text in the field as a regular expression according to ICU v3. Note that the expression will be wrapped by ".*", so it will match anywhere. For more information regarding regular expression and their syntax, see here. Any imported subscriptions from earlier versions of Automatic will use this operator exclusively.
- 'is in the last': this is a moving date range. Meaning, the reference date is set every time Automatic refreshes. For example, if set to 'in the last 5 days', every time Automatic evaluates this rule, it will match items published from the refresh time up to 5 days prior.
There are also a few other options you can set for custom subscriptions:
- Search linked pages for files with these extensions:: usually, feeds will either have content enclosed (best-case scenario) or link directly to the files. However, some feed publishers opt to link to a download page instead. In order to allow you to use these feeds, Automatic can parse the linked (HTML) page and find any files with the extensions you provide.
- Try to download every episode once: this is a setting for episodic content, such as TV shows or podcasts. If you are using a feed where a certain episode may appear in multiple items, you can set this option. Automatic will keep a record of all the episode numbers it has previously downloaded and will not match an episode twice, unless it is marked as 'proper' or 'repack'.