#!/usr/bin/env python

import musicazoo.lib.bot as bot
import subprocess

ENDPOINT = "http://localhost:8080/queue"

fortune_text = subprocess.check_output(['/usr/games/fortune', '-s'])

data = {'cmd': 'add',
        'args': {
            'type': 'text',
            'args': {
                'text': fortune_text,
                #'screen_preprocessor': 'none',
                'speech_preprocessor': 'pronounce_fortune',
                'text2speech': 'google',
                'text2screen': 'paragraph',
                #'renderer': 'mono_paragraph',
                'duration': 5,
            }
        }
    }

print(bot.request(data, ENDPOINT))
