hitokoto-box

command module
v0.0.0-...-2e9af97 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

README

hitokoto-box

🌧将一条随机一言显示在 pinned gist


中文 | English

📌✨ 若想了解更多类似我的 pinned gist 项目,请查看:https://github.com/matchai/awesome-pinned-gists

使用

准备工作

  1. 创建一个公开的 GitHub Gist,文件名为🌧Hitokoto (https://gist.github.com/)
  2. 创建一个GitHub token,需要勾选 gist 权限,复制刚才创建的 token (https://github.com/settings/tokens/new)

安装

  1. Fork 我

  2. 进入你 fork 的仓库的 Actions 标签页,启用 Update gist with new hitokoto workflow

  3. .github/workflows/update.yml 中编辑环境变量

    • GIST_ID: 你的 gist url 的ID部分(后缀) https://gist.github.com/greenhandatsjtu/8c2cd8ea266a45c1aa9cb5f78d066b60.
    • CATEGORY: 你希望hitokoto-box获取的一言的类别,所有类别的编码在这里。默认值为 abh,代表动画、漫画、影视。若希望获取所有类别的一言,将本环境变量置空即可。
  4. hitokoto-box默认每小时更新一次一言,如果你想更改更新频率,需要在 .github/workflows/update.yml 中编辑 cron

  5. 前往仓库的 Settings > Secrets

  6. 点击 New repository secret 并添加如下仓库秘密 (repository secrets) :

    • GH_TOKEN: 刚才复制的 GitHub token

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL