Universal-Team/db
GitHub: Universal-Team/db
Universal-DB 是一个为3DS和DS homebrew应用提供的在线数据库,解决了应用分散和管理不便的问题。
Stars: 185 | Forks: 72
# 通用-DB
[](https://crowdin.com/project/universal-db)
## 用途
- https://db.universal-team.net,通过 GitHub Pages 从此仓库托管,这是官方 Universal-DB 网站
- [Universal-Updater](https://github.com/Universal-Team/Universal-Updater),Universal-DB 是 Universal-Updater 的默认 UniStore
- [Universal-Bot](https://github.com/Universal-Team/Universal-Bot),我们的 Discord 机器人,使用 `?db` 你可以在 Universal-DB 上搜索应用
- [UDB-API](https://github.com/LightSage/UDB-API) 由 [LightSage](https://github.com/LightSage) 提供,一个用于 Universal-DB 的正式 API
## 支持自动数据收集的网站
这些网站是托管下载的首选地点,因为 Universal-DB 可以自动获取大部分相关信息。只要网站有足够信息且易于获取(最好有某种 API),就可以添加更多网站。
- [GitHub](https://github.com):完全支持
- [Bitbucket](https://bitbucket.org):部分支持
- [Gitlab](https://gitlab.com):部分支持
## 使用数据
由于 Universal-DB 由 GitHub Pages 托管,我们无法拥有正式的 API,但你可以使用 `docs/data/full.json` 获取我们从 GitHub API 等收集的所有数据,全部集中在一个地方,或者使用 LightSage 的 [UDB-API](https://udb-api.lightsage.dev) 作为非官方正式 API。如果使用 `full.json`,可以从 https://db.universal-team.net/data/full.json 访问。
如果你希望向 `full.json` 添加任何内容,请在此处提交 issue 或在 [我们的 Discord 服务器](https://universal-team.net/discord) 上询问,如果可能,我们会尝试添加。
如果你使用我们的数据,请注明我们的功劳,只需链接到此仓库或官方网站,并注明“数据来自 [Universal-DB](https://github.com/Universal-Team/db)”之类的即可。
## 运行数据收集
Universal-DB 使用 GitHub Actions 每小时/每 6 小时自动更新一次(取决于应用的优先级),但如果你想自己运行数据收集和文件生成,则需要:
1. 使用 [devkitPro 的 pacman](https://devkitpro.org/wiki/Getting_Started) 安装 `tex3ds` 和 `grit`
- 这些是生成 Universal-Updater 的 UniStore 所需的 t3x 文件所必需的
2. 安装最新版本的 [Python 3](https://www.python.org)
3. 在此仓库的 `source` 文件夹中打开终端窗口
4. 运行 `pip3 install -r requirements.txt` 以安装所需的 Python 库
5. 运行 `python3 generate.py`
- 你可以传递 GitHub API 令牌作为第一个参数来扩展你的 API 速率限制,这对于默认应用是必需的
- 你可以传递 `priority` 作为第二个参数,仅更新过去 30 天内更新过的应用
`source/apps` 中的 JSON 文件是基础数据的来源,所有应用都应具有 `github`(用户/仓库字符串)、`systems`(字符串数组)、`categories`(字符串数组)、`image`(URL 字符串)和 `icon`(URL 字符串)。如果应用不在 GitHub 上,则需要填写大部分其他信息。某些信息也可以从 Bitbucket API 中获取,但比 GitHub 更复杂,请查看当前文件中的示例。如果 `priority` 为 `true`,则应用将由 Actions 每小时检查一次,而不是每 6 小时一次。从技术上讲,所有内容都可以每小时更新,但由于大量应用很少更新,因此每 6 小时更新一次以减少对 GitHub API 的垃圾邮件。
`full.json` 中的所有信息都可以通过在源 JSON 中指定来覆盖 GitHub API,例如,如果你想让应用标题使用空格而不是连字符。
运行 `generate.py` 将生成以下文件:
- `docs/_3ds` 中每个 3DS 应用的 Markdown 文件
- `docs/_ds` 中每个 DS 应用的 Markdown 文件
- `docs/data/full.json`,包含所有收集信息的 JSON
- `docs/unistore/universal-db.unistore`,用于 Universal-Updater 的 UniStore 格式文件
- `docs/unistore/universal-db.t3x`,用于 Universal-Updater 的 t3x 格式精灵图
## 在本地运行网站
所有网站文件都存储在 `docs` 文件夹中。要在本地测试网站,请通过运行以下命令安装 Jekyll:
```
gem install bundler jekyll
```
然后运行
```
bundle install
```
然后你可以在 `docs` 文件夹中运行此命令来运行网站:
```
bundle exec jekyll serve
```
# 鸣谢
- [Pk11](https://github.com/Epicpkmn11):大部分网站设计和数据收集代码
- [TrianguloY](https://github.com/TrianguloY):许多背景图片,每月一张
- [devkitPro](https://github.com/devkitPro):tex3ds
标签:3DS homebrew, DNS解析, DS homebrew, GitHub Pages, Homebrew安装, homebrew管理, JSON数据, 任天堂平台, 在线数据库, 开源项目, 技术栈, 数据管理, 数据防泄漏, 游戏工具, 游戏库, 游戏数据库, 社区数据库, 自制软件, 自动化数据收集, 软件仓库, 软件分发, 逆向工具