projects
/
tweeper.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make stylesheet file name parametric
[tweeper.git]
/
tweeper.php
diff --git
a/tweeper.php
b/tweeper.php
index
a275a64
..
4050100
100755
(executable)
--- a/
tweeper.php
+++ b/
tweeper.php
@@
-95,14
+95,9
@@
$url = parse_url($src_url);
if (FALSE === $url || empty($url["host"]))
die("Invalid url\n");
if (FALSE === $url || empty($url["host"]))
die("Invalid url\n");
-$stylesheets = array(
- "twitter.com" => "twitter_user_timeline2rss.xsl",
-);
-
-if (FALSE === array_key_exists($url["host"], $stylesheets))
+$stylesheet = "rss_converter_" . $url["host"] . ".xsl";
+if (FALSE === file_exists($stylesheet))
die("Unsupported host\n");
die("Unsupported host\n");
-$stylesheet = $stylesheets[$url["host"]];
-
$tweeper = new Tweeper($stylesheet);
echo $tweeper->tweep($src_url);
$tweeper = new Tweeper($stylesheet);
echo $tweeper->tweep($src_url);