Liking cljdoc? Tell your friends :D

dk.simongray.podcast.criteria

Criteria that select and order episodes, given as data, e.g. for a saved filter or a download rule.

Criteria that select and order episodes, given as data, e.g. for a
saved filter or a download rule.
raw docstring

episodesclj/s

(episodes feed)
(episodes feed {:keys [limit] :as opts})

The items of feed that opts select, in the order they ask for:

  • :where, criteria as where takes them, or else every item
  • :order, as order takes it, :listening by default
  • :limit, the most items
  • :profile, :url, :at, :scale, :index and :files, the context of the criteria and the order

For a collection of feeds, the result is [feed item] pairs in one order, e.g. for an inbox, with :url as a function of the feed. With a :limit and one of the orders, the criteria only read as many items as the limit needs.

The items of `feed` that `opts` select, in the order they ask for:

- :where, criteria as where takes them, or else every item
- :order, as order takes it, :listening by default
- :limit, the most items
- :profile, :url, :at, :scale, :index and :files, the context of the
  criteria and the order

For a collection of feeds, the result is [feed item] pairs in one order,
e.g. for an inbox, with :url as a function of the feed. With a :limit
and one of the orders, the criteria only read as many items as the
limit needs.
sourceraw docstring

orderclj/s

(order k)
(order k ctx)

The sort key of a feed and one of its items for the order k and the context ctx, for sort-by. When k is a function of a feed and an item, it's k itself.

  • :listening, the listening order of a show, or the :order that the listener chose for it, with :profile in ctx
  • :newest and :oldest, by publication
  • :shortest and :longest, by duration
  • :title, alphabetically
  • :recent, by when the listener last touched the episode, which needs :profile in ctx

Items without the property sort last.

The sort key of a feed and one of its items for the order `k` and the
context `ctx`, for sort-by. When `k` is a function of a feed and an
item, it's `k` itself.

- :listening, the listening order of a show, or the :order that the
  listener chose for it, with :profile in `ctx`
- :newest and :oldest, by publication
- :shortest and :longest, by duration
- :title, alphabetically
- :recent, by when the listener last touched the episode, which needs
  :profile in `ctx`

Items without the property sort last.
sourceraw docstring

ordersclj/s

The orders that order takes, for a UI to offer.

The orders that order takes, for a UI to offer.
sourceraw docstring

problemclj/s

(problem criteria)

A description of what in the saved filter criteria this version of podcast-clj doesn't know, or nil.

A saved filter can come from a device with a later version, and criteria that this version doesn't know throw, so check a filter before offering it.

A description of what in the saved filter `criteria` this version of
podcast-clj doesn't know, or nil.

A saved filter can come from a device with a later version, and
criteria that this version doesn't know throw, so check a filter before
offering it.
sourceraw docstring

visibleclj/s

(visible where)

The criteria where with {:hidden? false}, unless they name :hidden? themselves, for the lists that leave out what's hidden.

The criteria `where` with {:hidden? false}, unless they name :hidden?
themselves, for the lists that leave out what's hidden.
sourceraw docstring

whereclj/s

(where criteria)
(where criteria ctx)

The predicate of a feed and one of its items for criteria in the context ctx. The criteria are a map whose entries must all hold, and these are about the episode:

  • :season and :episode, a number or a set of them
  • :type, "full", "trailer" or "bonus", or a set of them
  • :duration, a range of seconds, e.g. [600 nil], nil for an open end
  • :published, a range of instants
  • :age, a range of seconds since it came out, e.g. [nil 604800]
  • :text, a query that the title and notes must match, in the language of dk.simongray.drop-in-search.queries/parse, e.g. "coffee -decaf". A set of queries matches when any of them does.
  • :person, someone credited, and :author, the episode's author or else its show's
  • :language, a language range of RFC 4647, e.g. "en" for any English, or a set of them, that the show's language matches, or the language of a file that the episode offers
  • :category, a category or subcategory of Apple Podcasts, or one that the feed names in RSS, or a set of them
  • :location, a place that it's about or was made in, by its name or its country code
  • :license, the license of its content, e.g. "cc-by-4.0", or a set of them
  • :media, :audio or :video, or a set of them, which it offers
  • :transcript?, :chapters?, :soundbites? and :explicit?, where chapters count when linked, embedded or listed in the notes
  • :value?, :comments?, :chat? and :funding?, whether it takes payments by a value block, has public comments, a chat or funding links, its own or its show's
  • :ai-content?, whether its feed says that AI made some of it

