From 3f6131e82fdef65feff1911ffc3c61072370f27e Mon Sep 17 00:00:00 2001 From: xingluo Date: Wed, 19 Nov 2025 01:08:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20=20README.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 README.md diff --git a/ README.md b/ README.md new file mode 100644 index 0000000..dc0a05e --- /dev/null +++ b/ README.md @@ -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. **错误处理**:工具会显示简明的错误信息便于调试