Compare commits

..

1 Commits

Author SHA1 Message Date
Simon Bruder bc7c90e73e
Add odrive-proxy script 2020-07-26 12:45:17 +02:00
1 changed files with 25 additions and 25 deletions

View File

@ -19,31 +19,31 @@ def get_files(uuid, password):
@app.route("/")
def help():
return """<!DOCTYPE html>
<html>
<head>
<title>rclone proxy for odrive</title>
<meta charset="utf-8">
</head>
<body>
<h1>rclone proxy for odrive</h1>
<p style="max-width: 720px;">Fill the two fields with the UUID (the
part after https://www.odrive.com/s/) and the access password. You
will be redirected to the proxied directory listing. Point rclone
at that URL and it should be able to download the files
(<code>rclone copy --http-url "YOUR_URL_HERE" :http:
remote:bucket</code>).</p>
<input id="uuid" name="uuid" placeholder="uuid" size="40">
<input id="password" name="password" placeholder="password" size="30">
<input id="submit" type="submit" value="Get link">
<script>
document.querySelector("#submit").onclick = () => {
const uuid = document.querySelector("#uuid").value
const password = document.querySelector("#password").value
location = `/${uuid}/${encodeURIComponent(password)}`
}
</script>
</body>
</html>"""
<html>
<head>
<title>rclone proxy for odrive</title>
<meta charset="utf-8">
</head>
<body>
<h1>rclone proxy for odrive</h1>
<p style="max-width: 720px;">Fill the two fields with the UUID (the
part after https://www.odrive.com/s/) and the access password. You
will be redirected to the proxied directory listing. Point rclone
at that URL and it should be able to download the files
(<code>rclone copy --http-url "YOUR_URL_HERE" :http:
remote:bucket</code>).</p>
<input id="uuid" name="uuid" placeholder="uuid" size="40">
<input id="password" name="password" placeholder="password" size="30">
<input id="submit" type="submit" value="Get link">
<script>
document.querySelector("#submit").onclick = () => {
const uuid = document.querySelector("#uuid").value
const password = document.querySelector("#password").value
location = `/${uuid}/${encodeURIComponent(password)}`
}
</script>
</body>
</html>"""
@app.route("/<string:uuid>/<string:password>/")