@@ -0,0 +1,1421 @@
+#%0A# Copyright (C) 2016 Ryan Lindeman%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A#      http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing, software%0A# distributed under the License is distributed on an %22AS IS%22 BASIS,%0A# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A# See the License for the specific language governing permissions and%0A# limitations under the License.%0A%0Aimport os%0A%0Aall_flow_commands = %7B%7D%0A%0Amy_dir = os.path.dirname(__file__)%0Afor py in os.listdir(my_dir):%0A  if py == '__init__.py':%0A    continue%0A%0A  if py.endswith('.py'):%0A    name = py%5B:-3%5D%0A%0A    clsn = name.capitalize()%0A    while clsn.find('_') %3E 0:%0A      h = clsn.index('_')%0A      clsn = clsn%5B0:h%5D + clsn%5Bh + 1:%5D.capitalize()%0A%0A    mod = __import__(__name__,%0A                     globals(),%0A                     locals(),%0A                     %5B'%25s' %25 name%5D)%0A    mod = getattr(mod, name)%0A    try:%0A      cmd = getattr(mod, clsn)()%0A    except AttributeError:%0A      raise SyntaxError('%25s/%25s does not define class %25s' %25 (%0A                         __name__, py, clsn))%0A%0A    name = name.replace('_', '-')%0A    cmd.NAME = name%0A    all_flow_commands%5Bname%5D = cmd%0A%0Aif 'help' in all_flow_commands:%0A  all_flow_commands%5B'help'%5D.commands = all_flow_commands%0A

create flow subcmd directory and all_flow_commands variable