Esempio n. 1
0
 def GET(self, feedname):
     entries = sclient.feeder_get_items(feedname)
     items = ""
     for item in entries:
         items = """%(old)s
             <a href="%(link)s">
             <li>%(entry)s</li>
             </a>""" % { "old":items, "entry":item, "link":entries[item]}
     return api.render.feeder.feeds(items, feedname)
Esempio n. 2
0
 def GET(self, feedname):
     entries = sclient.feeder_get_items(feedname)
     items = ""
     for item in entries:
         items = """%(old)s
             <a href="%(link)s">
             <li>%(entry)s</li>
             </a>""" % {
             "old": items,
             "entry": item,
             "link": entries[item]
         }
     return api.render.feeder.feeds(items, feedname)
Esempio n. 3
0
    def pre_html(self):
        feeds = sclient.feeder_get_feeds()
        filters = sclient.feeder_get_filters()
        filterlist = ""
        for filter in filters:
            filterlist = """ %(old)s <li>%(new)s
                <a href="/feeder/filter_remove/%(new)s">
                <img src="/static/images/16/list-remove.png" alt="Remove" />
                </a></li>""" % {
                'old': filterlist,
                'new': filter
            }
        feedlist = ""
        for feed in feeds:
            feedlist = """%(old)s
                <li> <a href="/feeder/feed/%(new)s"> %(new)s (%(entrys)s torrents)</a>
                <a href="/feeder/feed_remove/%(new)s">
                <img src="/static/images/16/list-remove.png" alt="Remove" />
                </a></li>""" % {
                'old': feedlist,
                'new': feed,
                'entrys': len(sclient.feeder_get_items(feed))
            }

        return """
        <table width=100%%><tr><td>
            <h3>Feeds</h3>
        </td>
        <td>
            <h3>Filters</h3>
        </td></tr>
        <tr><td>
            <div class="info">
            <ul>
            %(feeds)s
            </ul></div>
        </td><td>
            <div class="info">
            <ul>
            %(filters)s
            </ul></div>
        <a href="/feeder/filters">Add/modify filters</a>
        </td></tr>
        </table>
        <h3>Add/change feed settings</h3>""" % {
            'feeds': feedlist,
            'filters': filterlist
        }
Esempio n. 4
0
    def pre_html(self):
        feeds = sclient.feeder_get_feeds()
        filters = sclient.feeder_get_filters()
        filterlist = ""
        for filter in filters:
            filterlist = """ %(old)s <li>%(new)s
                <a href="/feeder/filter_remove/%(new)s">
                <img src="/static/images/16/list-remove.png" alt="Remove" />
                </a></li>""" % {'old':filterlist, 'new':filter}
        feedlist = ""
        for feed in feeds:
            feedlist = """%(old)s
                <li> <a href="/feeder/feed/%(new)s"> %(new)s (%(entrys)s torrents)</a>
                <a href="/feeder/feed_remove/%(new)s">
                <img src="/static/images/16/list-remove.png" alt="Remove" />
                </a></li>""" % {'old':feedlist, 'new':feed, 'entrys':len(sclient.feeder_get_items(feed))}

        return """
        <table width=100%%><tr><td>
            <h3>Feeds</h3>
        </td>
        <td>
            <h3>Filters</h3>
        </td></tr>
        <tr><td>
            <div class="info">
            <ul>
            %(feeds)s
            </ul></div>
        </td><td>
            <div class="info">
            <ul>
            %(filters)s
            </ul></div>
        <a href="/feeder/filters">Add/modify filters</a>
        </td></tr>
        </table>
        <h3>Add/change feed settings</h3>""" % {'feeds':feedlist, 'filters':filterlist}