Skip to content

greenhandatsjtu/hitokoto-box

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

🌧Update a pinned gist to contain a random hitokoto

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages