コード例 #1
0
ファイル: creators.py プロジェクト: vangroan/dosage
def print_results(args):
    """Print comics."""
    min_comics, filename = args
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, path in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            lang = 'Es' if name.lower().endswith('spanish') else ''
            if has_gocomics_comic(name):
                fp.write(u'# %s has a duplicate in gocomics\n' % truncate_name(name))
            else:
                fp.write(u"class %s(_Creators%s):\n    path = %r\n\n" %
                        (truncate_name(name), lang, path))
コード例 #2
0
def print_results(min_strips):
    """Print all comics that have at least the given number of minimum comic strips."""
    for name, entry in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        path, num = entry
        if num >= min_strips:
            print("add(%r, %r)" % (str(truncate_name(name)), str(path)))
コード例 #3
0
ファイル: arcamax.py プロジェクト: dromaludaire/dosage
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    for name, shortname in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        if has_comic(name):
            prefix = '#'
        else:
            prefix = ''
        print("%sadd(%r, %r)" % (prefix, str(truncate_name(name)), str(shortname)))
コード例 #4
0
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    min_comics, filename = args
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, shortname in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            fp.write(u"add(%r, %r)\n" % (
              str(truncate_name(name)), str(shortname))
            )
コード例 #5
0
ファイル: gocomics.py プロジェクト: pataluc/dosage
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    min_comics, filename = args
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, shortname in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            fp.write(u"add(%r, %r)\n" % (
              str(truncate_name(name)), str(shortname))
            )
コード例 #6
0
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    for name, shortname in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        if has_comic(name):
            prefix = '#'
        else:
            prefix = ''
        print("%sadd(%r, %r)" %
              (prefix, str(truncate_name(name)), str(shortname)))
コード例 #7
0
def print_results(args):
    """Print comics."""
    min_comics, filename = args
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, url in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            if has_gocomics_comic(name):
                prefix = u'# duplicate of gocomics '
            else:
                prefix = u''
            fp.write(u"%sadd(%r, %r)\n" %
                     (prefix, str(truncate_name(name)), str(url)))
コード例 #8
0
def print_results(args):
    """Print all comics."""
    for name, entry in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        url, desc = entry
        if has_comic(name):
            prefix = '#'
        else:
            prefix = ''
        name = truncate_name(name).encode('utf-8')
        url = url.encode('utf-8')
        desc = desc.encode('utf-8')
        print("%sadd(%r, %r, %r)" % (prefix, name, url, desc))
コード例 #9
0
ファイル: keenspot.py プロジェクト: Freestila/dosage
def print_results(args):
    """Print all comics."""
    min_comics, filename = args
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, entry in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            url = entry
            if has_comic(name):
                prefix = u'#'
            else:
                prefix = u''
            name = truncate_name(name)
            fp.write(u"%sadd(%r, %r)\n" % (prefix, str(name), str(url)))
コード例 #10
0
ファイル: keenspot.py プロジェクト: dromaludaire/dosage
def print_results(args):
    """Print all comics."""
    for name, entry in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        url, desc = entry
        if has_comic(name):
            prefix = '#'
        else:
            prefix = ''
        name = truncate_name(name).encode('utf-8')
        url = url.encode('utf-8')
        desc = desc.encode('utf-8')
        print("%sadd(%r, %r, %r)" % (prefix, name, url, desc))
コード例 #11
0
ファイル: keenspot.py プロジェクト: KevinAnthony/dosage
def print_results(args):
    """Print all comics."""
    min_comics, filename = args
    with codecs.open(filename, "a", "utf-8") as fp:
        for name, entry in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            url = entry
            if has_comic(name):
                prefix = u"#"
            else:
                prefix = u""
            name = truncate_name(name)
            fp.write(u"%sadd(%r, %r)\n" % (prefix, str(name), str(url)))
コード例 #12
0
ファイル: creators.py プロジェクト: Arwarld/dosage
def print_results(args):
    """Print comics."""
    min_comics, filename = args
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, url in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            if has_gocomics_comic(name):
                prefix = u'# duplicate of gocomics '
            else:
                prefix = u''
            fp.write(u"%sadd(%r, %r)\n" % (
              prefix, str(truncate_name(name)), str(url))
            )
