• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

impiaaa/mastodon_import_emoji: Import Mastodon custom emoji from various places ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

impiaaa/mastodon_import_emoji

开源软件地址(OpenSource Url):

https://github.com/impiaaa/mastodon_import_emoji

开源编程语言(OpenSource Language):

Ruby 100.0%

开源软件介绍(OpenSource Introduction):

Mastodon custom emoji importer

Usage

Run from inside your Mastodon ("live") directory: bundle exec rails runner import_emoji.rb [options] [command]

Options

--prefix [prefix] Prefix shortcodes of all imported emoji with a string

--dry-run Don't actually save anything to the database

--match [regexp] Only import emoji with shortcodes that match the given regular expression

--lower Convert all shortcodes to lowercase

--square Add padding to images to ensure a 1:1 aspect ratio

--minsize Images smaller than this size (format WxH) are padded to be this size

--hide Hide imported emoji from the emoji picker

--no-overwriting By default, the script will remove any custom emoji with the same shortcode as a new one before adding the new one. This disables that functionality, and will not import any emoji with conflicting shortcodes.

--convert-gif Convert animated GIF to animated PNG. Requires gif2apng to be installed.

Commands

steamgame [appid|title] Import all emotes from a Steam game, either given its numeric AppID, or the (start of) the game name. Requires the nokogiri Ruby gem.

steamprofile [steam64id] Import all Steam emotes available to a user given their profile ID (find that here).

twitchchannel [channel] Import the emotes available to subscribers of the given Twitch.tv channel, or available to all if no channel is given.

twitchsubscriptions [username] Import the Twitch.tv emotes available to a user given their login name.

files [path] Import all PNG files in the given directory (recursive), using each file name as a shortcode.

slack Import all of the custom emoji from a Slack team. Get an API key at https://api.slack.com/apps/.../oauth and export it in the SLACK_API_TOKEN environment variable. Requires the slack-ruby-client gem.

discord Import all of the custom emoji from a Discord server. Get a bot token at https://discordapp.com/developers/applications/me/... and export it in the DISCORD_API_TOKEN environment variable, and join the bot to your channel with the client ID here. Requires the discordrb gem.

mastodon [base url] Copy all custom emoji from an existing Mastodon instance, via its public API.

hashflags [time] Import all Twitter promoted hashtag emoji, limited to campaigns active at the given date and time, or now if no time is given.

emojipack [path or url] Import an "emojipack" YAML from the given URL or file path. Requires the safe_yaml gem.

Examples

import_emoji.rb --prefix tf --minsize 20x20 steamgame 440 Import Steam emotes for Team Fortress 2, and add a "tf" prefix to each shortcode, and expand each image to 20x20 pixels

import_emoji.rb --match "^[a-zA-Z0-9_]{2,}$" --lower twitchchannel Import Twitch.tv global emotes (but only with alphanumeric codes) and make the codes lowercase

import_emoji.rb --hide files monstrous_specification_0.1.0_png64/emoji/ Import all emoji from the (downloaded and extracted) Monstrous Specification emoji set, but hide them from the picker by default.




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
DearRude/mastodon_exporter: A mastodon prometheus metrics exporter发布时间:2022-08-17
下一篇:
mattn/mastodon-vimgirl发布时间:2022-08-17
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap