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

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:

  • :season, a season 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]
  • :transcript?, :chapters? and :explicit?, where chapters count when linked, embedded or listed in the notes
  • :person, someone credited
  • :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.
  • :not, criteria that the item doesn't meet, e.g. {:text #{"rerun"}}
  • :status, :unplayed, :in-progress or :played, or a set of them
  • :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
  • :show, the feed guid of a show, or a set of them
  • :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
  • :media, :audio or :video, or a set of them, which it offers
  • :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

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:

- :season, a season 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]
- :transcript?, :chapters? and :explicit?, where chapters count when
  linked, embedded or listed in the notes
- :person, someone credited
- :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.
- :not, criteria that the item doesn't meet, e.g. {:text #{"rerun"}}
- :status, :unplayed, :in-progress or :played, or a set of them
- :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
- :show, the feed guid of a show, or a set of them
- :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
- :media, :audio or :video, or a set of them, which it offers
- :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

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