From 96f0d63de25935cd7f6af92820093c7bcfa40550 Mon Sep 17 00:00:00 2001 From: Denis Ryabov Date: Sat, 1 Mar 2014 00:47:00 +0400 Subject: [PATCH] comments --- habr_twister.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/habr_twister.php b/habr_twister.php index d9388fd..6a7d261 100644 --- a/habr_twister.php +++ b/habr_twister.php @@ -10,7 +10,7 @@ if (!$rss) die('Cannot read rss'); // Initialise TwisterPost require_once 'twisterpost.php'; -$twister = new TwisterPost('habr_ru'); +$twister = new TwisterPost('habr_ru'); // set user name // Set path to twisterd directory $twister->twisterPath = '.' . DIRECTORY_SEPARATOR . 'twister-win32-bundle' . DIRECTORY_SEPARATOR; @@ -30,9 +30,10 @@ foreach ($rss->channel->item as $item) { continue; } - // short URL [-6 chars do matter] + // shorten URL [-6 chars do matter] $link = str_replace('habrahabr.ru', 'habr.ru', $link); $link = rtrim($link, '/'); + $msg = $twister->prettyPrint($title, $link, isset($item->category) ? $item->category : null); if ($twister->postMessage($msg)) {