mirror of
https://github.com/rwinkhart/backtone.git
synced 2026-08-27 20:36:32 -04:00
Add unicode interpretation; add example for cached VideoCardz feed
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
$command = "/usr/local/bin/backtone";
|
||||
$argument = "BASE64ENCODEDINPUTXML";
|
||||
$cacheFile = __DIR__ . "/cache/feed.xml";
|
||||
$tempFile = "/tmp/feed.xml" . ".tmp";
|
||||
|
||||
// serve cached file immediately
|
||||
header("Content-Type: application/xml; charset=utf-8");
|
||||
readfile($cacheFile);
|
||||
|
||||
// trigger background regeneration
|
||||
exec(escapeshellcmd($command) . " " . escapeshellarg($argument) . " > " . escapeshellarg($tempFile) . " 2>&1 && mv " . escapeshellarg($tempFile) . " " . escapeshellarg($cacheFile) . " &");
|
||||
?>
|
||||
@@ -0,0 +1,26 @@
|
||||
<input>
|
||||
<flareSolverrEndpoint>http://PLACEHOLDER:8191/v1</flareSolverrEndpoint>
|
||||
<regex
|
||||
><![CDATA[<item>.*?<title>(.*?)<\/title>.*?<link>(.*?)<\/link>.*?<description><!\[CDATA\[ (.*?)<br\/>]]></regex>
|
||||
<loadSeconds>0</loadSeconds>
|
||||
<maxFeedItems>10</maxFeedItems>
|
||||
<feed>
|
||||
<title>
|
||||
<parent>VideoCardz</parent>
|
||||
<captureGroupIndex>1</captureGroupIndex>
|
||||
</title>
|
||||
<link><parent>https://videocardz.com/rss-feed</parent>
|
||||
<captureGroupIndex>2</captureGroupIndex>
|
||||
</link>
|
||||
<description>
|
||||
<parent>Official RSS Feed from VideoCardz.com translated to Atom.</parent>
|
||||
<captureGroupIndex>3</captureGroupIndex>
|
||||
</description>
|
||||
<authorName>
|
||||
<parent>VideoCardz.com</parent>
|
||||
</authorName>
|
||||
<authorEmail>
|
||||
<parent>maciej+rssfeed@videocardz.com</parent>
|
||||
</authorEmail>
|
||||
</feed>
|
||||
</input>
|
||||
Reference in New Issue
Block a user