mirror of
https://github.com/rclone/rclone.git
synced 2025-08-09 05:54:43 +02:00
fs: Implement RegInfo.FileName to return the on disk filename for a backend
Use it in make_backend_docs.py
This commit is contained in:
@ -10,19 +10,12 @@ marker = "<!--- autogenerated options"
|
||||
start = marker + " start"
|
||||
stop = marker + " stop"
|
||||
|
||||
# directory name to backend name
|
||||
dir_to_backend = {
|
||||
"googlecloudstorage": "google cloud storage",
|
||||
"amazonclouddrive": "amazon cloud drive",
|
||||
}
|
||||
|
||||
def find_backends():
|
||||
"""Return a list of all backends"""
|
||||
return [ x for x in os.listdir("backend") if x not in ("all",) ]
|
||||
|
||||
def output_docs(backend, out):
|
||||
"""Output documentation for backend options to out"""
|
||||
backend = dir_to_backend.get(backend, backend)
|
||||
out.flush()
|
||||
subprocess.check_call(["rclone", "help", "backend", backend], stdout=out)
|
||||
|
||||
|
Reference in New Issue
Block a user