想找一些历史上的今天数据,发现没有那种二刺猿的...
干脆自己写一个x
项目地址
目前数据
本项目托管在github上,可以通过提交pr添加数据
以下为README.md
today In History
历史上的今天
[示例网页](<a href="https://www.mcbbs.net/plugin.php?id=link_redirect&target=https%3A%2F%2Fdituon.github.io%2FtodayInHistory%2F" target="_blank">https://dituon.github.io/todayInHistory/</a>)
结构
data 为根目录, 目前有 anime 和 meme 两个子类
子类下的日期按照mm-dd格式排序, 日期文件夹内储存当日事件数据
事件数据为 json 格式, 标准如下:
(以 data/meme/05-24/cherry.json 为例)
{
"id": "cherry",
"res": ".png",
"date": "2016-5-24",
"title": "陈睿 —— b站未来有可能会倒闭,但绝不会变质。"
}id: 用于识别此事件, 同一日期下不能重复res: 资源文件(图片格式); 可简写为拓展名(".png"等价于"cherry.png")date: 日期,yyyy-mm-dd格式title: 事件描述,自由发挥
各级目录下由index.json索引
提交
对事件进行垃圾分类是非常麻烦的, 本项目由机器人完成自动分类
在子类下有autoFile目录, 可直接提交更改到此目录
机器人会在几秒钟内自动将事件移动到正确目录
步骤
> 方法1: (此方法适用于大量编辑)
点击右上角
Fork按钮, 将此项目fork到自己的账户中
使用 [Git](<a href="https://www.mcbbs.net/plugin.php?id=link_redirect&target=https%3A%2F%2Fgit-scm.com%2F" target="_blank">https://git-scm.com/</a>) 或 [GitHub Disktop](<a href="https://desktop.github.com/" target="_blank">https://desktop.github.com/</a>) 克隆此仓库
- Git:
git clone <a href="https://github.com/Dituon/todayInHistory.git" target="_blank">https://github.com/Dituon/todayInHistory.git`</a> - GitHub Disktop:
File=>Clone reposit...=>todayInHistory=>Clone
- Git:
在本地编辑后提交更改
- Git:
git add .
git commit -m "something"
git push origin main - GitHub Disktop:
Commit to main=>Push origin
- Git:
提交[Pull requests](<a href="https://github.com/Dituon/todayInHistory/compare" target="_blank">https://github.com/Dituon/todayInHistory/compare</a>)
> 方法2: (少量文件)
进入 [anime/autoFile](<a href="https://github.com/Dituon/todayInHistory/new/main/data/anime/autoFile" target="_blank">https://github.com/Dituon/todayI ... data/anime/autoFile</a>) 或 [meme/autoFile](<a href="https://github.com/Dituon/todayInHistory/new/main/data/meme/autoFile" target="_blank">https://github.com/Dituon/todayI ... /data/meme/autoFile</a>) 目录
点击右上角
Add file=>Create new file, 参考 [结构](<a href="https://github.com/Dituon/todayInHistory#%E7%BB%93%E6%9E%84" target="_blank">https://github.com/Dituon/todayInHistory#%E7%BB%93%E6%9E%84</a>) 中的格式编写json文件并提交
点击右上角
Add file=>Upload files, 上传res中对应的图片文件并提交
> 更改合并到主仓库后, 可以在[示例网页](<a href="https://www.mcbbs.net/plugin.php?id=link_redirect&target=https%3A%2F%2Fdituon.github.io%2FtodayInHistory%2F" target="_blank">https://dituon.github.io/todayInHistory/</a>)中看到添加的事件
规范
- 对于具体年份未知的事件, 应当以作品发行年份作为事件年份
- 对于设定发生在未来或古代的事件, 年份范围为
0001 - 9999 - 对于不存在的日期, 如
12月32日, 应向下取最接近的日期
欢迎PR
如果数据够多的话我就写个api, 之类的(