blueways/bw-cache-uri
Composer 安装命令:
composer require blueways/bw-cache-uri
包简介
TYPO3 extension to parse remote content and save to tt_content element
README 文档
README
This TYPO3 extension extends the tt_content element HTML for the functionality of loading and postprocessing remote content.
Features
- Load and save remote content from URL
- Filter saved DOM with CSS selectors
- Manipulate the content with custom post-processors (e.g. stripe tags, add wrap,..)
- Options for processors via TypoScript
- Scheduler task to refresh content
Install
- Install via composer
composer require blueways/bw-cache-uri
- Include TypoScript template
Usage
Just create a new HTML-Content Element and add any URL in the parsing options. After saving, the remote content is fetched, processed and saved.
Scheduler
The DOM Downloader task will refresh the bodytext of all tt_content elements that have a parsing uri set.
Post Processor
After receiving the remote content, custom post processors can be applied to transform the content, e.g. to wrap or remove text. To register a new processor, add the following TypoScript:
plugin.tx_bwcacheuri.settings.postProcessors {
Vendor\YourExt\Processor\MyFancyProcessor {
label = Name in select box
options {
custom_setting = 2,4
allowed_tags = <div>
}
}
}
Your processor class must implement the PostProcessorInterface:
<?php namespace Vendor\YourExt\Processor; class MyFancyProcessor implements \Blueways\BwCacheUri\Processor\PostProcessorInterface { public function process($dom, $options) { return strip_tags($dom, $options['allowed_tags']); } }
DDEV cron job
See ddev-contrib to see how to make the scheduler run locally.
Examples
Use Filter to get current weather
Get current Time
统计信息
- 总下载量: 397
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-10-05