These are about the show:

  • :show, the feed guid of a show, or a set of them
  • :medium, what the show is, e.g. "podcast", "music" or "audiobook", or a set of them
  • :serial? and :complete?, whether its episodes are meant to be heard in order, and whether it says it will publish no more of them
  • :show-explicit?, whether the show itself is marked explicit, whatever its episodes say, e.g. to leave out the episodes of an explicit show that marks some of them clean
  • :publisher, the feed guid of the show's publisher, or a set of them

These are about the listener:

  • :status, :unplayed, :in-progress or :played, or a set of them
  • :progress, a range of the seconds into it where the listener is, 0 for an episode not started
  • :heard, a range of instants when the listener last heard it
  • :starred? and :inbox?
  • :rating, a range of the listener's ratings, which no unrated episode is in
  • :since-subscription?, whether it came out after the listener subscribed
  • :folder and :tag, the folder or a tag that the listener gave its show, or a set of them, where a folder of nil is none
  • :queued?, whether it's in the queue
  • :download, the state of its file on the device, :downloaded, :downloading, :failed or :none, or a set of them
  • :hidden?, whether the listener hid it, or else the :hide-where of its show does, or #{true false} for either

And :not holds criteria that the item doesn't meet, e.g. {:text #{"rerun"}}. An empty map takes every item.

The criteria about the listener need the profile as :profile in ctx, and :download needs the :files of the device, as dk.simongray.podcast.downloads keeps them. For feeds without a podcast:guid, the criteria also need the :url, a string or a function of the feed. The :age needs the current time as :at, and with :scale, the :rating is in that scale. With an index of the documents of the items as :index, the :text reads it instead of each item's notes.

The predicate of a feed and one of its items for `criteria` in the
context `ctx`. The criteria are a map whose entries must all hold, and
these are about the episode:

- :season and :episode, a number or a set of them
- :type, "full", "trailer" or "bonus", or a set of them
- :duration, a range of seconds, e.g. [600 nil], nil for an open end
- :published, a range of instants
- :age, a range of seconds since it came out, e.g. [nil 604800]
- :text, a query that the title and notes must match, in the language
  of dk.simongray.drop-in-search.queries/parse, e.g. "coffee -decaf".
  A set of queries matches when any of them does.
- :person, someone credited, and :author, the episode's author or else
  its show's
- :language, a language range of RFC 4647, e.g. "en" for any English,
  or a set of them, that the show's language matches, or the language
  of a file that the episode offers
- :category, a category or subcategory of Apple Podcasts, or one that
  the feed names in RSS, or a set of them
- :location, a place that it's about or was made in, by its name or its
  country code
- :license, the license of its content, e.g. "cc-by-4.0", or a set of
  them
- :media, :audio or :video, or a set of them, which it offers
- :transcript?, :chapters?, :soundbites? and :explicit?, where chapters
  count when linked, embedded or listed in the notes
- :value?, :comments?, :chat? and :funding?, whether it takes payments
  by a value block, has public comments, a chat or funding links, its
  own or its show's
- :ai-content?, whether its feed says that AI made some of it

These are about the show:

- :show, the feed guid of a show, or a set of them
- :medium, what the show is, e.g. "podcast", "music" or
  "audiobook", or a set of them
- :serial? and :complete?, whether its episodes are meant to be heard in
  order, and whether it says it will publish no more of them
- :show-explicit?, whether the show itself is marked explicit, whatever
  its episodes say, e.g. to leave out the episodes of an explicit show
  that marks some of them clean
- :publisher, the feed guid of the show's publisher, or a set of them

These are about the listener:

- :status, :unplayed, :in-progress or :played, or a set of them
- :progress, a range of the seconds into it where the listener is, 0
  for an episode not started
- :heard, a range of instants when the listener last heard it
- :starred? and :inbox?
- :rating, a range of the listener's ratings, which no unrated episode
  is in
- :since-subscription?, whether it came out after the listener
  subscribed
- :folder and :tag, the folder or a tag that the listener gave its show,
  or a set of them, where a folder of nil is none
- :queued?, whether it's in the queue
- :download, the state of its file on the device, :downloaded,
  :downloading, :failed or :none, or a set of them
- :hidden?, whether the listener hid it, or else the :hide-where of its
  show does, or #{true false} for either

And :not holds criteria that the item doesn't meet, e.g.
{:text #{"rerun"}}. An empty map takes every item.

The criteria about the listener need the profile as :profile in `ctx`,
and :download needs the :files of the device, as
dk.simongray.podcast.downloads keeps them. For feeds without a
podcast:guid, the criteria also need the :url, a string or a function
of the feed. The :age needs the current time as :at, and with :scale,
the :rating is in that scale. With an index of the documents of the
items as :index, the :text reads it instead of each item's notes.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
←Move to previous article
→Move to next article
Ctrl+/Jump to the search field
× close