Files
FileCodeBox-to-computercraft/README.md
2025-11-19 01:13:43 +08:00

66 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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 12345 # 直接运行不保存
```
上传后给出的 code 和下载的 code 可访问网站进行外部下载和上传
## 服务器配置
当前使用私有服务器:`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. **错误处理**:工具会显示简明的错误信息便于调试