python-rclone icon indicating copy to clipboard operation
python-rclone copied to clipboard

Using without "cfg"

Open gauch opened this issue 6 years ago • 2 comments

Hey,

Could you add a flag, when cfg = 'system' (or something), then flag "--config" would not be inserted into command?

I'm using rclone with its own config and rely on refresh tokens stored there.

Thanks

gauch avatar Feb 04 '19 23:02 gauch

@gauch I'm so sorry I missed the notification with the issue you opened. It makes sense what you're suggesting. I'm curios if you solved your problem differently in the meanwhile ? Is this still a priority ?

ddragosd avatar Nov 09 '20 02:11 ddragosd

Working on this today and while I'd like to just let rclone find it's own configs I am working around it by manually reading in the file as follows:

import rclone
from os.path import expanduser

with open(expanduser('~/.config/rclone/rclone.conf')) as config_file:
    config = config_file.read()

rclone.with_config(config).listremotes()

dkolb avatar Dec 04 '20 20:12 dkolb