コード例 #1
0
def gettags(conf, dlcs, *tags, **opts):
    """Print info about tag.
    """

    if opts['ignore_case']:
        tags = [t.lower() for t in tags]

    for tag in cached_tags(conf, dlcs, opts['keep_cache'])['tags']:
        if tag['tag'] in findtags or \
                (opts['ignore_case'] and tag['tag'].lower() in findtags):
            print jsonwrite(tag)
コード例 #2
0
ファイル: dlcs.py プロジェクト: yunxingwoo/PCI
def gettags(conf, dlcs, *tags, **opts):

    """Print info about tag.
    """

    if opts['ignore_case']:
        tags = [t.lower() for t in tags]

    for tag in cached_tags(conf, dlcs, opts['keep_cache'])['tags']:
        if tag['tag'] in findtags or \
                (opts['ignore_case'] and tag['tag'].lower() in findtags):
            print jsonwrite(tag)
コード例 #3
0
def output_prettyjson(data):
    return prettify_json(jsonwrite(data))
コード例 #4
0
def output_json(data):
    return jsonwrite(data)
コード例 #5
0
ファイル: dlcs.py プロジェクト: yunxingwoo/PCI
def output_prettyjson(data):
    return prettify_json(jsonwrite(data))
コード例 #6
0
ファイル: dlcs.py プロジェクト: yunxingwoo/PCI
def output_json(data):
    return jsonwrite(data)
コード例 #7
0
ファイル: models.py プロジェクト: andrewdefries/chemminedb
 def __str__(self):
     if self.type == 'text':
         return self.data
     return jsonwrite(self.data)