Skip to content

Commit 85b6b61

Browse files
committed
feat: 添加下载脚本和 .gitignore 文件以排除 PDF 文件
1 parent 63a5d6a commit 85b6b61

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.pdf

download.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
# 获取当前日期
4+
date=$(date +"%Y%m%d")
5+
6+
# 定义下载文件列表
7+
files=("docs_1-100" "docs_101-200" "docs_201-300" "docs_301-400" "docs_401-470" "docs_401-479" "examples" "quick" "release")
8+
9+
# 创建下载目录
10+
download_path="./downloads"
11+
mkdir -p "$download_path"
12+
13+
# 下载文件
14+
for file in "${files[@]}"; do
15+
url="https://github.com/gogf/goframe.org-pdf/releases/latest/download/${file}.pdf"
16+
output_file="${download_path}/${date}_${file}.pdf"
17+
echo "正在下载: ${file}.pdf"
18+
if curl -L "$url" -o "$output_file" 2>/dev/null; then
19+
echo "下载完成: $output_file"
20+
else
21+
echo "下载失败: ${file}.pdf"
22+
fi
23+
done
24+
25+
echo "所有下载任务完成"

0 commit comments

Comments
 (0)