You're posting rss link of specific mod. My intension was to have a list of mods that were recenly updated. So https://mods.factorio.com/Thunder2k wrote: ↑Wed Feb 03, 2021 11:08 am More precisely:
(Example)
https://mods.factorio.com/mod/Industria ... /changelog
with RSS Link
https://mods.factorio.com/mod/Industria ... g/feed.xml
or
https://mods.factorio.com/mod/Industria ... ngelog.rss
Feature Request - RSS Data on Mod Portal
Moderator: ickputzdirwech
Re: RSS
Re: RSS
I did understand that, but I didn't want to open a new thread because yours is already named "RSS".dzbanek wrote: ↑Wed Feb 03, 2021 11:21 amYou're posting rss link of specific mod. My intension was to have a list of mods that were recenly updated. So https://mods.factorio.com/Thunder2k wrote: ↑Wed Feb 03, 2021 11:08 am More precisely:
(Example)
https://mods.factorio.com/mod/Industria ... /changelog
with RSS Link
https://mods.factorio.com/mod/Industria ... g/feed.xml
or
https://mods.factorio.com/mod/Industria ... ngelog.rss
But they can mybe add both, if they are implementing the RSS feature.
I also mentioned this thread in the sticky thread "One line suggestions".
Re: Feature Request - RSS Data on Mod Portal
[Koub] Thanks for the pointer. Merged both topics.
Koub - Please consider English is not my native language.
Re: Feature Request - RSS Data on Mod Portal
Hi. I created a workaround to monitor changes in mod updates via the API. It's a little PHP file located on my own server. It is subscribed by my TT-RSS instance which has the option "mark updated feeds unread".
Maybe some of you can use parts of this. I'm not a programmer, but I'm to lazy to check the mods manually.
Maybe some of you can use parts of this. I'm not a programmer, but I'm to lazy to check the mods manually.
Code: Select all
<?php
header("Content-Type: application/rss+xml; charset=UTF-8");
$rssfeed = '<?xml version="1.0" encoding="UTF-8"?>'. "\n";
$rssfeed .= '<rss version="2.0">'. "\n";
$rssfeed .= '<channel>'. "\n";
$rssfeed .= '<title>Factorio Mods</title>'. "\n";
$rssfeed .= '<link>https://mods.factorio.com/</link>'. "\n";
$rssfeed .= '<description>Custom Feed</description>'. "\n";
$arr = array("IndustrialRevolution","nullius","warptorio2","Krastorio2");
foreach ($arr as &$mod) {
$url = "https://mods.factorio.com/api/mods/".$mod."/full";
$content = file_get_contents($url);
$json = json_decode($content, true);
$item = $json;
$rssfeed .= '<item>'. "\n";
$rssfeed .= '<title>'.$item['title'].'</title>'. "\n";
$rssfeed .= '<link>https://mods.factorio.com/mod/'.$mod.'</link>'. "\n"; // adding domain to get the full url
$intro = html_entity_decode($item['summary']);
$intro = str_replace(' ', '', $intro);
$intro = strip_tags($intro);
$rssfeed .= '<description>' . $intro . "</p> <p>" .'Last updated: ' .$item['updated_at'] . '</description>'. "\n";
$date = new DateTime($item['updated_at']);
$date->modify('+2 hours');
$rssfeed .= '<pubDate>' . $date->format("D, d M Y H:i:s +0200") . '</pubDate>'. "\n";
$rssfeed .= '</item>'. "\n";
}
$rssfeed .= '</channel>'. "\n";
$rssfeed .= '</rss>';
echo $rssfeed;
?>