예제 #1
0
파일: boulder.py 프로젝트: ponty/abandi
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)
예제 #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!'