Giter VIP home page Giter VIP logo

oneindex's Introduction

OneIndex

Onedrive Directory Index

功能:

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

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

Demo

https://xn.tn

安装运行

源码安装运行:

需求:

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/

oneindex's People

Contributors

donwa avatar isecret avatar lwl12 avatar max-sum avatar zxilly avatar akkuman avatar koorimoe avatar jhdxr avatar youshang2580 avatar siyaoliu avatar quericy avatar naicfeng avatar lzjluzijie avatar ellermister avatar bafflingbug avatar rhilip avatar octlan avatar saltyfished avatar

Watchers

yituo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.