Author: dmeyer
Date: Mon Sep 24 16:32:20 2007
New Revision: 2837

Log:
move feed code out of beacon

Added:
   trunk/feedmanager/
   trunk/feedmanager/bin/
   trunk/feedmanager/bin/kaa-feedmanager
      - copied unchanged from r2835, /trunk/beacon/bin/beacon-feedmanager
   trunk/feedmanager/setup.py
   trunk/feedmanager/src/
      - copied from r2835, /trunk/beacon/src/server/feedmanager/
Removed:
   trunk/beacon/bin/beacon-feedmanager
   trunk/beacon/src/server/feedmanager/
Modified:
   trunk/beacon/setup.py
   trunk/beacon/src/__init__.py
   trunk/beacon/src/client.py
   trunk/beacon/src/server/config.cxml
   trunk/beacon/src/server/server.py
   trunk/setup.py

Modified: trunk/beacon/setup.py
==============================================================================
--- trunk/beacon/setup.py       (original)
+++ trunk/beacon/setup.py       Mon Sep 24 16:32:20 2007
@@ -78,7 +78,7 @@
        license     = 'LGPL',
        summary     = "Media-oriented virtual filesystem",
        scripts     = [ 'bin/kaa-thumb', 'bin/beacon-daemon', 
'bin/beacon-search',
-                       'bin/beacon-mount', 'bin/beacon-feedmanager' ],
+                       'bin/beacon-mount' ],
        rpminfo     = {
            'requires':       'python-kaa-base >= 0.1.2, imlib2 >= 1.2.1',
            'build_requires': 'python-kaa-base >= 0.1.2, imlib2-devel >= 1.2.1, 
python-devel >= 2.4.0'

Modified: trunk/beacon/src/__init__.py
==============================================================================
--- trunk/beacon/src/__init__.py        (original)
+++ trunk/beacon/src/__init__.py        Mon Sep 24 16:32:20 2007
@@ -193,44 +193,3 @@
     while not _client.is_connected():
         kaa.notifier.step()
     return _client.delete_media(id)
-
-
-class Feed(dict):
-    def update(self):
-        return _client.feed_func('feeds.update', self.get('id'))
-
-    def remove(self):
-        return _client.feed_func('feeds.remove', self.get('id'))
-
[EMAIL PROTECTED]()
-def list_feeds():
-    """
-    List all feeds
-    """
-    if not _client:
-        connect()
-    
-    async = _client.feed_func('feeds.list')
-    yield async
-    feeds = []
-    for f in async.get_result():
-        feeds.append(Feed(f))
-    yield feeds
-    
-
[EMAIL PROTECTED]()
-def add_feed(url, destdir, download=True, num=0, keep=True):
-    """
-    Add a feed
-    """
-    if not _client:
-        connect()
-    async = _client.feed_func('feeds.add', url, destdir, download, num, keep)
-    yield async
-    yield Feed(async.get_result())
-    
-def update_feeds():
-    """
-    Update all feeds.
-    """
-    return _client.feed_func('feeds.update')

Modified: trunk/beacon/src/client.py
==============================================================================
--- trunk/beacon/src/client.py  (original)
+++ trunk/beacon/src/client.py  Mon Sep 24 16:32:20 2007
@@ -196,14 +196,6 @@
             self.rpc('db.media.delete', id)
 
 
-    def feed_func(self, func, *args, **kwargs):
-        """
-        Call feed manager function in the server
-        """
-        if self.status != DISCONNECTED:
-            return self.rpc(func, *args, **kwargs)
-
-
     # -------------------------------------------------------------------------
     # Server connect / disconnect / reconnect handling
     # -------------------------------------------------------------------------

Modified: trunk/beacon/src/server/config.cxml
==============================================================================
--- trunk/beacon/src/server/config.cxml (original)
+++ trunk/beacon/src/server/config.cxml Mon Sep 24 16:32:20 2007
@@ -47,20 +47,4 @@
         </var>
     </dict>
 
-    <list name="authentication">
-        <desc>
-            List for remote authentication.
-            (right now only needed for the feedmanager)
-            Example:
-            authentication[0].server = http://www.example.com
-            authentication[0].username = myname
-            authentication[0].password = secret
-        </desc>
-        <var name="server" type="str">
-            <desc>Server this username / password combination is used 
for</desc>
-        </var>
-        <var name="username" type="unicode"/>
-        <var name="password" type="unicode"/>
-    </list>
-
 </config>

Modified: trunk/beacon/src/server/server.py
==============================================================================
--- trunk/beacon/src/server/server.py   (original)
+++ trunk/beacon/src/server/server.py   Mon Sep 24 16:32:20 2007
@@ -50,7 +50,6 @@
 from monitor import Monitor
 from crawl import Crawler
 from config import config
-import feedmanager
 
 # get logging object
 log = logging.getLogger('beacon.server')
@@ -166,12 +165,6 @@
         for dir in config.monitors:
             self.monitor_dir(os.path.expandvars(os.path.expanduser(dir)))
 
-        for auth in config.authentication:
-            add_password(None, auth.server, auth.username, auth.password)
-        feedmanager.set_database(self._db)
-        self.ipc.connect(feedmanager)
-        
-
     # -------------------------------------------------------------
     # client handling
     # -------------------------------------------------------------

Added: trunk/feedmanager/setup.py
==============================================================================
--- (empty file)
+++ trunk/feedmanager/setup.py  Mon Sep 24 16:32:20 2007
@@ -0,0 +1,48 @@
+# -*- coding: iso-8859-1 -*-
+# -----------------------------------------------------------------------------
+# setup.py - setup script for kaa.feedmanager
+# -----------------------------------------------------------------------------
+# $Id: setup.py 2653 2007-04-22 17:39:14Z dmeyer $
+#
+# -----------------------------------------------------------------------------
+# kaa.epg - EPG Database
+# Copyright (C) 2007 Dirk Meyer
+#
+# Please see the file AUTHORS for a complete list of authors.
+#
+# This library is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License version
+# 2.1 as published by the Free Software Foundation.
+#
+# This library 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
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301 USA
+#
+# -----------------------------------------------------------------------------
+
+# python imports
+import sys
+
+try:
+    # kaa base imports
+    from kaa.distribution.core import Extension, setup
+except ImportError:
+    print 'kaa.base not installed'
+    sys.exit(1)
+
+
+setup(module       = 'feedmanager',
+      version      = '0.1.0',
+      license      = 'LGPL',
+      summary      = 'RSS/Atom Feedmanager',
+      rpminfo      = {
+          'requires':       'python-kaa-beacon >= 0.1.0',
+          'build_requires': 'python-kaa-beacon >= 0.1.0'
+      }
+      )

Modified: trunk/setup.py
==============================================================================
--- trunk/setup.py      (original)
+++ trunk/setup.py      Mon Sep 24 16:32:20 2007
@@ -33,7 +33,7 @@
 
 submodules = [ 'base', 'imlib2', 'display', 'mevas', 'epg', 'record',
                'metadata', 'evas', 'canvas', 'xine', 'cherrypy',
-               'beacon', 'popcorn' ]
+               'beacon', 'popcorn', 'feedmanager' ]
 
 # We require python 2.4 or later, so complain if that isn't satisfied.
 if sys.version.split()[0] < '2.4':

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog

Reply via email to