diff options
| author | 2012-10-22 23:41:56 +0200 | |
|---|---|---|
| committer | 2012-10-22 23:41:56 +0200 | |
| commit | 9a95cb844e80512205c519da69ec373e046b7f52 (patch) | |
| tree | f153ffbf6952c925227581501ed25fcb94230801 /lib/lib_rss.php | |
| parent | a928ebf1d010433d81d3afe5a6981f7ca391b9c7 (diff) | |
Début gestion import (non fonctionnel) / export (presque fonctionnel)
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 +} |
