![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U208344c1e1b444659f1399347c75c92dV.jpg)
OneList 是萌咖大佬开发的 OneDrive 目录索引程序,虽然没有视频在线播放、图片预览等功能但是非常简洁方便,本文主要利用IBM免费容器进行部署教程!
开源地址
开源地址:https://github.com/0oVicero0/OneList/
小马甲大老修改版地址: https://github.com/malaohu/OneList–
准备工作
- Office 帐号(除了个人版之外其他都可以)
- IBM 免费帐号:申请方法
获取Token
1、点击访问下面的地址,登录账号,授权许可后即可获得Token:
https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=ea2b36f6-b8ad-40be-bc0f-e5e4a4a7d4fa&redirect_uri=https://api.moeclub.org/onedrive-login
2、将获取到的Token先保存起来!
VPS部署
1、安装依赖
CenOS 6系统:
#安装EPEL rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm #安装Python3 yum install python34 git -y #安装pip3 wget https://bootstrap.pypa.io/get-pip.py python3 get-pip.py
CenOS 7系统:
#安装EPEL rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm #安装Python3 yum install python36 git -y #配置Python3软链接 ln -s /usr/bin/python3.6 /usr/bin/python3 #安装pip3 wget https://bootstrap.pypa.io/get-pip.py python3 get-pip.py
Debian/Ubuntu系统:
#安装pip3和Redis apt update apt install python3-pip git -y
2、安装OneList
#拉取源码 git clone https://github.com/0oVicero0/OneList.git #安装依赖 cd OneList && pip3 install -r requirements.txt
接下来在OneList
目录新建config.json
配置文件。
nano config.json
将以下内容复制进去:
#将下面refresh_token替换成你获取到的字段 { "token": "<refresh_token>", "location_path": "/", "start_directory": "/", "threads": 3, "diff_seconds": 480, "refresh_seconds": 720, "metadata_cached_seconds": 768, "structure_cached_seconds": 840 }
再使用ctrl+x
、y
保存退出。
开始运行:
gunicorn app:app -b 0.0.0.0:8888 -D
此时访问地址为 IP:8888
IBM部署
使用 IBM Cloud Lite 免费部署:
1、首先前往应用中心 https://cloud.ibm.com/catalog ,选择 Cloud Foundry
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U9e8b0d08f5374aa8a35aa3c9cf72a521D.jpg)
2、之后选择公共应用程序,点击创建:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U127c3dd41a85458f8155baef1fd25a8cf.jpg)
3、选择免费配额,Python 环境,点击创建如下图所示:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/Uce906c50ba674c3aa006a763136ec153J.jpg)
4、创建完成以后点击 概括,在右下方的持续交付中点击 启用:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/Uf1203878bad14d4ea607800c23fb718a9.jpg)
5、如下图所示,在源储存库URL处填写: https://github.com/malaohu/OneList--
把启动问题 和 跟踪代码更改部署 的勾选去掉:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/Ud35485a7eb6145f4985f96faa9691b65c.jpg)
6、然后点击【创建】会提示你创建API密钥,点击OK以后再点击【创建】:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/Ua5c4c783263d46349479e65efeafc00ep.jpg)
7、创建完成以后会自动进入工具链,点击【Git】进入 Git 管理平台:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U6ae7f974f16d4ebca8374b65ebbccad48.jpg)
8、首先我们切换到【AWS-Cloud-Foundry】分支:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U667c03089b784d9ea5952f2d5ec6af27Q.jpg)
9、修改config.json
文件。将内容替换成你的 token,然后点击提交保存:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U53345180455f47428820c548e940f2d2D.jpg)
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/Ub70af1de490847599a185d1073afefebI.jpg)
修改 <refresh_token>
为你获取到的 Token 如图所示:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U73bbbe2a18a14ef0a32065a92450a8d4T.jpg)
10、接下来我们配置一下部署的分支!点击【持续交付】中点击【查看工具箱】:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U26ad0ac994b54f639c4586bbf93d3e11z.jpg)
11、点击【Delivery Pipeline】:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/Ua2b153972b1e4294ac2f3d8f0d71aa54f.jpg)
12、点击齿轮 – 配置暂存区 !
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U105dbc9c46f948aea63d2797acf1727aJ.jpg)
13、选择【输出】,代码分支选择:【AWS-Cloud-Foundry】 保存!
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U5c47a5977bee404b92f5f7a4de208e1ed.jpg)
14、然后点击【 启动 】按钮(这2个应用都需要点击哦),等待启动完成:
![[转]OneList 一款简洁的OneDrive目录索引部署详细教程](https://cdn1.simmoc.cn/wp-content/uploads/2020/03/U6743b2c8fa214100b958cf226b0f0e22X.jpg)
15、等待2个都启动之后访问应用域名即可!
文章转自@如有乐享