コード例 #1
0
ファイル: metadatabase.py プロジェクト: century-arcade/xd
def xd_similar_all():
    ''' returns a list of all similar grids '''

    ret = []
    for r in utils.parse_tsv_rows('gxd/similar.tsv', 'Similar'):
        matches = [x.split('=') for x in r.matches.split()]
        for match_xdid, pct in matches:
            ret.append(xd_similar_tuple(r.xdid, match_xdid, int(pct)))

    return ret
コード例 #2
0
def xd_similar_all():
    ''' returns a list of all similar grids '''

    ret = []
    for r in utils.parse_tsv_rows('gxd/similar.tsv', 'Similar'):
        matches = [x.split('=') for x in r.matches.split()]
        for match_xdid, pct in matches:
            ret.append(xd_similar_tuple(r.xdid, match_xdid, int(pct)))

    return ret
コード例 #3
0
ファイル: metadatabase.py プロジェクト: century-arcade/xd
def read_rows(tablename):
    tsvpath = tablename + ".tsv"
    basename = tablename.split('/')[-1]
    return utils.parse_tsv_rows(tsvpath, basename)
コード例 #4
0
ファイル: metadatabase.py プロジェクト: century-arcade/xd
def xd_recent_downloads():
    return dict((r.pubid, r) for r in utils.parse_tsv_rows(RECENT_DOWNLOADS_TSV))
コード例 #5
0
ファイル: metadatabase.py プロジェクト: century-arcade/xd
def xd_puzzle_sources():
    return dict((r.pubid, r) for r in utils.parse_tsv_rows(PUZZLE_SOURCES_TSV))
コード例 #6
0
ファイル: metadatabase.py プロジェクト: century-arcade/xd
def _puzzles():
    return utils.parse_tsv_rows('pub/puzzles.tsv', "Puzzle")
コード例 #7
0
ファイル: metadatabase.py プロジェクト: century-arcade/xd
def xd_receipts_rows():
    return utils.parse_tsv_rows(RECEIPTS_TSV, "Receipt")
コード例 #8
0
def read_rows(tablename):
    tsvpath = tablename + ".tsv"
    basename = tablename.split('/')[-1]
    return utils.parse_tsv_rows(tsvpath, basename)
コード例 #9
0
def xd_recent_downloads():
    return dict(
        (r.pubid, r) for r in utils.parse_tsv_rows(RECENT_DOWNLOADS_TSV))
コード例 #10
0
def xd_puzzle_sources():
    return dict((r.pubid, r) for r in utils.parse_tsv_rows(PUZZLE_SOURCES_TSV))
コード例 #11
0
def _puzzles():
    return utils.parse_tsv_rows('pub/puzzles.tsv', "Puzzle")
コード例 #12
0
def xd_receipts_rows():
    return utils.parse_tsv_rows(RECEIPTS_TSV, "Receipt")