Exemplo n.º 1
0
def main():
    games = search_games(where='name like "%boulder%"')
    dic = dict([(norm(x.name), x) for x in games])
    name = choice(sorted(dic.keys()))
    if name:
        game = dic[name]
        run_game(game.source, game.id, auto_install=1)
Exemplo n.º 2
0
def srun(
    col_format='[source id platform] name', where='', orderby='name', name='', platform='', source='',
    runner='auto', auto_install=False,
        index=0):
    ''' search and run'''

    index = int(index)
    games = search(col_format, where, orderby, name, platform, source)
    if len(games) > index and index >= 0:
        g = games[index]
        # print 'starting game:'+g.name
        run_game(g.source, g.id, auto_install=auto_install, runner=runner)
    else:
        print 'index out of bounds!'