Created a simple shoutbox plugin for spline. master
authorEevee <eevee@nyarumaa.(none)>
Sun, 7 Dec 2008 00:15:38 +0000 (19:15 -0500)
committerEevee <eevee@nyarumaa.(none)>
Sun, 7 Dec 2008 00:15:38 +0000 (19:15 -0500)
All it does at the moment is install a controller that announces that it
in fact exists.

.gitignore [new file with mode: 0644]
lib/spline/__init__.py [new file with mode: 0644]
lib/spline/plugins/__init__.py [new file with mode: 0644]
lib/spline/plugins/shoutbox/__init__.py [new file with mode: 0644]
lib/spline/plugins/shoutbox/controllers/__init__.py [new file with mode: 0644]
lib/spline/plugins/shoutbox/controllers/shoutbox.py [new file with mode: 0644]
setup.py [new file with mode: 0644]

diff --git a/.gitignore b/.gitignore
new file mode 100644 (file)
index 0000000..f0f68e4
--- /dev/null
@@ -0,0 +1,3 @@
+*.swp
+*.pyc
+*.egg-info
diff --git a/lib/spline/__init__.py b/lib/spline/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/spline/plugins/__init__.py b/lib/spline/plugins/__init__.py
new file mode 100644 (file)
index 0000000..de40ea7
--- /dev/null
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
diff --git a/lib/spline/plugins/shoutbox/__init__.py b/lib/spline/plugins/shoutbox/__init__.py
new file mode 100644 (file)
index 0000000..4d79dbf
--- /dev/null
@@ -0,0 +1,8 @@
+from spline.lib.plugin import PluginBase
+import controllers.shoutbox
+
+class ShoutboxPlugin(PluginBase):
+    def controllers(self):
+        return dict(
+            shoutbox = controllers.shoutbox.ShoutboxController,
+        )
diff --git a/lib/spline/plugins/shoutbox/controllers/__init__.py b/lib/spline/plugins/shoutbox/controllers/__init__.py
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/lib/spline/plugins/shoutbox/controllers/shoutbox.py b/lib/spline/plugins/shoutbox/controllers/shoutbox.py
new file mode 100644 (file)
index 0000000..c520f22
--- /dev/null
@@ -0,0 +1,13 @@
+import logging
+
+from pylons import request, response, session, tmpl_context as c
+from pylons.controllers.util import abort, redirect_to
+
+from spline.lib.base import BaseController, render
+#from spline import model
+
+class ShoutboxController(BaseController):
+
+    def index(self):
+        return 'shoutbox here'
+
diff --git a/setup.py b/setup.py
new file mode 100644 (file)
index 0000000..f5b4419
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,18 @@
+from setuptools import setup, find_packages
+setup(
+    name = 'spline-shoutbox',
+    version = '0.1',
+    package_dir = {'': 'lib'},
+    packages = find_packages('lib'),
+    
+    install_requires = ['spline'],
+
+    include_package_data = True,
+
+    zip_safe = False,
+
+    entry_points = {'spline.plugins': 'shoutbox = spline.plugins.shoutbox:ShoutboxPlugin'},
+
+    namespace_packages = ['spline', 'spline.plugins'],
+)
+