changeset 33:de3148412191

STUB: textshaper/commands.py
author Jeff Hammel <k0scist@gmail.com>
date Sun, 23 Feb 2014 16:48:09 -0800
parents 929a5e97af3e
children 88a69d587326
files textshaper/commands.py
diffstat 1 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/textshaper/commands.py	Sun Feb 23 16:48:09 2014 -0800
@@ -0,0 +1,23 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+"""
+CLI commands for textshaper
+"""
+
+class Shaper(object):
+    """individual text shaper component"""
+
+    def __init__(self, function):
+        self.function = function
+
+class Commands(object):
+
+    def __init__(self):
+        self.shapers = []
+        self.keys = {}
+
+    def add(self, function, key=None):
+        self.shapers.append(Shaper(function))
+        if key:
+            self.keys[key] = self.shapers[-1]