Skip to content

Commit df85114

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents efe83d7 + 6ac3556 commit df85114

File tree

449 files changed

+24461
-41723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

449 files changed

+24461
-41723
lines changed

.editorconfig

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[*]
2+
end_of_line = lf
3+
indent_style = space
4+
indent_size = 4
5+
6+
[*.js]
7+
indent_size = 2
8+
9+
[*.yaml]
10+
indent_size = 2

.github/FUNDING.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
13+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
14+
- https://afdian.net/@teahouse

.github/ISSUE_TEMPLATE/bug_report.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,10 @@ assignees: ''
2525
可以的话,加上截图可以帮助解释你的问题。
2626

2727
**版本**
28-
2928
* 操作系统:[例:Windows]
30-
* Minecraft 版本:[例:1.15.2]
31-
* 资源包版本:[例:0.1.0]
32-
* 环境 [例:加载了Fabric/Forge,安装了CustomSkinLoader]
29+
* Minecraft 版本:[例:1.18.2]
30+
* 资源包版本:[例:1.6.1]
31+
* 环境[例:加载了Fabric/Forge,安装了CustomSkinLoader]
3332

3433
**其他内容**
3534
添加更多关于漏洞的来龙去脉。

.github/workflows/check_news.yml

-28
This file was deleted.

.github/workflows/deploy.yml

-26
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Deploy Web Builder dynamic Content
2+
3+
on:
4+
push:
5+
paths:
6+
- 'dynamic/**'
7+
pull_request:
8+
paths:
9+
- 'dynamic/**'
10+
workflow_dispatch:
11+
12+
jobs:
13+
check-news:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v2
17+
- uses: actions/setup-node@v2
18+
- run: node check_news.js
19+
- name: Create comment
20+
uses: peter-evans/commit-comment@v1
21+
if: ${{ failure() }}
22+
with:
23+
body: |
24+
您的 `news.json` 或 `alerts.json` 格式出了些问题, 请及时修正
25+
deploy:
26+
environment: production
27+
if: ${{ github.ref_name == 'master' && !failure() }}
28+
needs:
29+
- check-news
30+
runs-on: ubuntu-latest
31+
steps:
32+
- uses: actions/checkout@master
33+
- uses: Teahouse-Studios/[email protected]
34+
with:
35+
KEY_ID: ${{ secrets.KEY_ID }}
36+
KEY_SECRET: ${{ secrets.KEY_SECRET }}
37+
BUCKET: frontend-wdljt
38+
LOCAL_PATH: ./dynamic/
39+
REMOTE_PREFIX: meme/dynamic/

.github/workflows/test_ci.yml

+17-16
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,32 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v2
1414

15-
- name: Set up Python 3.9
16-
uses: actions/setup-python@v2
17-
with:
18-
python-version: 3.9
19-
2015
- name: Install dependencies
2116
run: |
22-
python -m pip install --upgrade pip
23-
pip install flake8
24-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25-
26-
- name: Lint with flake8
27-
run: |
28-
# stop the build if there are Python syntax errors or undefined names
29-
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
30-
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
31-
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
17+
yarn
3218
3319
- name: Test build
3420
run: |
35-
python preset_build.py
21+
node preset_build.js
3622
3723
- name: Upload files built
3824
uses: actions/upload-artifact@v2
3925
with:
4026
name: files-built
4127
path: |
4228
builds
29+
deploy:
30+
if: ${{ github.event_name == 'push' && github.ref_name == 'master' }}
31+
needs:
32+
- test
33+
runs-on: ubuntu-latest
34+
steps:
35+
- uses: actions/checkout@master
36+
- name: Update Deployment Status
37+
run: |
38+
curl \
39+
-X POST \
40+
-H "Authorization: token ${{secrets.GITHUB_TOKEN}}" \
41+
-H "Accept: application/vnd.github.v3+json" \
42+
https://api.github.com/repos/${{github.repository}}/deployments \
43+
-d '{"ref":"${{ github.sha }}", "required_contexts": []}'

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@ Lib/
1010
Scripts/
1111
pyvenv.cfg
1212
!/news.json
13-
!/alerts.json
13+
!/alerts.json
14+
node_modules
15+
!package.json

.prettierrc

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"semi": false,
3+
"useTabs": false,
4+
"singleQuote": true,
5+
"trailingComma": "all",
6+
"tabWidth": 2,
7+
"printWidth": 80,
8+
"endOfLine": "lf",
9+
"overrides": [
10+
{
11+
"files": "*.json",
12+
"options": {
13+
"tabWidth": 4,
14+
"useTabs": false
15+
}
16+
}
17+
]
18+
}

README.md

+14-15
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,19 @@
22

