How to use the emoji.app function in emoji

To help you get started, we’ve selected a few emoji examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github emoji-gen / web-main / src / emoji / services / history.py View on Github external
def search(limit=30, offset=0):
    if not app.config['MYSQL_ENABLED']:
        return []

    return (EmojiLog.query
        .filter(EmojiLog.public_fg == True)
        .order_by(EmojiLog.generated_at.desc())
        .offset(offset)
        .limit(limit)
        .all())
github emoji-gen / web-main / src / emoji / factory / cache.py View on Github external
def make_cache():
    timeout = app.config['CACHE_TIMEOUT']
    if app.config['MEMCACHED_ENABLED']:
        hosts = app.config['MEMCACHED_HOSTS']
        return BinarySupportedMemcachedCache(hosts, default_timeout=timeout)

    return SimpleCache(default_timeout=timeout)
github emoji-gen / web-main / src / emoji / jobs / slack.py View on Github external
'text': text,
        'font': font,
        'color': color,
        'back_color': back_color,
        'size_fixed':size_fixed,
        'align':align,
        'stretch':stretch
    }
    attachment = {
        'title': 'download emoji',
        'text': str(params),
        'image_url': 'http://emoji.pine.moe/emoji?' + urllib.parse.urlencode(params),
        'color': '#' + bar_color
    }

    slack = slackweb.Slack(url=app.config['SLACK_WEBHOOK_URL'])
    slack.notify(attachments=[attachment])
github emoji-gen / web-main / src / emoji / jobs / slack.py View on Github external
def slack_notify(text, font, color, back_color, size_fixed, align, stretch):
    if not app.config['SLACK_ENABLED']:
        return

    bar_color = color[:6]
    params = {
        'text': text,
        'font': font,
        'color': color,
        'back_color': back_color,
        'size_fixed':size_fixed,
        'align':align,
        'stretch':stretch
    }
    attachment = {
        'title': 'download emoji',
        'text': str(params),
        'image_url': 'http://emoji.pine.moe/emoji?' + urllib.parse.urlencode(params),
github emoji-gen / web-main / src / emoji / factory / cache.py View on Github external
def make_cache():
    timeout = app.config['CACHE_TIMEOUT']
    if app.config['MEMCACHED_ENABLED']:
        hosts = app.config['MEMCACHED_HOSTS']
        return BinarySupportedMemcachedCache(hosts, default_timeout=timeout)

    return SimpleCache(default_timeout=timeout)