Skip to content

Commit 5d2521c

Browse files
committed
test
1 parent d314a70 commit 5d2521c

File tree

2 files changed

+162
-60
lines changed

2 files changed

+162
-60
lines changed

README.md

Lines changed: 111 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,131 @@
1-
# Word2MD
1+
# Word2MD Converter | 文档转换工具
22

3-
A GitHub Pages website that automatically converts various file formats to Markdown using GitHub Actions and the `markitdown` package.
3+
一个简单的在线文档转换工具,可以将各种格式的文件转换为 Markdown 格式。基于 GitHub Pages GitHub Actions 构建。
44

5-
## Features
5+
A user-friendly online document converter that transforms various file formats into Markdown. Built with GitHub Pages and GitHub Actions.
66

7-
- Drag-and-drop file upload interface
8-
- Supports multiple file formats (PDF, Word, PowerPoint, Excel, Images, etc.)
9-
- Automatic conversion to Markdown using GitHub Actions
10-
- Download converted files directly from the website
7+
## 🌟 特性 | Features
118

12-
## Setup Instructions
9+
- 🚀 简单易用的拖放上传界面 | Easy drag-and-drop upload interface
10+
- 📝 支持多种文件格式 | Multiple file formats supported
11+
- ⚡ 自动转换处理 | Automatic conversion
12+
- 💾 一键下载转换结果 | One-click download of converted files
1313

14-
1. **Fork and Clone the Repository**
15-
```bash
16-
git clone https://github.com/YOUR_USERNAME/Word2MD.git
17-
cd Word2MD
18-
```
14+
### 支持的文件格式 | Supported Formats
1915

20-
2. **Configure GitHub Pages**
21-
- Go to your repository settings
22-
- Navigate to "Pages" under "Code and automation"
23-
- Set the source branch to `main` and the folder to `/docs`
24-
- Save the settings
16+
- 📄 PDF 文件 | PDF files
17+
- 📘 Word 文档 (.docx, .doc) | Word documents
18+
- 📊 PowerPoint 演示文稿 (.pptx, .ppt) | PowerPoint presentations
19+
- 📈 Excel 表格 (.xlsx, .xls) | Excel spreadsheets
20+
- 🖼️ 图片文件 (包含 EXIF 数据和 OCR) | Images (with EXIF data and OCR)
21+
- 🎵 音频文件 (包含元数据和语音转写) | Audio (with metadata and transcription)
22+
- 🌐 HTML 网页 | HTML pages
23+
- 📋 文本格式 (CSV, JSON, XML) | Text formats
2524