33
[![GitHub issues](https://img.shields.io/github/issues/Teahouse-Studios/mcwzh-meme-resourcepack?logo=github&style=flat-square)](https://github.com/Teahouse-Studios/mcwzh-meme-resourcepack/issues) [![GitHub pull requests](https://img.shields.io/github/issues-pr/Teahouse-Studios/mcwzh-meme-resourcepack?logo=github&style=flat-square)](https://github.com/Teahouse-Studios/mcwzh-meme-resourcepack/pulls) [![License](https://img.shields.io/static/v1?label=License&message=CC%20BY-SA%204.0&color=db2331&style=flat-square&logo=creative%20commons)](https://creativecommons.org/licenses/by-sa/4.0/) [![GitHub tag (latest by date)](https://img.shields.io/github/v/tag/Teahouse-Studios/mcwzh-meme-resourcepack?label=latest%20version&style=flat-square)](https://github.com/Teahouse-Studios/mcwzh-meme-resourcepack/releases) [![Minecraft ver](https://img.shields.io/static/v1?label=Minecraft%20version&message=1.12.2%2B&color=db2331&style=flat-square&logo=)](https://minecraft.net)
44

5-
[![Banner](https://github.com/Teahouse-Studios/mcwzh-meme-resourcepack/blob/master/materials/zh_meme_banner.png?raw=true)](https://www.mcbbs.net/thread-1004643-1-1.html)
6-
75
此资源包仅适用于**Minecraft Java版****关于适用于Minecraft基岩版的资源包,参见[基岩版梗体中文](https://github.com/Teahouse-Studios/mcwzh-meme-resourcepack-bedrock)**
86

97
**注:若发现可能存在该资源包上头的情况,请立刻~~食用~~阅读[译名标准化](https://minecraft.fandom.com/zh/wiki/Minecraft_Wiki:译名标准化)**
108

9+
[![Banner](https://github.com/Teahouse-Studios/mcwzh-meme-resourcepack/blob/master/materials/zh_meme_banner.png?raw=true)](https://www.mcbbs.net/thread-1004643-1-1.html)
10+
11+
## 赞助者
12+
<p align="center">
13+
<a href="https://afdian.net/@teahouse">
14+
<img src='https://fe.wd-ljt.com/m3me/sP0ns0r5/sP0ns0r5.svg'>
15+
</a>
16+
</p>
17+
1118
## 作用
1219

1320
这个资源包将一部分译名或其他游戏内字符串替换成了一些知名/不知名的梗或笑话,或将其用诙谐的语言重写了一遍。
@@ -58,32 +65,24 @@
5865

5966
#### 先决条件
6067

61-
请确保已经安装了Python 3.9+和Git。如果没有,请到[Python官网](https://www.python.org)[Git官网](https://www.git-scm.com)下载。
68+
请确保已经安装了NodeJS主流版本和Git。如果没有,请到[NodeJS官网](https://nodejs.org/zh-cn/)[Git官网](https://www.git-scm.com)下载。
6269

6370
#### 步骤
6471

6572
1. 下载源码;
6673
2. 进入文件夹;
67-
3. 安装相关pip依赖
74+
3. 安装相关依赖
6875
4. 运行预设打包命令。
6976

7077
``` sh
7178
git clone https://github.com/Teahouse-Studios/mcwzh-meme-resourcepack.git
7279
cd mcwzh-meme-resourcepack
73-
pip install -r requirements.txt
74-
python preset_build.py
80+
npm install
81+
node preset_build.js
7582
```
7683

7784
`builds` 文件夹中会生成 `mcwzh-meme.zip``mcwzh-meme_compatible_sfw.zip``mcwzh-meme_compatible_nofigure_legacy_sfw.zip` 等预设的资源包,名称和作用如上所述。
7885

79-
如果需要预设以外的资源包,可输入需要的参数:
80-
81-
``` sh
82-
python -m memepack_builder ...
83-
```
84-
85-
具体用法可见[此处](https://github.com/Teahouse-Studios/memepack-builder/blob/main/doc/CLI_Manual.zh-hans.md)
86-
8786
### 自助跟进游戏版本
8887

8988
此资源包的语言文件顺序与原版的英文顺序并不一致(本资源包是将key按照字母顺序排序)。如果原版的英文译名跟进了,请先将解包的英文语言文件按照前文所述排序,可以参考[这个网站](https://tool.funsmall.cn/jsonsort/)或本repo中的 `sort.py`。推荐使用[Visual Studio Code](https://github.com/microsoft/vscode)的比较功能以方便查看新字符串。
@@ -105,6 +104,6 @@ python -m memepack_builder ...
105104
* 这意味着,你可在署名的情况下自由修改本资源包,但是你再创作的作品必须以本协议发布。
106105
* 这不是法律建议。
107106
* 本项目附带的Mod内容字符串、未经梗体中文修改过的部分,按照 ***原作品的协议*** 发布。
108-
* 本项目 `tools` 目录下的脚本和根目录下的 `preset_build.py` 文件,可选择 ***CC BY-SA 4.0******Apache License 2.0*** 协议之一授权。
107+
* 本项目 `tools` 目录下的脚本和根目录下的 `preset_build.js` 文件,可选择 ***CC BY-SA 4.0******Apache License 2.0*** 协议之一授权。
109108

110109
![GitHub forks](https://img.shields.io/github/forks/Teahouse-Studios/mcwzh-meme-resourcepack?style=social) ![GitHub stars](https://img.shields.io/github/stars/Teahouse-Studios/mcwzh-meme-resourcepack?style=social) ![GitHub watchers](https://img.shields.io/github/watchers/Teahouse-Studios/mcwzh-meme-resourcepack?style=social)

alerts.json

-6
This file was deleted.

check_news.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
const fs = require('fs')
22
const path = require('path')
33

4-
const news = fs.readFileSync(path.resolve(__dirname, 'news.json'))
4+
const news = fs.readFileSync(path.resolve(__dirname, './dynamic/news.json'))
55
JSON.parse(news)
66

7-
const alerts = fs.readFileSync(path.resolve(__dirname, 'alerts.json'))
7+
const alerts = fs.readFileSync(path.resolve(__dirname, './dynamic/alerts.json'))
88
JSON.parse(alerts)

0 commit comments

Comments
 (0)