Skip to content
A simple directory index for OneDrive
Python HTML
Branch: master
Clone or download
Latest commit ebf4ebd Apr 24, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
templates Update list.html Apr 21, 2019
.gitignore support config file Feb 24, 2019
FakeRedis.py Update FakeRedis.py Apr 24, 2019
README.MD Update README.MD Apr 23, 2019
app.py add cache related options Mar 4, 2019
cache.py Update cache.py Apr 23, 2019
config.py optimize cache Feb 28, 2019
onedrive.py Update onedrive.py Apr 21, 2019
process.py add task buffer Mar 8, 2019
requirements.txt better nav links Mar 3, 2019
utils.py add config options Feb 28, 2019

README.MD

OneList

Installation

# apt install python3-pip git redis-server

git clone https://github.com/0oVicero0/OneList.git
cd OneList

pip3 install -r requirements.txt
# Get refresh_token --> Setup config
# The <refresh_token> in config.json does not need "<" and ">".

gunicorn app:app -b 127.0.0.1:5000 -D

Configuration

Create a config file named config.json

{
  "token": "<refresh_token>",
  "location_path": "/",
  "start_directory": "/",
  "threads": 3,
  "diff_seconds": 480,
  "refresh_seconds": 720,
  "metadata_cached_seconds": 768,
  "structure_cached_seconds": 840
}

Get refresh_token

Method 1 (Auto, Recommend):

Get refresh_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

Method 2 (Manual):

Get auth_token in url

https://login.microsoftonline.com/common/oauth2/authorize?response_type=code&client_id=ea2b36f6-b8ad-40be-bc0f-e5e4a4a7d4fa&redirect_uri=http://localhost/onedrive-login

Get refresh_token

code="<auth_token>"
wget --no-check-certificate --post-data="client_id=ea2b36f6-b8ad-40be-bc0f-e5e4a4a7d4fa&client_secret=h27zG8pr8BNsLU0JbBh5AOznNS5Of5Y540l/koc7048=&grant_type=authorization_code&resource=https://api.office.com/discovery/&redirect_uri=http://localhost/onedrive-login&code=$code" 'https://login.microsoftonline.com/common/oauth2/token' -qO-

Demo

https://moeclub.org/onedrive

You can’t perform that action at this time.