key-of-dreams

generated emoji magrittes
授权协议 AGPL-3.0 License
开发语言 Python
所属分类 应用工具、 IM/聊天/语音工具
软件类型 开源软件
地区 不详
投 递 者 云星波
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

key of dreams

a bot that generates emoji magrittes.

key of dreams

this is a twitter and mastodon bot written in javascript(typescript, actually) running onnode.js.

you can run it on your computer or remix it into something new! you'll need nodeand yarn (and git) installed. then run:

git clone https://github.com/lostfictions/key-of-dreams
cd key-of-dreams
yarn install
yarn dev

in a server environment, this bot can be run withdocker for an easier time. (i recommenddokku if you're looking for a nice way todevelop and host bots.)

the bot needs environment variables if you want it to do stuff:

  • MASTODON_TOKEN: a Mastodon user API token (required)
  • MASTODON_SERVER: the instance to which API calls should be made (usuallywhere the bot user lives.) (default: https://botsin.space/)
  • RESOURCE_DIR: the directory in which to search for image data. (default: theimages already checked in to the repo.)
  • CRON_RULE: the interval between each post, in crontab format. (default:every four hours)

this bot uses the envalid package which in turnwraps dotenv, so you can alternately stickany of the above environment variables in a file named .env in the projectroot. (it's gitignored, so there's no risk of accidentally committing privateAPI tokens you put in there.)

more bots?
 相关资料
  • key

    Key管理设备按键事件 方法: addEventListener: 添加按键事件监听器 hideSoftKeybord: 隐藏软键盘 setAssistantType: 设置辅助输入类型 showSoftKeybord: 显示软键盘 removeEventListener: 移除按键事件监听器 对象: KeyType: 按键类型 KeyEvent: 按键事件 回调方法: KeyEventCallb

  • keys *user* keys * 有3个通配符 *, ? ,[] *: 通配任意多个字符 ?: 通配单个字符 []: 通配括号内的某1个字符 注:生产已经禁止。更安全的做法是采用scan,原理和操作如下: 针对Keys的改进,支持分页查询Key。在迭代过程中,Keys有增删时不会要锁定写操作,数据集完整度不做任何保证,同一条key可能会被返回多次. 对于其他危险的命令,新版本也进行了替代:

  • of

    of / just 函数签名: of(...values, scheduler: Scheduler): Observable 按顺序发出任意数量的值。 示例 示例 1: 发出数字序列 ( StackBlitz | jsBin | jsFiddle ) // RxJS v6+ import { of } from 'rxjs'; // 依次发出提供的任意数量的值 const source = of

  • Removes value associated with an element by given key. If key is not provided, removes all the data of the element. Parameters keystringkey Returns: objectElement

  • License key is validated in an offline mode. No connection is made to any server. Starting with version 7.0.0, we require you to pass the license key in the Settings object in each instance of Handson

  • 管理服务器,向 git 远程推送代码,做这些事之前都需要先验证你的身份,一般就是使用你的用户名与密码。ssh-key 可以让你不再输入用户名与密码就能做这些事。在你电脑上生成 ssh-key ,它是一对,一个私钥(Private key),一个公钥(Public key)。 然后你去配置一下服务(服务器,git 远程服务 ... ),把你生成的 ssh-key 的公钥告诉这些服务。这样你再使用这些