#!/bin/sh
#
#    Copyright (C) 2011-2018  Ruben Rodriguez <ruben@trisquel.info>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
#

VERSION=7

. ./config

rm debian/patches/debian-example-feeds.patch
sed '/debian-example-feeds/d;' debian/patches/series -i

cat << EOF > opml/feedlist
<?xml version="1.0"?>
<opml version="1.0">
<head>  
    <title>Liferea Default Feed List</title>        <!-- translate this for localized feed list -->
</head>
<body>  
    <outline text="Trisquel GNU/Linux">          <!-- translate this for localized feed list -->
      <outline text="News" htmlUrl="https://trisquel.info/" xmlUrl="https://trisquel.info/en/node/feed" />
      <outline text="Release announcements" htmlUrl="https://trisquel.info/" xmlUrl="https://trisquel.info/en/taxonomy/term/700/0/feed" />
      <outline text="Forum" htmlUrl="https://trisquel.info/en/forum" xmlUrl="https://trisquel.info/en/taxonomy/term/50/0/feed" />
      <outline text="Trisquel at Reddit" htmlUrl="https://www.reddit.com/r/gnu" xmlUrl="https://www.reddit.com/r/trisquel/.rss" />
    </outline>
    <outline text="Free Software">          <!-- translate this for localized feed list -->
      <outline text="What's New at GNU" htmlUrl="https://www.gnu.org/" xmlUrl="https://www.gnu.org/rss/whatsnew.rss" />
      <outline text="FSF News" htmlUrl="https://www.fsf.org/" xmlUrl="https://static.fsf.org/fsforg/rss/news.xml" />
      <outline text="FSF Events" htmlUrl="https://www.fsf.org/" xmlUrl="https://static.fsf.org/fsforg/rss/events.xml" />
      <outline text="FSF Blogs" htmlUrl="https://www.fsf.org/" xmlUrl="https://static.fsf.org/fsforg/rss/blogs.xml" />
      <outline text="fsdaily.com - Free Software News" htmlUrl="https://www.fsdaily.com/" xmlUrl="https://www.fsdaily.com/feed/published/All" />
      <outline text="GNU at Reddit" htmlUrl="https://www.reddit.com/r/gnu" xmlUrl="https://www.reddit.com/r/gnu/.rss" />
    </outline>

        <!-- the following search folders should also be in sync for all feed lists -->
        <!-- Do only translate the @text attributes in all of the following <outline> tags! -->
        <outline text="Unread" title="Unread" description="Unread" type="vfolder" htmlUrl="" xmlUrl="vfolder">
                <outline type="rule" text="Read status" rule="unread" value="" additive="true"/>
        </outline>
        <outline text="Important" title="Important" description="Important" type="vfolder" htmlUrl="" xmlUrl="vfolder">
                <outline type="rule" text="Flag status" rule="flagged" value="" additive="true"/>
        </outline>
        <!-- end of search folder block -->
</body>
</opml>
EOF

for feed in opml/feedlist_*
do
cat opml/feedlist > $feed
done
rm opml/feedlist

cat << EOF > opml/feedlist_es.opml
<?xml version="1.0"?>
<opml version="1.0">
<head>  
    <title>Liferea Default Feed List</title>        <!-- translate this for localized feed list -->
</head>
<body>  
    <outline text="Trisquel GNU/Linux">          <!-- translate this for localized feed list -->
      <outline text="Noticias" htmlUrl="https://trisquel.info/" xmlUrl="https://trisquel.info/es/node/feed" />
      <outline text="Foro" htmlUrl="https://trisquel.info/es/forum" xmlUrl="https://trisquel.info/es/taxonomy/term/29/0/feed" />
      <outline text="Anuncio de nuevas versiones" htmlUrl="https://trisquel.info/" xmlUrl="https://trisquel.info/en/taxonomy/term/700/0/feed" />
      <outline text="Trisquel en Reddit" htmlUrl="https://www.reddit.com/r/gnu" xmlUrl="https://www.reddit.com/r/trisquel/.rss" />
    </outline>
    <outline text="Free Software">          <!-- translate this for localized feed list -->
      <outline text="What's New at GNU" htmlUrl="https://www.gnu.org/" xmlUrl="https://www.gnu.org/rss/whatsnew.rss" />
      <outline text="FSF News" htmlUrl="https://www.fsf.org/" xmlUrl="https://static.fsf.org/fsforg/rss/news.xml" />
      <outline text="FSF Events" htmlUrl="https://www.fsf.org/" xmlUrl="https://static.fsf.org/fsforg/rss/events.xml" />
      <outline text="FSF Blogs" htmlUrl="https://www.fsf.org/" xmlUrl="https://static.fsf.org/fsforg/rss/blogs.xml" />
      <outline text="fsdaily.com - Free Software News" htmlUrl="https://www.fsdaily.com/" xmlUrl="https://www.fsdaily.com/feed/published/All" />
      <outline text="GNU en Reddit" htmlUrl="https://www.reddit.com/r/gnu" xmlUrl="https://www.reddit.com/r/gnu/.rss" />
    </outline>

        <!-- the following search folders should also be in sync for all feed lists -->
        <!-- Do only translate the @text attributes in all of the following <outline> tags! -->
        <outline text="Unread" title="Unread" description="Unread" type="vfolder" htmlUrl="" xmlUrl="vfolder">
                <outline type="rule" text="Read status" rule="unread" value="" additive="true"/>
        </outline>
        <outline text="Important" title="Important" description="Important" type="vfolder" htmlUrl="" xmlUrl="vfolder">
                <outline type="rule" text="Flag status" rule="flagged" value="" additive="true"/>
        </outline>
        <!-- end of search folder block -->
</body>
</opml>
EOF


changelog "Compiled for Trisquel"

compile

