コード例 #1
0
ファイル: g_ms_dkong.py プロジェクト: skeezix/compo4all
def optional_prepare_template ( req ):

    return # forget it for now

    logging.info ( "dkong does attempt to modify template prior to sending to client..." )

    # fetch tally
    tally = singlescore_handler._read_tally ( req )

    if tally [ 'scoreboard' ][ 0 ][ 'prid' ] != '_default_':
        # theres a real score here
        pridfile = profile.fetch_pridfile_as_dict ( tally [ 'scoreboard' ][ 0 ][ 'prid' ] )

        if not pridfile:
            return

        if not pridfile [ 'shortname' ].isdigit():
            return

        # imprint top initials
        req [ '_bindata' ][ 7 +  8 ] = encode_char ( pridfile [ 'shortname' ][ 0 ] )
        req [ '_bindata' ][ 7 +  9 ] = encode_char ( pridfile [ 'shortname' ][ 1 ] )
        req [ '_bindata' ][ 7 + 10 ] = encode_char ( pridfile [ 'shortname' ][ 2 ] )
コード例 #2
0
ファイル: plug_scoreonly.py プロジェクト: skeezix/compo4all
def _read_tally ( req ):
    return singlescore_handler._read_tally ( req )