Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
c1af030
不用注册应用
742481030 May 10, 2020
d7be868
添加sharepoint自动配置
742481030 May 11, 2020
2db0b6d
cdn
742481030 May 13, 2020
fc3a1dc
Add files via upload
742481030 May 30, 2020
4c63d9b
自动配置
742481030 Jun 1, 2020
748ee0b
完善配置
742481030 Jun 2, 2020
28159b6
完善配置
742481030 Jun 2, 2020
f09b9d0
完善配置
742481030 Jun 2, 2020
9ae5313
Update README.md
742481030 Jun 2, 2020
4385c6e
Update README.md
742481030 Jun 2, 2020
f0b7b96
Update README.md
742481030 Jun 3, 2020
058a249
Update index.php
742481030 Jun 3, 2020
529e781
添加文件上传功能
742481030 Jun 3, 2020
24db0e1
Update README.md
742481030 Jun 3, 2020
cc4a8d1
Update README.md
742481030 Jun 3, 2020
d1f2af4
修复文件上传路径总是首页bug
742481030 Jun 3, 2020
02b3fb9
Update README.md
742481030 Jun 3, 2020
94c1fc5
Add files via upload
742481030 Jun 15, 2020
ba1c42c
Add files via upload
742481030 Jun 15, 2020
ec78f8c
Add files via upload
742481030 Jun 15, 2020
48218f3
Add files via upload
742481030 Jun 15, 2020
d9841c7
Add files via upload
742481030 Jun 15, 2020
0cc5aad
9.0 reless
742481030 Jun 19, 2020
02ea330
Update init.php
742481030 Jun 20, 2020
aec2c28
Update README.md
742481030 Jun 20, 2020
6dc70f1
Update README.md
742481030 Jun 20, 2020
cde0af6
Update README.md
742481030 Jun 20, 2020
a834b78
Update README.md
742481030 Jun 20, 2020
bbb3d75
Create version.php
742481030 Jun 20, 2020
b1702a0
Update version.php
742481030 Jun 21, 2020
91eacf6
Update version.php
742481030 Jun 21, 2020
0662498
Update version.php
742481030 Jun 21, 2020
488b93f
Add files via upload
742481030 Jun 24, 2020
5bd5a96
9.3
742481030 Jun 24, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added 20170407223108_f4yeT.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 22222.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added 3333.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions 404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>404</title>
<style>
body{
background-color:#444;
font-size:14px;
}
h3{
font-size:60px;
color:#eee;
text-align:center;
padding-top:30px;
font-weight:normal;
}
</style>
</head>

<body>
<h3>404,您请求的文件不存在!</h3>
</body>
</html>
160 changes: 145 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<h1 align="center"><a href="https://pan.layne666.cn" target="_blank">OneIndex</a></h1>
## 预览地址
[pan.mxin.ltd](https://pan.mxin.ltd/)
必须设置伪静态
支持cli 文件上传下载,
支持世纪互联国际版国内版,同济大学sharepoint
直接文件管理,移动删除,上传下载 预览,
执行php one.php 会提示用法,
多盘模式
php one.php upload:file 本地文件 远程路径 驱动器

> Onedrive Directory Index
其他说明

## 功能

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

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

## 伪静态

```nginx
1.nginx伪静态
```
if (!-f $request_filename){
set $rule_0 1$rule_0;
}
Expand All @@ -22,10 +23,139 @@ rewrite ^/(.*)$ /index.php?/$1 last;
}
```

## 预览图
# oneindex
OneDrive Directory Index

## 功能:
不用服务器空间,不走服务器流量,

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


![](http://file.layne666.cn/img/20191125233913.png)

![](http://file.layne666.cn/img/20200211210637.png)
## 创意整合
1.极大简化安装步骤。
2.一些样式美化修改。
3.分页模式,加快页面预览速度。创意来自[oneindex-h](https://github.com/hang666/oneindex-h)
4.可后台自定义网站主标题,副标题。
5.可后台自定义每页显示项目数量。

![](http://file.layne666.cn/img/20200211210644.png)
## 重新安装
删除 oneindex/config 下的所有文件即可.


## change log:
20-06-18 代码有点乱,10.0版本后将重构.
20-06-17 管理员模式不使用缓存
20-06-17 增加并发删除移动api
20-06-16 优化上传
20-06-14 文件批量移动功能(debug)
20-06-13 文件批量删除(debug)
20-06-12 增加主题背景
20-06-09 增加新建文件夹功能
20-06-07 文件管理/删除/重命名
20-06=07 修复md文件全屏
20-06=07 修复加密文件夹无法验证密码
20-06=06 增加重命名文件方法
20-06=06 增加删除文件方法
20-06=06 修复重建缓存
20-06-05 cli 功能增加列表 删除文件创建文件夹
20-06-05 修复cli上传模式并且支持多盘/sharepoint
20-06-05 修复多盘引起图床失效
20-06-05 bug 重建缓存失效(文件过多导致炸了api,考虑是否弃用)
20-06-05 增加离线下载功能(开发中
20—06-02: 添加侧边栏网盘导航
20-06-01: 修复首页空白问题
20-05-29: 增加sharepoint站点id自动获取工具,账户显示,空间显示.
20-05-24: 移除cli模式
20-05-25: 完成自动配置
20-05-24: 完成多盘配置
20-05-21: 添加防盗链接
20-05-20: 移除pdfjs
20-05-19: 静态资源cdn 使用jsdevil
18-03-29: 更新直链获取机制、缓存机制,避免频繁访问的token失效
18-03-29: 解决非英文编码问题
18-03-29: 添加onedrive共享的起始目录 功能
18-03-29: 添加rewrite的配置文件
18-03-29: 增加sqlite模式cache支持
18-03-29: 添加缩略图功能
18-03-29: 添加404判断
18-03-31: 添加console
18-04-13: 修复特殊文件名无法下载问题
18-04-13: 添加命令行上传功能
18-04-16: 更新 2.0 beta
18-04-16: 更新展示界面
18-04-16: 响应式,支持小屏设备
18-04-16: 图片在线预览
18-04-16: 视频在线播放
18-04-16: 代码在线查看(js、css、html、sh、php、java、md等)
18-04-16: README.md 支持,解析各目录下(onedirive目录下) README.md 文件,在页面尾部展示。
18-04-18: 音频在线播放
18-04-18: HEAD.md 支持,在页面头部展示
18-04-18: .password 文件夹加密
18-05-06: 在线视频播放器替换成 Dplayer
18-05-06: 在线视频播放支持'mp4','webm','avi','mpg', 'mpeg', 'rm', 'rmvb', 'mov', 'wmv', 'mkv', 'asf'
18-06-01: 支持个人账号
18-06-01: cli文件夹上传(单线程)
18-06-01: 管理后台(后台地址:?/admin 默认密码:oneindex)
18-06-01: 不同后缀展示设置
18-06-01: 文件直接输出
18-06-01: 文件上传管理(后台)
18-06-01: 增加index.html特性
18-06-01: 图床功能

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

## 安装:
<img width="658" alt="image" src="https://raw.githubusercontent.com/0oVicero0/oneindex/files/images/install.gif">


## 计划任务  
[可选]**推荐配置**,非必需。后台定时刷新缓存,可增加前台访问的速度  
```
# 每小时刷新一次token
0 * * * * /具体路径/php /程序具体路径/one.php token:refresh

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

## 特殊文件实现功能  
` README.md `、`HEAD.md` 、 `.password`特殊文件使用

可以参考[https://github.com/0oVicero0/oneindex/tree/files](https://github.com/0oVicero0/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文件]
```
30 changes: 30 additions & 0 deletions build.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

$exts = ['php', 'twig']; // 需要打包的文件后缀, twig是模版文件, 你还可以安需加入html等后缀
$dir = __DIR__; // 需要打包的目录

$file = 'Sample.phar'; // 包的名称, 注意它不仅仅是一个文件名, 在stub中也会作为入口前缀
$phar = new Phar(__DIR__ . '/' . $file, FilesystemIterator::CURRENT_AS_FILEINFO | FilesystemIterator::KEY_AS_FILENAME, $file);

// 开始打包
$phar->startBuffering();

// 将后缀名相关的文件打包
foreach ($exts as $ext) {
$phar->buildFromDirectory($dir, '/\.' . $ext . '$/');
}

// 把build.php本身摘除
$phar->delete('build.php');

// 设置入口
$phar->setStub("<?php
Phar::mapPhar('{$file}');
require 'phar://{$file}/index.php';
__HALT_COMPILER();
?>");
$phar->stopBuffering();

// 打包完成
echo "Finished {$file}\n";

19 changes: 19 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "jane/jane",
"require": {
"guzzlehttp/guzzle": "^6.5"

},
"autoload": {

"psr-4": {
"jane\\": "lib"

}





}
}
Loading