Skip to content

avedu/oneindex

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OneIndex

Onedrive Directory Index

功能:

不占用服务器空间,不走服务器流量,

直接列出 OneDrive 目录,文件直链下载。

使用及免责协议

使用及免责协议

安装运行

源码安装运行:

需求:

1、PHP空间,PHP 5.6+ 需打开curl支持
2、OneDrive 账号 (个人、企业版或教育版/工作或学校帐户)
3、OneIndex 程序

配置:

image

计划任务  

[可选]推荐配置,非必需。后台定时刷新缓存,可增加前台访问的速度。

# 每小时刷新一次token
0 * * * * /具体路径/php /程序具体路径/one.php token:refresh

# 每十分钟后台刷新一遍缓存
*/10 * * * * /具体路径/php /程序具体路径/one.php cache:refresh

Docker 安装运行

特殊文件实现功能  

README.mdHEAD.md.password特殊文件使用

可以参考https://github.com/donwa/oneindex/tree/files

在文件夹底部添加说明:  

在 OneDrive 的文件夹中添加README.md文件,使用 Markdown 语法。

在文件夹头部添加说明:  

在 OneDrive 的文件夹中添加HEAD.md 文件,使用 Markdown 语法。

加密文件夹:  

在 OneDrive 的文件夹中添加.password文件,填入密码,密码不能为空。  

直接输出网页:

在 OneDrive 的文件夹中添加index.html 文件,程序会直接输出网页而不列目录。
配合 文件展示设置-直接输出 效果更佳。

命令行功能  

仅能在PHP CLI模式下运行

清除缓存:  

php one.php cache:clear

刷新缓存:  

php one.php cache:refresh

刷新令牌:  

php one.php token:refresh

上传文件:  

php one.php upload:file 本地文件 [OneDrive文件]

上传文件夹:

php one.php upload:folder 本地文件夹 [OneDrive文件夹]

例如:

//上传demo.zip 到OneDrive 根目录  
php one.php upload:file demo.zip  

//上传demo.zip 到OneDrive /test/目录  
php one.php upload:file demo.zip /test/  

//上传demo.zip 到OneDrive /test/目录并将其命名为 d.zip  
php one.php upload:file demo.zip /test/d.zip  

//上传up/ 到OneDrive /test/ 目录  
php one.php upload:file up/ /test/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages