shanaproject: add timezone to publish date

Co-authored-by: Veirt <veirt@duck.com>
This commit is contained in:
Bogdan 2024-01-24 18:15:10 +02:00
parent e4a82e6d04
commit 3f52e0a81c
1 changed files with 9 additions and 3 deletions

View File

@ -87,8 +87,10 @@ search:
args: ["April", "Apr"] args: ["April", "Apr"]
- name: re_replace - name: re_replace
args: ["March", "Mar"] args: ["March", "Mar"]
- name: append
args: " +00:00" # GMT
- name: dateparse - name: dateparse
args: "MMM d, yyyy, h:mm tt" args: "MMM d, yyyy, h:mm tt zzz"
date_abbr: date_abbr:
# May 8, 2022, 6 a.m. # May 8, 2022, 6 a.m.
selector: div.release_20:contains(".m."):not(:contains(":")) selector: div.release_20:contains(".m."):not(:contains(":"))
@ -106,8 +108,10 @@ search:
args: ["April", "Apr"] args: ["April", "Apr"]
- name: re_replace - name: re_replace
args: ["March", "Mar"] args: ["March", "Mar"]
- name: append
args: " +00:00" # GMT
- name: dateparse - name: dateparse
args: "MMM d, yyyy, h tt" args: "MMM d, yyyy, h tt zzz"
date_noon: date_noon:
# Sept. 30, 2022, noon # Sept. 30, 2022, noon
selector: div.release_20:contains(", noon") selector: div.release_20:contains(", noon")
@ -127,8 +131,10 @@ search:
args: ["March", "Mar"] args: ["March", "Mar"]
- name: re_replace - name: re_replace
args: [" noon", " 12 pm"] args: [" noon", " 12 pm"]
- name: append
args: " +00:00" # GMT
- name: dateparse - name: dateparse
args: "MMM d, yyyy, h tt" args: "MMM d, yyyy, h tt zzz"
date: date:
text: "{{ if or .Result.date_full .Result.date_abbr .Result.date_noon }}{{ or .Result.date_full .Result.date_abbr .Result.date_noon }}{{ else }}now{{ end }}" text: "{{ if or .Result.date_full .Result.date_abbr .Result.date_noon }}{{ or .Result.date_full .Result.date_abbr .Result.date_noon }}{{ else }}now{{ end }}"
size: size: