-
Notifications
You must be signed in to change notification settings - Fork 72
Smartrules syntax V10
Paul edited this page Aug 13, 2025
·
1 revision
The smartrules file describes how the filename of a video is built.
-
max_length
is the maximum filename size -
template
is the format of the filename. This can include 3 components:-
%title
is replaced with the page title -
%hostname
is replaced with the url hostname -
%selector
is replaced with the matching selector
-
-
url
is the URL of the origin of the download. -
selector
is the CSS selector
The top level max_length
and template
are the default values.
One rule starts with [[rule]]
.
The priority of a rule is defined by its position in the file. Top rules have higher priorities.
Here is a valid file:
# Default rule
max_length = 64
template = "%title"
[[rule]] # First rule
url = "foo.com"
template = "foobar-%title"
[[rule]] # Second rule
url = "bar.com"
max_length = 99
template = "%title-%hostname-%selector"
selector = "h2.title"
This documentation is about Video DownloadHelper.