From f32d09074db90cdd13501ce6febccb4f5b7105c7 Mon Sep 17 00:00:00 2001 From: Eevee Date: Sat, 6 Dec 2008 19:15:38 -0500 Subject: [PATCH 1/1] Created a simple shoutbox plugin for spline. All it does at the moment is install a controller that announces that it in fact exists. --- .gitignore | 3 +++ lib/spline/__init__.py | 0 lib/spline/plugins/__init__.py | 1 + lib/spline/plugins/shoutbox/__init__.py | 8 ++++++++ lib/spline/plugins/shoutbox/controllers/__init__.py | 0 lib/spline/plugins/shoutbox/controllers/shoutbox.py | 13 +++++++++++++ setup.py | 18 ++++++++++++++++++ 7 files changed, 43 insertions(+) create mode 100644 .gitignore create mode 100644 lib/spline/__init__.py create mode 100644 lib/spline/plugins/__init__.py create mode 100644 lib/spline/plugins/shoutbox/__init__.py create mode 100644 lib/spline/plugins/shoutbox/controllers/__init__.py create mode 100644 lib/spline/plugins/shoutbox/controllers/shoutbox.py create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f0f68e4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.swp +*.pyc +*.egg-info diff --git a/lib/spline/__init__.py b/lib/spline/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/lib/spline/plugins/__init__.py b/lib/spline/plugins/__init__.py new file mode 100644 index 0000000..de40ea7 --- /dev/null +++ b/lib/spline/plugins/__init__.py @@ -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 index 0000000..4d79dbf --- /dev/null +++ b/lib/spline/plugins/shoutbox/__init__.py @@ -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 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 index 0000000..c520f22 --- /dev/null +++ b/lib/spline/plugins/shoutbox/controllers/shoutbox.py @@ -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 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'], +) + -- 2.7.4