コード例 #13
0
ファイル: comicgenesis.py プロジェクト: shartge/dosage
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    min_comics = int(args[0])
    for name, entry in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        url, num = entry
        if num < min_comics:
            continue
        url = url.replace("comicgen.com", "comicgenesis.com")
        if has_comic(name):
            prefix = '#'
        else:
            prefix = ''
        print("%sadd(%r, %r)" % (prefix, str(truncate_name(name)), str(url)))
コード例 #14
0
ファイル: comicgenesis.py プロジェクト: dromaludaire/dosage
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    min_comics = int(args[0])
    for name, entry in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        url, num = entry
        if num < min_comics:
            continue
        url = url.replace("comicgen.com", "comicgenesis.com")
        if has_comic(name):
            prefix = '#'
        else:
            prefix = ''
        print("%sadd(%r, %r)" % (prefix, str(truncate_name(name)), str(url)))
コード例 #15
0
ファイル: comicfury.py プロジェクト: dromaludaire/dosage
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    min_comics = int(args[0])
    for name, entry in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        url, desc, num, genre, active = entry
        if num < min_comics:
            continue
        if has_comic(name):
            prefix = '#'
        else:
            prefix = ''
        print("%sadd(%r, %r, %r)" % (
          prefix, str(truncate_name(name)), str(url), desc
        ))
コード例 #16
0
ファイル: smackjeeves.py プロジェクト: shartge/dosage
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    min_comics = int(args[0])
    for name, entry in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        url, num, desc, adult, bounce = entry
        if num < min_comics:
            continue
        if has_comic(name):
            prefix = '#'
        else:
            prefix = ''
        print(
            "%sadd(%r, %r, %r, %s, %s)" %
            (prefix, str(truncate_name(name)), str(url), desc, adult, bounce))
コード例 #17
0
ファイル: comicgenesis.py プロジェクト: pataluc/dosage
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    min_comics, filename = args
    min_comics = int(min_comics)
    with codecs.open(filename, "a", "utf-8") as fp:
        for name, entry in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            url, num = entry
            if num < min_comics:
                continue
            url = url.replace("comicgen.com", "comicgenesis.com")
            if has_comic(name):
                prefix = u"#"
            else:
                prefix = u""
            fp.write(u"%sadd(%r, %r)\n" % (prefix, str(truncate_name(name)), str(url)))
コード例 #18
0
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    min_comics, filename = args
    min_comics = int(min_comics)
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, entry in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            url, desc, num, genre, active = entry
            if num < min_comics:
                continue
            if has_comic(name):
                prefix = u'#'
            else:
                prefix = u''
            fp.write(u"%sadd(%r, %r, %r)\n" %
                     (prefix, str(truncate_name(name)), str(url), desc))
コード例 #19
0
ファイル: smackjeeves.py プロジェクト: Freestila/dosage
def print_results(args):
    """Print all comics that have at least the given number of minimum comic strips."""
    min_comics, filename = args
    min_comics = int(min_comics)
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, entry in sorted(load_result(json_file).items()):
            if name in exclude_comics:
                continue
            url, num, adult, bounce = entry
            if num < min_comics:
                continue
            if has_comic(name):
                prefix = u'#'
            else:
                prefix = u''
            fp.write(u"%sadd(%r, %r, %s, %s)\n" % (
              prefix, str(truncate_name(name)), str(url), adult, bounce
            ))
コード例 #20
0
ファイル: comicfury.py プロジェクト: vangroan/dosage
def print_results(args):
    """Print all comics that have at least the given number of minimum
    comic strips."""
    min_comics, filename = args
    min_comics = int(min_comics)
    with codecs.open(filename, 'a', 'utf-8') as fp:
        for name, entry in sorted(load_result(json_file).items()):
            url, num, active, lang = entry
            if name in exclude_comics:
                fp.write(u"# %s is excluded\n" % name)
                continue
            if num < min_comics:
                continue
            dup = find_dups(name)
            if dup is not None:
                fp.write(u"# %s has a duplicate in %s\n" % (name, dup))
            else:
                fp.write(u"class CF%s(_ComicFury):\n    url = %r\n\n\n" % (
                         truncate_name(name), str(url)))
コード例 #21
0
def print_results(args):
    """Print comics."""
    for name, url in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        print("add(%r, %r)" % (str(truncate_name(name)), str(url)))
コード例 #22
0
ファイル: creators.py プロジェクト: dromaludaire/dosage
def print_results(args):
    """Print comics."""
    for name, url in sorted(load_result(json_file).items()):
        if name in exclude_comics:
            continue
        print("add(%r, %r)" % (str(truncate_name(name)), str(url)))