diff options
Diffstat (limited to 'lib/lib_rss.php')
| -rw-r--r-- | lib/lib_rss.php | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/lib_rss.php b/lib/lib_rss.php index 0cfecf3f3..c695b64b7 100644 --- a/lib/lib_rss.php +++ b/lib/lib_rss.php @@ -68,3 +68,20 @@ function sortEntriesByDate ($entry1, $entry2) { function sortReverseEntriesByDate ($entry1, $entry2) { return $entry1->date (true) - $entry2->date (true); } + +function opml_export ($feeds) { + // TODO gérer les catégories + $txt = '<outline text="default">' . "\n"; + + foreach ($feeds as $feed) { + $txt .= "\t" . '<outline text="' . $feed->name () . '" type="rss" xmlUrl="' . $feed->url () . '" htmlUrl="' . $feed->website () . '" />' . "\n"; + } + + $txt .= '</outline>' . "\n"; + + return $txt; +} + +function opml_import ($xml) { + // TODO +} |
