__init__.py 689 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. import logging
  2. import audio_output
  3. import console
  4. import slack_bot
  5. import conf
  6. SERVICES = [
  7. console.Console(),
  8. ]
  9. if conf.ENABLE_SOUND_OUTPUT:
  10. SERVICES.append(audio_output.AudioOutput())
  11. if conf.SLACK_BOT_API_KEY:
  12. SERVICES.append(slack_bot.SlackBot())
  13. def success():
  14. for service in SERVICES:
  15. service.success()
  16. def failure(s=None):
  17. for service in SERVICES:
  18. service.failure(s)
  19. def cancelled():
  20. for service in SERVICES:
  21. service.cancelled()
  22. def tts(s):
  23. for service in SERVICES:
  24. service.tts(s)
  25. def text(s):
  26. for service in SERVICES:
  27. service.text(s)
  28. def debug(s):
  29. for service in SERVICES:
  30. service.debug(s)