Checks over the network of what a feed links to: whether its media files, images, transcripts and chapters reach a listener as the feed says.
The checks follow the standards first: HTTP as RFC 9110 has it, the attributes of RSS 2.0 and of the podcast namespace, and the CORS rules of the Fetch standard. The CORS rules decide what a web player on another site can read. The :requirements option adds those of a directory, e.g. :apple for Apple Podcasts.
A check gathers the facts of each file over the network, and judges them by the rules of dk.simongray.podcast.feed.check.rules, which can judge the same facts again without a request.
In a browser, fetch hides most headers of an answer from another site, and it fails without a reason where CORS doesn't allow the page to read. So a check sees most on the JVM or in Node.
Checks over the network of what a feed links to: whether its media files, images, transcripts and chapters reach a listener as the feed says. The checks follow the standards first: HTTP as RFC 9110 has it, the attributes of RSS 2.0 and of the podcast namespace, and the CORS rules of the Fetch standard. The CORS rules decide what a web player on another site can read. The :requirements option adds those of a directory, e.g. :apple for Apple Podcasts. A check gathers the facts of each file over the network, and judges them by the rules of dk.simongray.podcast.feed.check.rules, which can judge the same facts again without a request. In a browser, fetch hides most headers of an answer from another site, and it fails without a reason where CORS doesn't allow the page to read. So a check sees most on the JVM or in Node.
(check-files! feed)(check-files! feed opts)Check over the network the files that feed links to, with the opts
below. In ClojureScript, the result is a promise.
The result is a map of the :files and the :report. Each file has the
:facts that its answers gave, and the report has the diagnostics of all
the files. The opts are these, with default-limits for the limits:
The credentials go only with the requests for the feed, and so do a user name and password in its URL. The result names the URL without them.
Unless opts ask it to read, a check moves two bytes of each file and
the header of each image. It reads a media file by byte ranges, and only
as far as its duration.
Each request has the :timeout-seconds, the :max-bytes and the :allow-pred.
For the integrity of a file, a check fetches the whole file, with the :allow-pred and the time that the check has left. Without a :send on the JVM, the file streams through the digest and none of it is kept.
A file that a limit left out has the limit under :unchecked as its facts, and the report counts such files with :check/unchecked.
Check over the network the files that `feed` links to, with the `opts` below. In ClojureScript, the result is a promise. The result is a map of the :files and the :report. Each file has the :facts that its answers gave, and the report has the diagnostics of all the files. The `opts` are these, with default-limits for the limits: - :url, the URL of the feed, which is checked too - :credentials, of a private feed, as http/fetch! takes them - :max-items, how many of the newest items to check the files of, or :all - :requirements, a name in rules/requirements whose checks to add, or a map of the shape of its entries - :read?, whether to read what the files hold: the format, duration, codecs and size of media files, the playlists of HLS streams, and transcripts and chapters whole - :integrity?, whether to fetch whole each file with a podcast:integrity - :max-files, :max-seconds, :concurrency, :timeout-seconds and :max-bytes, the limits - :allow-pred, which URLs a request can go to, as for http/send!, and url/public? by default - :user-agent, as http/send! takes it - :send, how to send the requests, in place of client/send! - :now-fn, a function that gives the time, the clock by default The credentials go only with the requests for the feed, and so do a user name and password in its URL. The result names the URL without them. Unless `opts` ask it to read, a check moves two bytes of each file and the header of each image. It reads a media file by byte ranges, and only as far as its duration. Each request has the :timeout-seconds, the :max-bytes and the :allow-pred. For the integrity of a file, a check fetches the whole file, with the :allow-pred and the time that the check has left. Without a :send on the JVM, the file streams through the digest and none of it is kept. A file that a limit left out has the limit under :unchecked as its facts, and the report counts such files with :check/unchecked.
The limits of a check when its options don't set them:
The limits of a check when its options don't set them: - :max-items, how many of the newest items to check the files of - :max-files, the most files to check, since a feed can name thousands - :max-seconds, after which no file is started - :concurrency, how many files to check at a time - :timeout-seconds, the longest that a request can take - :max-bytes, the most to read of a file, except for its integrity
(files feed)(files feed opts)The files that a check of feed fetches, each as a map, with the opts
below.
A file has its :kind, its :url, the :path in the feed of the element that names it, and what the feed :declared of it. The kinds are :feed, :media, :stream for the playlist of an HLS stream, :image, :transcript and :chapters. What the feed declares depends on the kind:
A file that several elements name is checked once, as the first element
names it. The opts are:
The files that a check of `feed` fetches, each as a map, with the `opts` below. A file has its :kind, its :url, the :path in the feed of the element that names it, and what the feed :declared of it. The kinds are :feed, :media, :stream for the playlist of an HLS stream, :image, :transcript and :chapters. What the feed declares depends on the kind: - of a media file or a stream, the type, length and duration, and the integrity, height and codecs of an alternate enclosure - of an image, the :sources, such as :itunes, :podcast or :rss, and the purpose and size that its podcast:image gives - of a transcript or chapters, the type A file that several elements name is checked once, as the first element names it. The `opts` are: - :url, the URL of the feed, which is checked too - :max-items, how many of the newest items to check the files of, 10 by default, or :all
(report files)(report files chosen)The diagnostics of the checked files, by the standards and the
chosen requirements, if any.
Each file has its :facts, and the chosen requirements are a name in
rules/requirements, or a map of the shape of its entries. So several
requirements can judge one check, and no request goes out again. The
files that a limit of the check left out have no diagnostics of their
own, and one :check/unchecked counts them for each limit.
The diagnostics of the checked `files`, by the standards and the `chosen` requirements, if any. Each file has its :facts, and the `chosen` requirements are a name in rules/requirements, or a map of the shape of its entries. So several requirements can judge one check, and no request goes out again. The files that a limit of the check left out have no diagnostics of their own, and one :check/unchecked counts them for each limit.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |