#!/usr/bin/php
<?php

require __DIR__.'/base/block.php';

$rss = $argv[1] ?? null;
$client = $argv[2] ?? null;

if (empty($rss)) {
    die;
}

$content = @file_get_contents($rss);

if (empty($content)) {
    die;
}

preg_match_all('/<entry/isU', $content, $matches, PREG_SET_ORDER);

$title = pemoji(0xf09e);
$count = count($matches);

if ($count > 0) {
    $title .= '+'.$count.' ';
}

$fullText = span($title, $count ? color('normal') : color('info'), '#333');

if ($client && (int) getenv('BLOCK_BUTTON') === 1) {
    shell_exec(sprintf('xdg-open %s', escapeshellarg($client)));
}

echo block(
    'rss',
    [
        'full_text' => $fullText,
    ]
);
Insertar
<div%key%id="gist-5c87a8bd84100-25042897ccd0050475d96d1eec7001ed2c6c7173" class="gist-container"></div>
<script src="https://gist.deblan.org/es/embedjs/5c87a8bd84100" async></script>