mirror of https://github.com/Jackett/Jackett
Updated Definition format (markdown)
parent
b57f2f96e8
commit
767ffa5f91
|
@ -432,7 +432,7 @@ search:
|
|||
selector: ":has(td.colhead[title]:contains(\"Torrents from\") > b)"
|
||||
filters:
|
||||
- name: dateparse
|
||||
args: "Mon 02 Jan"
|
||||
args: "ddd dd MMM"
|
||||
# [OPTIONAL] row merging. Use this if the tracker uses multiple row elements for each torrent
|
||||
# (e.g. hidden tooltip or collapsed rows) The specified number of elements from the rows selector result will be
|
||||
# merged into the previous element. In this example (1) two rows will be merged together.
|
||||
|
@ -538,7 +538,7 @@ search:
|
|||
- name: append
|
||||
args: " +08:00"
|
||||
- name: dateparse
|
||||
args: "2006-01-02 15:04:05 -07:00"
|
||||
args: "yyyy-MM-ss HH:mm:ss zzz"
|
||||
# [OPTIONAL] size of the torrent (units are handled automatically). if the site does not provide a size for all
|
||||
# results, then a default of "512 MB" is preferred. If the site occasionally has a missing size then "0 B" is usual.
|
||||
# Side note: For Sites using European numbering schemes (1,024.4MB or 1.024,4MB etc.) there is no need to remove
|
||||
|
@ -1425,55 +1425,42 @@ filters:
|
|||
|
||||
## dateparse
|
||||
|
||||
Converts a date/time *string* into a DateTime object ("ddd, dd MMM yyyy HH:mm:ss z") using a GoLang layout.
|
||||
Requires two parameters in its argument, the first is the *string* to be processed into the DateTime, and the second is the *layout* to use for the conversion.
|
||||
The GoLang layout converts as follows:
|
||||
Converts a date/time *string* into a DateTime object ("ddd, dd MMM yyyy HH:mm:ss z").
|
||||
Requires two parameters in its argument, the first is the *string* to be processed into the DateTime, and the second is the *format* to use for the conversion.
|
||||
For a full breakdown of the format specifiers see https://learn.microsoft.com/en-us/dotnet/standard/base-types/custom-date-and-time-format-strings
|
||||
|
||||
```none
|
||||
// year
|
||||
Replace("2006", "yyyy")
|
||||
Replace("06", "yy")
|
||||
Here are the more common format specifiers used by Jackett
|
||||
|
||||
// month
|
||||
Replace("January", "MMMM")
|
||||
Replace("Jan", "MMM")
|
||||
Replace("01", "MM")
|
||||
Replace("1", "M")
|
||||
|
||||
// day
|
||||
Replace("Monday", "dddd")
|
||||
Replace("Mon", "ddd")
|
||||
Replace("02", "dd")
|
||||
Replace("2", "d")
|
||||
|
||||
// hours/minutes/seconds
|
||||
Replace("15", "HH")
|
||||
Replace("03", "hh")
|
||||
Replace("3", "h")
|
||||
Replace("04", "mm")
|
||||
Replace("4", "m")
|
||||
Replace("05", "ss")
|
||||
Replace("5", "s")
|
||||
|
||||
// fractional seconds
|
||||
Replace(".0000", "ffff")
|
||||
Replace(".000", "fff")
|
||||
Replace(".00", "ff")
|
||||
Replace(".0", "f")
|
||||
Replace(".9999", "FFFF")
|
||||
Replace(".999", "FFF")
|
||||
Replace(".99", "FF")
|
||||
Replace(".9", "F")
|
||||
|
||||
// AM/PM
|
||||
Replace("PM", "tt")
|
||||
Replace("pm", "tt")
|
||||
|
||||
// timezones
|
||||
Replace("Z07:00", "'Z'zzz")
|
||||
Replace("Z07", "'Z'zz")
|
||||
Replace("-07:00", "zzz")
|
||||
Replace("-07", "zz")
|
||||
format specifier|description|example
|
||||
---|---|---
|
||||
yyyy|The year as a four-digit number.|2009-06-15T13:45:30.6175000 -> 2009
|
||||
yy|The year, from 00 to 99.|2009-06-15T13:45:30.6175000 -> 09
|
||||
MMMM|The full name of the month.|2009-06-15T13:45:30.6175000 -> June
|
||||
MMM|The abbreviated name of the month.|2009-06-15T13:45:30.6175000 -> Jun
|
||||
MM|The month, from 01 through 12.|2009-06-15T13:45:30.6175000 -> 06
|
||||
M|The month, from 1 through 12.|2009-06-15T13:45:30.6175000 -> 6
|
||||
dddd|The full name of the day of the week.|2009-06-15T13:45:30.6175000 -> Monday
|
||||
ddd|The abbreviated name of the day of the week.|2009-06-15T13:45:30.6175000 -> Mon
|
||||
dd|The day of the month, from 01 through 31.|2009-06-15T13:45:30.6175000 -> 15
|
||||
d|The day of the month, from 1 through 31.|2009-06-15T13:45:30.6175000 -> 15
|
||||
HH|The hour, using a 24-hour clock from 00 to 23.|2009-06-15T13:45:30.6175000 -> 13
|
||||
hh|The hour, using a 12-hour clock from 01 to 12.|2009-06-15T13:45:30.6175000 -> 01
|
||||
h|The hour, using a 12-hour clock from 1 to 12.|2009-06-15T13:45:30.6175000 -> 1
|
||||
mm|The minute, from 00 through 59.|2009-06-15T13:45:30.6175000 -> 45
|
||||
m|The minute, from 0 through 59.|2009-06-15T13:45:30.6175000 -> 45
|
||||
ss|The second, from 00 through 59.|2009-06-15T13:45:30.6175000 -> 30
|
||||
s|The second, from 0 through 59.|2009-06-15T13:45:30.6175000 -> 30
|
||||
ffff|The ten thousandths of a second in a date and time value.|2009-06-15T13:45:30.6175000 -> 6175
|
||||
fff|The milliseconds in a date and time value.|2009-06-15T13:45:30.6175000 -> 617
|
||||
ff|The hundredths of a second in a date and time value.|2009-06-15T13:45:30.6175000 -> 61
|
||||
f|The tenths of a second in a date and time value.|2009-06-15T13:45:30.6175000 -> 6
|
||||
FFFF|If non-zero, the ten thousandths of a second in a date and time value.|2009-06-15T13:45:30.0000500 -> (no output)
|
||||
FFF|If non-zero, the milliseconds in a date and time value.|2009-06-15T13:45:30.6175000 -> 617
|
||||
FF|If non-zero, the hundredths of a second in a date and time value.|2009-06-15T13:45:30.6175000 -> 61
|
||||
F|If non-zero, the tenths of a second in a date and time value.|2009-06-15T13:45:30.6175000 -> 6
|
||||
tt|The AM/PM designator.|2009-06-15T13:45:30.6175000 -> PM
|
||||
zzz|Hours and minutes offset from UTC.|2009-06-15T13:45:30-07:00 -> -07:00
|
||||
zz|Hours offset from UTC, with a leading zero for a single-digit value.|2009-06-15T13:45:30-07:00 -> -07
|
||||
```
|
||||
|
||||
Example:
|
||||
|
@ -1482,9 +1469,9 @@ Example:
|
|||
# get the DateTime
|
||||
selector: td.torrent_table_dateAdded
|
||||
filters:
|
||||
# input: 2017-09-18 19:17:24 UTC
|
||||
# input: 2017-09-18 19:17:24 +00:00
|
||||
- name: dateparse
|
||||
args: "2006-01-02 15:04:05 -07:00"
|
||||
args: "yyyy-MMM-dd HH:mm:ss zzz"
|
||||
# result: Mon, 18 Sep 2017 19:17:24 GMT
|
||||
```
|
||||
|
||||
|
|
Loading…
Reference in New Issue