nr/processpodcastsubscriptions
Composer 安装命令:
composer require nr/processpodcastsubscriptions
包简介
Subscribe Podcast RSS feed and save as new page
关键字:
README 文档
README
What it does
Subscribe to podcast RSS feeds and save the data as anything you want. The module uses the great PHP Library podcast-feed-parser by Lukas White, which makes processing the podcast data a breeze. Thanks!
The module comes with an example module ProcessPodcastSubscriptionsEpisodes to demonstrate how to create new pages per episode.
Features
- Subscribe / Unsubscribe Podcast XML-Feeds
- Periodically fetch feeds with LazyCron
- Simple hookable actions
- ProcessModule for administration
- Optional module
ProcessPodcastSubscriptionsEpisodes
Install
- Copy the files for this module to /site/modules/ProcessPodcastSubscriptions/
- Execute the following command in the /site/modules/ProcessPodcastSubscriptions/ directory.
composer install
- If not done automatically, create a new admin page with the process
ProcessPodcastSubscriptions - Install the additional module
ProcessPodcastSubscriptionsEpisodes(optional) or build your own processor - Subscribe to Podcast feeds...
Install via composer
- Execute the following command in your website root directory.
composer require nr/processpodcastsubscriptions
Configuration Subscriptions
Modules > Configure > ProcessPodcastSubscriptions
Lazycron
Setup the LazyCron schedule. The cache expiration is configurable in the field settings.
Episode Meta
You can add subscribe links to the podcast. Configure the providers and then attach the links to the podcast.
Configuration Episodes
Modules > Configure > ProcessPodcastSubscriptionsEpisodes
Episode Parent
Set parent page for new episode pages.
Podcast Class and Episode Class
The Podcast object has a lot of handy methods to do anything you want with the returned data.
class Podcast implements HasArtwork { public array getEpisodes() public string getLanguage() public string getAuthor() public string getTitle() public string getSubtitle() public string getDescription() public DateTime getLastBuildDate() public string getType() public bool isEpisodic() public bool isSerial() public string getUpdatePeriod() public Artwork getArtwork() public string getExplicit() public array getCategories() /* ... and much more ... */ }
class Episode { public string getGuid() public int getEpisodeNumber() public Media getMedia() public DateTime getPublishedDate() public string getTitle() public string getDescription() public Artwork getArtwork() public string getLink() public string getExplicit() /* ... and much more ... */ }
Hook
// init.php or ready.php $wire->addHookBefore('ProcessPodcastSubscriptions::processPodcast', function (HookEvent $event) { /** @var \ProcessWire\WireData $feed */ $feed = $event->arguments(0); /** @var \Lukaswhite\PodcastFeedParser\Podcast $podcast */ $podcast = $event->arguments(1); // process foreach($podcast->getEpisodes() as $episode) { /* create or update episode pages... */ } });
Example Rendering
In the folder ProcessPodcastSubscriptions/templates/podcasts-example.php you will find a sample rendering for a podcast and episode list. Have fun with it.
Todos
- Respect lastBuildDate from feed for update action.
- Handle long running script on subscribe.
nr/processpodcastsubscriptions 适用场景与选型建议
nr/processpodcastsubscriptions 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11 次下载、GitHub Stars 达 1, 最近一次更新时间为 2022 年 02 月 20 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「module」 「podcast」 「processwire」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 nr/processpodcastsubscriptions 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nr/processpodcastsubscriptions 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 nr/processpodcastsubscriptions 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Installs processwire 3rd party modules to PW system "site/modules" directory.
Provides ProcessWire integration for various template engines such as Twig.
Generate RSS feed for podcast, including iTunes, RawVoice, DublinCore and syndication fields.
ProcessWire module adding Smarty to the TemplateEngineFactory
Module for ProcessWire which automatically generates Blurhashs.
Add AlpineJS to ProcessWire admin
统计信息
- 总下载量: 11
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 13
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-02-20



