添加 README.md

This commit is contained in:
2025-11-19 01:08:46 +08:00
parent 9c5c2dea64
commit 3f6131e82f

63
README.md Normal file
View File

@@ -0,0 +1,63 @@
# FileCodeBox ComputerCraft 工具
一个基于 FileCodeBox API 的 ComputerCraft 文件分享工具,类似于 pastebin 但支持文件上传下载。
## 简介
这个工具允许你在 ComputerCraft 中通过简单的命令分享和获取文件,使用私有服务器上的 FileCodeBox API。它提供了类似 pastebin 的体验
网站https://file.liulikeji.cn/#/
## 功能特性
- 📤 **文件上传** - 支持上传任意文件到文件快递柜
- 📥 **文件下载** - 通过提取码下载文件,自动保存原始文件名
- 🚀 **直接运行** - 无需保存文件,直接加载和执行代码
## 安装
```lua
wget https://git.liulikeji.cn/xingluo/FileCodeBox-to-computercraft/raw/branch/main/filecodebox.lua
```
## 使用方法
### 上传文件
```lua
filecodebox put config.txt # 默认过期1
filecodebox put config.txt 7 # 设置7天过期
```
### 下载文件
```lua
filecodebox get 12345 # 自动使用原始文件名
filecodebox get 12345 custom_name.lua # 指定文件名
```
### 运行代码
```lua
filecodebox run 67890 # 直接运行不保存
```
## 服务器配置
当前使用私有服务器:`https://file.liulikeji.cn`
**如需更换服务器,请编辑代码中的 `BASE_URL` 变量:**
```lua
-- 更换为其他FileCodeBox实例
local BASE_URL = "https://your-filecodebox-server.com"
```
## 基于的开源项目
本工具基于 https://github.com/vastsa/FileCodeBox 开源项目开发。
## 注意事项
1. **文件大小限制**受服务器配置和ComputerCraft内存限制
2. **网络要求**:需要可访问目标服务器的网络连接
3. **过期时间**:文件会在设置的时间后自动删除
4. **错误处理**:工具会显示简明的错误信息便于调试