# -*- coding: iso-8859-1 -*-

#------------------------------------------------------------------------------
class Help(object):
  #----------------------------------------------
  def dir(self, topic):
    if topic in ('help', 'wiki', 'ans'):
      return 'general'

    if topic in ('ohm', 'rserial', 'rparallel', 'cserial', 'cparallel'):
      return 'electronics'

    if topic in ('e', 'pi', 'g'):
      return 'constantes'

    if topic in ('sqrt', 'min', 'max', 'floor', 'ceil', 'abs', 'fabs', 'fmod', 'sqr',
                 'exp', 'pow', 'pyth', 'log', 'ln', 'logn', 'log10', 'complex'):
      return 'math'

    if topic in ('circle', 'sphere', 'cylinder', 'rectangle', 'square', 'triangle',
                 'cube', 'pyramid', 'cone', 'prism', 'polyhedron'):
      return 'geometry'

    if topic in ('sin', 'cos', 'tan', 'asin', 'acos', 'atan', 'atan2', 'hypot',
                 'sind', 'cosd', 'tand', 'asind', 'acosd', 'atand', 'degrees', 'radians',
                 'sinh', 'cosh', 'tanh', 'cotanh', 'argsinh', 'argcosh', 'argtanh', 'argcotanh',
                 'sinhd', 'coshd', 'tanhd', 'cotanhd', 'argsinhd', 'argcoshd', 'argtanhd', 'argcotanhd'):
      return 'trigonometry'

    return ''

#------------------------------------------------------------------------------
class Wiki(object):
  #----------------------------------------------
  def dir(self, topic):
    if topic in ('ohm', 'rserial', 'rparallel', 'cserial', 'cparallel'):
      return 'electronics'

    if topic in ('circle', 'sphere', 'cylinder', 'rectangle', 'square', 'triangle',
                 'cube', 'pyramid', 'cone', 'prism', 'polyhedron'):
      return 'geometry'

    return ''