26-
3. **Configure GitHub Token**
27-
- Generate a new Personal Access Token (PAT):
28-
- Go to GitHub Settings → Developer Settings → Personal Access Tokens
29-
- Generate a new token with `repo` scope
30-
- Store the token securely (you'll need to add it to the website later)
25+
## ⚠️ 重要说明 | Important Notes
3126

32-
4. **Update Configuration**
33-
- Open `docs/js/main.js`
34-
- Replace the `REPO_OWNER` constant with your GitHub username
35-
- Save the changes
27+
### 使用前必读 | Must Read Before Use
3628

37-
5. **Create Required Directories**
38-
```bash
39-
mkdir uploads
40-
mkdir docs/converted
41-
```
29+
1. **Fork 项目(必需步骤)| Fork Repository (Required)**
30+
- 本工具需要在你自己的 GitHub 仓库中运行
31+
- This tool needs to run in your own GitHub repository
32+
- 👉 [点击这里 Fork 项目 | Click here to Fork](https://github.com/BH3GEI/Word2MD/fork)
33+
- 如果不 Fork 项目,即使提供了 GitHub Token 也无法使用
34+
- Without forking, the tool won't work even with a GitHub Token
35+
36+
2. **为什么需要 Fork?| Why Fork is Required**
37+
- 文件转换过程在你的 GitHub Actions 中进行
38+
- File conversion happens in your GitHub Actions
39+
- 需要向仓库写入文件的权限
40+
- Requires permission to write files to the repository
41+
- 确保你的文件安全和隐私
42+
- Ensures your file security and privacy
43+
44+
## 🚀 快速开始 | Quick Start
45+
46+
### 在线使用 | Online Usage
47+
48+
1. **Fork 项目(必需)| Fork Repository (Required)**
49+
- 访问 [Word2MD 项目主页](https://github.com/BH3GEI/Word2MD)
50+
- Visit [Word2MD Project Homepage](https://github.com/BH3GEI/Word2MD)
51+
- 点击 [Fork](https://github.com/BH3GEI/Word2MD/fork) 创建你的副本
52+
- Click [Fork](https://github.com/BH3GEI/Word2MD/fork) to create your copy
53+
54+
2. **启用 GitHub Pages | Enable GitHub Pages**
55+
- 在你 fork 的仓库中启用 GitHub Pages
56+
- Enable GitHub Pages in your forked repository
57+
- 选择 `main` 分支和 `/docs` 目录
58+
- Select `main` branch and `/docs` folder
59+
60+
3. **访问你的转换网站 | Visit Your Converter**
61+
- 打开 `https://[你的用户名].github.io/Word2MD`
62+
- Open `https://[your-username].github.io/Word2MD`
63+
- 示例 | Example: https://bh3gei.github.io/Word2MD
4264

43-
6. **Push Changes**
65+
4. 设置 GitHub Token | Set up GitHub Token
66+
- 点击 "Update Token" 按钮 | Click the "Update Token" button
67+
- 按照提示创建并输入 Token | Follow prompts to create and enter your token
68+
69+
5. 上传文件 | Upload Files
70+
- 拖放文件到上传区域 | Drag and drop files to the upload area
71+
- 或点击 "Select Files" 按钮选择文件 | Or click "Select Files" button
72+
73+
6. 等待转换 | Wait for Conversion
74+
- 文件上传后会自动开始转换 | Conversion starts automatically after upload
75+
- 可以在列表中查看转换进度 | Check progress in the list
76+
77+
7. 下载结果 | Download Results
78+
- 转换完成后点击 "Download" 下载文件 | Click "Download" when conversion is complete
79+
- 或点击 "View" 在线预览 | Or click "View" for online preview
80+
81+
### 部署自己的版本 | Deploy Your Own
82+
83+
1. 复制仓库 | Fork Repository
4484
```bash
45-
git add .
46-
git commit -m "Initial setup"
47-
git push
85+
# 克隆仓库 | Clone the repository
86+
git clone https://github.com/[你的用户名]/Word2MD.git
87+
cd Word2MD
4888
```
4989

50-
## Usage
90+
2. 设置 GitHub Pages | Set up GitHub Pages
91+
- 转到仓库设置 | Go to repository settings
92+
- 找到 Pages 设置 | Find Pages settings
93+
- 选择 `main` 分支和 `/docs` 目录 | Select `main` branch and `/docs` folder
94+
- 保存设置 | Save settings
95+
96+
3. 配置 GitHub Token | Configure GitHub Token
97+
- 转到 GitHub 设置 → 开发者设置 → 个人访问令牌 | Go to GitHub Settings → Developer Settings → Personal Access Tokens
98+
- 生成新的令牌,选择 `repo` 权限 | Generate new token with `repo` scope
99+
- 保存令牌备用 | Save the token for later use
100+
101+
## ⚠️ 注意事项 | Notes
102+
103+
- 文件大小限制:100MB | File size limit: 100MB
104+
- Token 安全:请勿分享你的 GitHub Token | Token security: Never share your GitHub Token
105+
- 转换时间:根据文件大小可能需要几秒到几分钟不等 | Conversion time: May take seconds to minutes depending on file size
106+
- 隐私考虑:所有文件都会上传到你的 GitHub 仓库 | Privacy: All files are uploaded to your GitHub repository
107+
108+
## 🔧 常见问题 | Troubleshooting
51109

52-
1. Visit your GitHub Pages site at `https://YOUR_USERNAME.github.io/Word2MD`
53-
2. When prompted, enter your GitHub token
54-
3. Upload files using the drag-and-drop interface or file selector
55-
4. Wait for the conversion process to complete
56-
5. Download the converted Markdown files from the list
110+
1. **文件上传失败 | File Upload Failed**
111+
- 检查文件大小是否超过限制 | Check if file size exceeds limit
112+
- 确认 Token 权限是否正确 | Verify token permissions
113+
- 检查网络连接 | Check network connection
57114

58-
## Limitations
115+
2. **转换失败 | Conversion Failed**
116+
- 确认文件格式是否支持 | Verify file format is supported
117+
- 检查文件是否损坏 | Check if file is corrupted
118+
- 查看 GitHub Actions 日志了解详情 | Check GitHub Actions logs for details
59119

60-
- Maximum file size: 100 MB (GitHub limitation)
61-
- Supported file formats:
62-
- PDF
63-
- PowerPoint
64-
- Word
65-
- Excel
66-
- Images (EXIF metadata and OCR)
67-
- Audio (EXIF metadata and speech transcription)
68-
- HTML
69-
- Text-based formats (CSV, JSON, XML)
70-
- ZIP files
120+
3. **找不到转换后的文件 | Cannot Find Converted File**
121+
- 等待几分钟让转换完成 | Wait a few minutes for conversion
122+
- 刷新页面 | Refresh the page
123+
- 检查 GitHub Actions 运行状态 | Check GitHub Actions status
71124

72-
## Security Notes
125+
## 🤝 贡献 | Contributing
73126

74-
- The GitHub token is stored in your browser's local storage
75-
- Never share your GitHub token
76-
- Consider implementing a more secure token storage solution for production use
127+
欢迎提交 Pull Request 或提出建议!| Contributions are welcome!
77128

78-
## Contributing
129+
## 📄 许可证 | License
79130

80-
Contributions are welcome! Please feel free to submit a Pull Request.
131+
本项目采用 MIT 许可证 | This project is licensed under the MIT License

docs/index.html

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,63 @@
2222
max-height: 400px;
2323
overflow-y: auto;
2424
}
25+
.project-info {
26+
background-color: #f8f9fa;
27+
border-left: 4px solid #0d6efd;
28+
padding: 1rem;
29+
margin-bottom: 1rem;
30+
}
31+
.fork-button {
32+
background-color: #2ea44f;
33+
color: white;
34+
text-decoration: none;
35+
padding: 0.5rem 1rem;
36+
border-radius: 6px;
37+
display: inline-flex;
38+
align-items: center;
39+
font-weight: 500;
40+
}
41+
.fork-button:hover {
42+
background-color: #2c974b;
43+
color: white;
44+
}
45+
.fork-button svg {
46+
margin-right: 0.5rem;
47+
}
2548
</style>
2649
</head>
2750
<body>
2851
<div class="container py-5">
2952
<h1 class="text-center mb-4">Word2MD Converter</h1>
3053

54+
<!-- Project Info -->
55+
<div class="row mb-4">
56+
<div class="col-md-8 mx-auto">
57+
<div class="project-info">
58+
<h5>⚠️ 重要提示 | Important Notice</h5>
59+
<p class="mb-2">
60+
在使用此工具之前,你需要先 Fork 项目到你的 GitHub 账户。<br>
61+
Before using this tool, you need to fork this project to your GitHub account.
62+
</p>
63+
<div class="d-flex gap-2 mb-2">
64+
<a href="https://github.com/BH3GEI/Word2MD/fork" class="fork-button" target="_blank">
65+
<svg height="16" viewBox="0 0 16 16" width="16" fill="currentColor">
66+
<path fill-rule="evenodd" d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"></path>
67+
</svg>
68+
Fork Project
69+
</a>
70+
<a href="https://github.com/BH3GEI/Word2MD" class="btn btn-outline-secondary" target="_blank">
71+
View Source
72+
</a>
73+
</div>
74+
<small class="text-muted">
75+
即使提供了 GitHub Token,不 Fork 项目也无法使用此工具。<br>
76+
This tool won't work without forking, even if you provide a GitHub Token.
77+
</small>
78+
</div>
79+
</div>
80+
</div>
81+
3182
<!-- GitHub Token Management -->
3283
<div class="row mb-4">
3384
<div class="col-md-8 mx-auto">

0 commit comments

Comments
 (0)