fix: indentation; add podcast:episode and remove spurious episode number

This commit is contained in:
Florian Maury 2024-10-27 15:18:23 +01:00
parent 4f148ac9c1
commit c7d353502b
2 changed files with 60 additions and 56 deletions

View file

@ -31,60 +31,59 @@ params:
title: "" # optional; title of the asset; max 32 chars title: "" # optional; title of the asset; max 32 chars
codecs: "" # optional; codec string as in RFC 6381 codecs: "" # optional; codec string as in RFC 6381
guid: "" # podcast field: guid guid: "" # podcast field: guid
# duration: 0 # podcast field: itunes:duration ; expressed in seconds # duration: 0 # podcast field: itunes:duration ; expressed in seconds
# image: "" # podcast field: itunes:image ; image for the episode # image: "" # podcast field: itunes:image ; image for the episode
# explicit: false # podcast field: itunes:explicit # explicit: false # podcast field: itunes:explicit
# episode_number: 0 # podcast field: itunes:episode ; the number of the episode in the series/season # episode_number: 0 # podcast field: itunes:episode and podcast:episode ; the number of the episode in the series/season
# season: # podcast field: itunes:season # season: # podcast field: itunes:season
# number: 0 # the number of the season # number: 0 # the number of the season
# title: "" # title: ""
# episode_type: "" # podcast field: itunes:episodeType ; one of "Full", "Trailer" or "Bonus" # episode_type: "" # podcast field: itunes:episodeType ; one of "Full", "Trailer" or "Bonus"
# transcript: # podcast field: podcast:transcript # transcript: # podcast field: podcast:transcript
# - content: "" # YAML file containing the transcript # - content: "" # YAML file containing the transcript
# external_content: # url of the remote content to use as is in different format # external_content: # url of the remote content to use as is in different format
# srt: "" # srt: ""
# webvtt: "" # webvtt: ""
# html: "" # html: ""
# json: "" # json: ""
# language: fr # optional; if omitted, language is the same as the podcast language attribute # language: fr # optional; if omitted, language is the same as the podcast language attribute
# rel: "captions" # ; optional ; only valid value is "captions"; indicates that this transcript contains time codes # rel: "captions" # ; optional ; only valid value is "captions"; indicates that this transcript contains time codes
# funding: # podcast field: podcast:funding # funding: # podcast field: podcast:funding
# - url: "" # - url: ""
# - comment: "" # - comment: ""
# chapters: # podcast field: podcast:chapters # chapters: # podcast field: podcast:chapters
# - start_time: 0.0 # - start_time: 0.0
# title: "" # title: ""
# toc: true # this field needs to be defined and set to true if that chapter must be present in the table of content # toc: true # this field needs to be defined and set to true if that chapter must be present in the table of content
# image: "" # image: ""
# url: "" # url: ""
# end_time: 0.0 # end_time: 0.0
# location: # location:
# name: "" # name: ""
# geo: "" # geo: ""
# soundbites: # podcast field: podcast:soundbite # soundbites: # podcast field: podcast:soundbite
# - start_time: 0.0 # expressed in seconds since the start of the episode # - start_time: 0.0 # expressed in seconds since the start of the episode
# duration: 0.0 # duration: 0.0
# title: "" # title: ""
# persons: # podcast field: podcast:person ; description and links to a podcast participant # persons: # podcast field: podcast:person ; description and links to a podcast participant
# - name: Florian Maury # - name: Florian Maury
# href: https://infosec.exchange/@x_cli # href: https://infosec.exchange/@x_cli
# img: "" # url to avatar # img: "" # url to avatar
# group: Cast # as listed in https://github.com/Podcastindex-org/podcast-namespace/blob/main/taxonomy.json # group: Cast # as listed in https://github.com/Podcastindex-org/podcast-namespace/blob/main/taxonomy.json
# role: Host # role: Host
# location: # podcast field: podcast:location ; used to associate the podcast or the episode to a specific location # location: # podcast field: podcast:location ; used to associate the podcast or the episode to a specific location
# freeform: "" # Description of the place (128 chars max) # freeform: "" # Description of the place (128 chars max)
# geo: "" # lattitude and longitude expressed in "geo" notation # geo: "" # lattitude and longitude expressed in "geo" notation
# osm: "" # Open Street Map Identifier # osm: "" # Open Street Map Identifier
# episode: 0 # podcast field: podcast:episode ; number of the episode in the season ; ignored if season is 0 # licence:
# licence: # name: CC-BY 4.0
# name: CC-BY 4.0 # url: https://creativecommons.org/licenses/by/4.0/
# url: https://creativecommons.org/licenses/by/4.0/ # social_interacts: # podcast field: podcast:socialInteracts ; links to interact on social media with the podcast
# social_interacts: # podcast field: podcast:socialInteracts ; links to interact on social media with the podcast # - protocol: activitypub # one of https://github.com/Podcastindex-org/podcast-namespace/blob/main/socialprotocols.txt
# - protocol: activitypub # one of https://github.com/Podcastindex-org/podcast-namespace/blob/main/socialprotocols.txt # uri: "" # URL of the root post for the channel as a whole
# uri: "" # URL of the root post for the channel as a whole # priority: 10
# priority: 10 # recommendations: # poodcast field: podcast:recommandations
# recommendations: # poodcast field: podcast:recommandations # - url: https://pod.broken-by-design.fr/recommendations.fr.json
# - url: https://pod.broken-by-design.fr/recommendations.fr.json # language: fr
# language: fr # comment: Recommandations générales
# comment: Recommandations générales
--- ---

View file

@ -315,6 +315,11 @@
{{- . | transform.XMLEscape -}} {{- . | transform.XMLEscape -}}
</itunes:episode> </itunes:episode>
{{- "\n" -}} {{- "\n" -}}
{{- strings.Repeat $indent " " -}}
<podcast:episode>
{{- . | transform.XMLEscape -}}
</podcast:episode>
{{- "\n" -}}
{{- else -}} {{- else -}}
{{- if eq $podcast_type "serial" -}} {{- if eq $podcast_type "serial" -}}
{{- errorf "missing episode number for episode %q while podcast type is serial" $episode_title -}} {{- errorf "missing episode number for episode %q while podcast type is serial" $episode_title -}}