Mercurial > hg > TextShaper
diff textshaper/commands.py @ 33:de3148412191
STUB: textshaper/commands.py
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Sun, 23 Feb 2014 16:48:09 -0800 |
parents | |
children | 88a69d587326 |
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]