-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Documentation i18n is supported (#364)
* Update linter.yml, exclude example.com
- Loading branch information
1 parent
546785e
commit c379fb4
Showing
34 changed files
with
745 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
# 贡献 | ||
|
||
你好!非常高兴看到你想为这个项目做出贡献。你的帮助对于保持项目的优秀非常重要。 | ||
|
||
请注意,这个项目发布了[贡献者行为准则][code-of-conduct]。参与这个项目的过程中,你同意遵守这个准则。 | ||
|
||
## 发布新版本 | ||
|
||
我们使用[semantic-release](https://github.com/semantic-release/semantic-release)来自动发布新版本。 | ||
|
||
一次只会提升一个版本号,最高版本的更改会覆盖其他版本的更改。除了将 Docker 镜像发布到 Docker Hub 和 GitHub Packages,semantic-release 还会在 GitHub 上创建 Git 标签和发布,生成版本二进制文件摘要并将其放入发布说明中。 | ||
|
||
## 提交 Pull Requests | ||
|
||
1. [Fork][fork] 并克隆仓库。 | ||
2. 确保你的机器上测试通过:`make test` 或 `go test -v ./...` | ||
3. 创建新分支:`git checkout -b my-branch-name` | ||
4. 进行更改、添加测试,并确保测试仍然通过。 | ||
5. 推送到你的 Fork 上并[提交 Pull Requests][pr]。 | ||
6. 为自己鼓掌,等待你的 Pull Request 被审查并合并。 | ||
|
||
我们也欢迎 Work in Progress 的 Pull Requests,以便你可以尽早得到反馈,或者如果你有什么困难。 | ||
|
||
## 报告 Bug | ||
|
||
### 先决条件 | ||
|
||
创建 Bug 报告时,最重要的细节是确定是否真的需要创建一个 Bug 报告。 | ||
|
||
#### 先做研究 | ||
|
||
你是否研究过现有的问题、已关闭和开放的问题,看看其他用户是否遇到并可能已经解决了你遇到的相同问题? | ||
|
||
#### 描述问题,不要轻易得出结论 | ||
|
||
最近,我和另一位维护者讨论了这个话题。我们想知道我们处理了多少个标题中包含 "Bug" 这个词或类似的内容的问题,最终发现是用户错误或绝对不是 Bug。这只是一个猜测,但我认为说只有 10 个标题中带有 "Bug" 的报告中,只有 1 个最终是 Bug。 | ||
|
||
### 重要细节 | ||
|
||
当需要 Bug 报告时,绝大多数的 Bug 报告应该包括以下四个信息: | ||
|
||
1. `版本` | ||
2. `描述` | ||
3. `错误信息` | ||
4. `代码` | ||
|
||
## 功能请求 | ||
|
||
在提交功能请求之前,请尝试熟悉项目。了解项目是否有特定的目标或指导方针,描述功能请求的方式应该是怎样的。 | ||
|
||
## 刚开始?寻找如何帮助? | ||
|
||
使用[这个搜索工具][good-first-issue-search]查找已标记为 `good-first-issue` 的 Wayback Archiver 问题。 | ||
|
||
## 资源 | ||
|
||
- [如何贡献开源项目](https://opensource.guide/how-to-contribute/) | ||
- [使用 Pull Requests](https://help.github.com/articles/about-pull-requests/) | ||
- [GitHub 帮助](https://help.github.com) | ||
|
||
[fork]: https://github.com/wabarc/wayback/fork | ||
[pr]: https://github.com/wabarc/wayback/compare | ||
[code-of-conduct]: ./CODE_OF_CONDUCT.md | ||
[good-first-issue-search]: https://github.com/search?q=org%3Awabarc+good-first-issues%3A%3E0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
--- | ||
title: 部署 | ||
--- | ||
|
||
Wayback可以使用Docker/Podman容器部署,也可以轻松部署在Heroku和Render等云平台上。 | ||
|
||
## Docker/Podman | ||
|
||
```sh | ||
docker pull wabarc/wayback | ||
docker run -d wabarc/wayback wayback -d telegram -t YOUR-BOT-TOKEN # without telegram channel | ||
docker run -d wabarc/wayback wayback -d telegram -t YOUR-BOT-TOKEN -c YOUR-CHANNEL-USERNAME # with telegram channel | ||
``` | ||
|
||
## 一键部署 | ||
|
||
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/wabarc/wayback) | ||
<a href="https://render.com/deploy?repo=https://github.com/wabarc/on-render"> | ||
<img | ||
src="https://render.com/images/deploy-to-render-button.svg" | ||
alt="Deploy to Render" | ||
width="155px" | ||
/> | ||
</a> | ||
|
||
## 快速部署 | ||
|
||
- [wabarc/on-heroku](https://github.com/wabarc/on-heroku) | ||
- [wabarc/on-github](https://github.com/wabarc/on-github) | ||
- [wabarc/on-render](https://github.com/wabarc/on-render) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
title: 简介 | ||
--- | ||
|
||
Wayback是一个网络存档和回放工具,可以帮助用户捕获和保存网络内容。它提供了一个会话界面,用于爬取和存档网络内容,以及一个搜索和回放服务,用于访问先前存档的页面。Wayback旨在供网络存档员、研究人员以及任何想要保存网络内容并在未来访问它的人使用。 | ||
|
||
Wayback是用Go编写的开源网络存档应用程序。具有模块化和可定制化的架构,它被设计成灵活和适应各种用例和环境。它提供了对多个存储后端的支持,并与其他服务集成。 | ||
|
||
无论您需要存档单个网页还是大量网站的集合,Wayback都可以帮助您为后人捕获和存储网络内容。凭借其用户友好的界面和强大的功能,Wayback是对网络存档和保护感兴趣的任何人都非常有价值的工具。 | ||
|
||
## 特性 | ||
|
||
- 完全开源 | ||
- 跨平台兼容 | ||
- 批量存档URL以加快存档速度 | ||
- 内置CLI工具(`wayback`)以便于使用 | ||
- 可作为Tor隐藏服务或本地Web入口,增加隐私和可访问性 | ||
- 更容易地集成到Internet Archive、archive.today、IPFS和Telegraph中 | ||
- 可与IRC、Matrix、Telegram机器人、Discord机器人、Mastodon和Twitter进行交互,作为守护进程服务,以便于使用 | ||
- 支持将存档结果发布到Telegram频道、Mastodon和GitHub Issues中进行共享 | ||
- 支持将存档文件存储到磁盘中以供离线使用 | ||
- 下载流媒体(需要[FFmpeg](https://ffmpeg.org/))以便于媒体存档。 | ||
|
||
## 工作原理 | ||
|
||
![How wayback works](./assets/wayback.svg "How wayback works") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
## 前提条件 | ||
|
||
Wayback需要至少512MB的内存,并且可以安装以下一些可选软件包。 | ||
|
||
- [Chromium](https://www.chromium.org/Home): Wayback使用一个无头Chromium来捕获网页以进行存档。 | ||
- [Tor](https://www.torproject.org/): Wayback可以使用Tor作为代理以匿名地爬取网页,同时也可以作为一个洋葱服务,允许用户通过Tor网络访问存档内容。 | ||
- [youtube-dl](https://github.com/ytdl-org/youtube-dl/) or [You-Get](https://you-get.org/): Wayback可以使用这些工具之一来下载媒体以进行存档。 | ||
- [libwebp](https://developers.google.com/speed/webp/) library: Wayback在必要时使用libwebp将WebP图像转换为其他格式。 | ||
|
||
## 安装 | ||
|
||
最简单的跨平台方式是从[GitHub发布页面](https://github.com/wabarc/wayback/releases)下载并将可执行文件放置于您的**PATH**变量中。 | ||
|
||
从源码安装: | ||
|
||
```sh | ||
go install github.com/wabarc/wayback/cmd/wayback@latest | ||
``` | ||
|
||
下载预先编译的二进制文件: | ||
|
||
```sh | ||
curl -fsSL https://github.com/wabarc/wayback/raw/main/install.sh | sh | ||
``` | ||
|
||
通过 [Bina](https://bina.egoist.dev/): | ||
|
||
```sh | ||
curl -fsSL https://bina.egoist.dev/wabarc/wayback | sh | ||
``` | ||
|
||
使用 [Snapcraft](https://snapcraft.io/wayback) (on GNU/Linux) | ||
|
||
```sh | ||
sudo snap install wayback | ||
``` | ||
|
||
通过 [APT](https://repo.wabarc.eu.org/deb:wayback): | ||
|
||
```bash | ||
curl -fsSL https://repo.wabarc.eu.org/apt/gpg.key | sudo gpg --dearmor -o /usr/share/keyrings/packages.wabarc.gpg | ||
echo "deb [arch=amd64,arm64,armhf signed-by=/usr/share/keyrings/packages.wabarc.gpg] https://repo.wabarc.eu.org/apt/ /" | sudo tee /etc/apt/sources.list.d/wayback.list | ||
sudo apt update | ||
sudo apt install wayback | ||
``` | ||
|
||
通过 [RPM](https://repo.wabarc.eu.org/rpm:wayback): | ||
|
||
```bash | ||
sudo rpm --import https://repo.wabarc.eu.org/yum/gpg.key | ||
sudo tee /etc/yum.repos.d/wayback.repo > /dev/null <<EOT | ||
[wayback] | ||
name=Wayback Archiver | ||
baseurl=https://repo.wabarc.eu.org/yum/ | ||
enabled=1 | ||
gpgcheck=1 | ||
gpgkey=https://repo.wabarc.eu.org/yum/gpg.key | ||
EOT | ||
|
||
sudo dnf install -y wayback | ||
``` | ||
|
||
通过 [Homebrew](https://github.com/wabarc/homebrew-wayback): | ||
|
||
```shell | ||
brew tap wabarc/wayback | ||
brew install wayback | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: 归档到archive.today | ||
--- | ||
|
||
Wayback依赖于[archive.today](https://archive.today/)作为wayback和playback的上游服务。您可以使用`--is`标志或默认启用的`WAYBACK_ENABLE_IS`环境变量启用或禁用此功能。 | ||
|
||
Wayback实现Internet Archive集成的代码可以在[wabarc/archive.is](https://github.com/wabarc/archive.is)存储库中找到。 | ||
|
||
## 相关资料 | ||
|
||
- [archive.today - 维基百科](https://en.wikipedia.org/wiki/Archive.today) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: Discord | ||
--- | ||
|
||
## 如何构建一个Discord机器人 | ||
|
||
构建一个Discord机器人,您需要按照以下步骤进行: | ||
|
||
在`OAuth2 - SCOPES`部分启用`bot`和`applications.commands`范围,创建一个[Discord应用程序](https://discord.com/developers/applications)。确保授予机器人`发送消息`和`附加文件`的权限。 | ||
|
||
配置Discord机器人以支持以下斜线命令: | ||
|
||
1. `/help` - 显示帮助信息(*需要配置帮助文本*) | ||
2. `/metrics` - 显示服务指标(*需要启用指标*) | ||
3. `/playback` - 播放URL | ||
|
||
为配置Discord守护程序服务设置以下环境变量: | ||
|
||
1. `WAYBACK_DISCORD_TOKEN`(必填) | ||
2. `WAYBACK_DISCORD_CHANNEL` | ||
3. `WAYBACK_DISCORD_HELPTEXT` | ||
|
||
有关如何创建和配置Discord机器人的详细文档,请参阅[Discord开发人员门户网站](https://discord.com/developers/docs/intro)。 | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: 归档到Internet Archive | ||
--- | ||
|
||
Wayback依赖于[Internet Archive](https://archive.org/)作为wayback和playback的上游服务。您可以使用`--ia`标志或默认启用的`WAYBACK_ENABLE_IA`环境变量启用或禁用此功能。 | ||
|
||
Wayback实现Internet Archive集成的代码可以在[wabarc/archive.org](https://github.com/wabarc/archive.org)存储库中找到。 | ||
|
||
## 相关资料 | ||
|
||
- [Internet Archive - 维基百科](https://en.wikipedia.org/wiki/Internet_Archive) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: 归档到IPFS | ||
--- | ||
|
||
Wayback依赖于星际文件系统([IPFS](https://ipfs.tech/))作为存储完整网页及相关资源(如JavaScript、CSS和字体)的上游服务。这样可以无缝地播放存档的网页,确保用户体验与原始网站完全相同。 | ||
|
||
您可以使用`--ip`标志或默认启用的`WAYBACK_ENABLE_IP`环境变量启用或禁用此功能。 | ||
|
||
Wayback实现IPFS集成的代码可以在[wabarc/rivet](https://github.com/wabarc/rivet)存储库中找到。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
title: IRC | ||
--- | ||
|
||
## 如何构建IRC机器人 | ||
|
||
要创建一个IRC帐户,您可以访问Libera.Chat的[昵称注册](https://libera.chat/guides/registration)页面以获取说明。 | ||
|
||
## 配置 | ||
|
||
为了使用IRC服务,您需要设置以下环境变量或配置文件: | ||
|
||
- `WAYBACK_IRC_NICK`:IRC机器人的昵称(必填)。 | ||
- `WAYBACK_IRC_PASSWORD`:IRC机器人的密码(可选)。 | ||
- `WAYBACK_IRC_CHANNEL`:发布存档结果的频道(可选)。 | ||
- `WAYBACK_IRC_SERVER`:连接到的IRC服务器(可选,默认为`irc.libera.chat:6697`)。 | ||
|
||
请注意,一些IRC服务器可能需要额外的配置,例如TLS证书。您应该参考您想要连接的IRC服务器的文档以获取更多信息。 | ||
|
||
## 相关资料 | ||
- [IRC命令](https://en.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands) | ||
- [IRCv3规范](https://ircv3.net/irc/) | ||
- [IRC网络列表](https://netsplit.de/networks/top100.php) | ||
- [Libera.chat文档](https://libera.chat/guides) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: Mastodon | ||
--- | ||
|
||
## 如何构建Mastodon机器人 | ||
|
||
您可以选择任何Mastodon实例。这里,我们将使用Mastodon.social作为示例。 | ||
|
||
要创建Mastodon应用程序,您可以按照以下步骤操作: | ||
|
||
1. 登录到您的Mastodon帐户。 | ||
2. 转到“设置”>“[开发](https://mastodon.social/settings/applications)”>“[新应用程序](https://mastodon.social/settings/applications/new)”。 | ||
3. 输入以下信息: | ||
- **应用程序名称**:您的应用程序名称。 | ||
- **应用程序网站**:与您的应用程序相关联的网站。 | ||
- **重定向URI**:用户在身份验证后将被重定向的URI。这可以是任何有效的URI,但它必须与您的代码中指定的重定向URI匹配。 | ||
- 范围:您的应用程序需要的范围。这些范围确定您的应用程序可以代表用户执行的操作。所需的最小范围为:`read:statuses`、`read:notifications`、`write:statuses`、`write:notifications`和`write:conversations`。 | ||
4. 单击“提交”。 | ||
5. 在下一页上,您将看到您的应用程序的客户端ID和客户端密钥。这些将用于验证您的应用程序。 | ||
|
||
您可以在Mastodon文档中找到有关创建Mastodon应用程序的更多信息:https://docs.joinmastodon.org/client/token/ | ||
|
||
## 配置 | ||
|
||
创建Mastodon应用程序后,在应用程序详细信息页面上可以找到`Client key`、`Client secret`和`Your access token`。 | ||
|
||
接下来,将这些密钥放置在环境或配置文件中: | ||
|
||
- `WAYBACK_MASTODON_KEY`:客户端密钥 | ||
- `WAYBACK_MASTODON_SECRET`:客户端密钥 | ||
- `WAYBACK_MASTODON_TOKEN`:您的访问令牌 | ||
|
||
另外,您必须通过设置`WAYBACK_MASTODON_SERVER`变量来指定Mastodon服务器。 | ||
|
||
## 相关资料 | ||
|
||
- [Fediverse Observer](https://mastodon.fediverse.observer/list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
title: Matrix | ||
--- | ||
|
||
## 如何构建Matrix机器人 | ||
|
||
您可以选择任何Matrix服务器。这里,我们将使用**matrix.org**和**Element**作为示例。 | ||
|
||
要注册Matrix帐户,请按照以下步骤操作: | ||
|
||
1. 打开[Element](https://app.element.io/)并单击“创建帐户”。 | ||
2. 填写所需的信息。 | ||
3. 登录并创建一个**公共房间**以发布(可选)。 | ||
4. 转到**房间设置**>**高级**,您可以找到**内部房间ID**(可选)。 | ||
|
||
## 配置 | ||
|
||
创建Matrix帐户后,您将拥有`Homeserver`、`User ID`、`Password`和`Internal room ID`。 | ||
|
||
接下来,将这些密钥放置在环境或配置文件中: | ||
|
||
- `WAYBACK_MATRIX_HOMESERVER`:您选择的Homeserver,默认为`matrix.org` | ||
- `WAYBACK_MATRIX_USERID`:用户ID,例如`@alice:matrix.org` | ||
- `WAYBACK_MATRIX_ROOMID`:内部房间ID | ||
- `WAYBACK_MATRIX_PASSWORD`:从您的注册步骤中获取的密码。 | ||
|
||
## 相关资料 | ||
|
||
- [开发人员指南](https://matrix.org/docs/develop/) |
Oops, something went wrong.