예제 #1
0
파일: tagapp.py 프로젝트: thejbw/bpm-master
def get_css(source_name):
    if source_name not in css_cache:
        css_rules = bpgen.build_css(context.sources[source_name].emotes.values())
        stream = StringIO.StringIO()
        bpgen.dump_css(stream, css_rules)
        css_cache[source_name] = stream.getvalue()
    return css_cache[source_name]
예제 #2
0
def get_css(subreddit):
    if subreddit not in css_cache:
        css_rules = bpgen.build_css(files[subreddit].emotes.values())
        stream = StringIO.StringIO()
        bpgen.dump_css(stream, css_rules)
        css_cache[subreddit] = stream.getvalue()
    return css_cache[subreddit]
예제 #3
0
파일: tagapp.py 프로젝트: nano23823/bpm
def get_css(source_name):
    if source_name not in css_cache:
        css_rules = bpgen.build_css(context.sources[source_name].emotes.values())
        stream = StringIO.StringIO()
        bpgen.dump_css(stream, css_rules)
        css_cache[source_name] = stream.getvalue()
    return css_cache[source_name]