From 6c7310fb212c7c4ba2b173f1fddc47c21a681cd6 Mon Sep 17 00:00:00 2001 From: Dave Jones Date: Sun, 18 Oct 2020 01:32:56 -0500 Subject: [PATCH] chapters tag/format work - #47 --- README.md | 4 ++-- chapters/example.json | 41 +++++++++++++++++++++++++++++----------- chapters/jsonChapters.md | 10 +++++++--- 3 files changed, 39 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 4b4332a..a83d23e 100644 --- a/README.md +++ b/README.md @@ -78,13 +78,13 @@ Please read it before contributing if you aren't familiar with it.
-- **\** +- **\** Item (optional) - Links to an external file **(sample needed)** containing chapter data for the episode. The mime type of the file should be given - JSON prefered, `application/json`. + Links to an external file (see example file) containing chapter data for the episode. The mime type of the file should be given - JSON prefered, `application/json`.
diff --git a/chapters/example.json b/chapters/example.json index 5bca6e3..edb8c39 100644 --- a/chapters/example.json +++ b/chapters/example.json @@ -3,21 +3,40 @@ "chapters": [ { - "marker": 0, - "title": "Intro", - "img": "http://example.com/podcast/episode/chapter_art1.jpg" + "startTime": 0, + "title": "Intro" }, { - "marker": 94, - "title": "Donation Segment", - "img": "http://example.com/podcast/episode/chapter_art2.jpg", - "url": "http://example.com/link/to/funding_platform" + "startTime": 168, + "title": "Hearing Aids" }, { - "marker": 203, - "title": "News Discussion", - "img": "http://example.com/podcast/episode/chapter_art3.jpg", - "url": "http://example.com/link/to/article_that_was_discussed" + "startTime": 260, + "title": "Progress Report" + }, + { + "startTime": 410, + "title": "Namespace", + "img": "https://noagendaassets.com/enc/1602976942.638_pc20feedss.jpg", + "url": "https://github.com/Podcastindex-org/podcast-namespace" + }, + { + "startTime": 3990, + "title": "Just Break Up", + "img": "https://noagendaassets.com/enc/1602977264.567_80ad58e16124df27.png", + "url": "https://twitter.com/justbreakuppod" + }, + { + "startTime": 5510, + "title": "The Big Players" + }, + { + "startTime": 5854, + "title": "Spread the Word" + }, + { + "startTime": 6089, + "title": "Outro" } ] } \ No newline at end of file diff --git a/chapters/jsonChapters.md b/chapters/jsonChapters.md index 2eba5dd..4319720 100644 --- a/chapters/jsonChapters.md +++ b/chapters/jsonChapters.md @@ -4,12 +4,16 @@ The "chapters" property is an array of "chapter" objects taking this form: ``` { - "marker": 94, + "startTime": 94, "title": "Donation Segment", "img": "http://example.com/podcast/episode/chapter_art2.jpg", "url": "http://example.com/link/to/funding_platform" } ``` -Where "marker" (int - required) is the time in seconds, "title" (string - optional) is the chapter title, "img" (string - optional) is a link to an image to use as chapter art and "url" (string - optional) is a link to a -supporting document like would be in shownotes. \ No newline at end of file +Attributes: + + - `startTime` (required - float) The time, expressed in seconds with float precision for fractions of a second. + - `title` (required - string) The title of this chapter. + - `img` (optional - string) The url of an image to use as chapter art. + - `url` (optional - string) The url of a web page or supporting document that's related to the topic of this chapter.