What is the problem you are having with rclone?
I want to pass filters as environmental variables if at all possible.
I tried with the output below with no success.
Is there a way to do it or an alternative strategy I can use to achieve the same result?
Run the command 'rclone version' and share the full output of the command.
rclone v1.57.0
- os/version: ubuntu 20.04 (64 bit)
- os/kernel: 5.4.0-91-generic (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.2
- go/linking: static
- go/tags: none
and
rclone v1.61.1
- os/version: darwin 12.4 (64 bit)
- os/kernel: 21.5.0 (x86_64)
- os/type: darwin
- os/arch: amd64
- go/version: go1.19.4
- go/linking: dynamic
- go/tags: none
Which cloud storage system are you using?
Dropbox via API
The command you were trying to run (eg rclone copy /tmp remote:tmp
)
rclone ls dropbox-api: --filter='- **.rar' --filter='- **.{jpg,png}' --ignore-case --human-readable
The rclone config contents with secrets removed.
[dropbox-api]
type = dropbox
client_id = **CLIENT_ID**
client_secret = **CLIENT_SECRET**
chunk_size = 64Mi
token = {"access_token":"*****","token_type":"bearer","refresh_token":"*****","expiry":"2023-01-07T19:27:57.955966+01:00"}
impersonate = user.name@gmail.com
A log from the command with the -vv
flag
rclone ls dropbox-api: --filter='- **.rar' --filter='- **.{jpg,png}' --ignore-case --human-readable --dump filters
2023/01/07 17:21:51 NOTICE: Automatically setting -vv as --dump is enabled
--- start filters ---
--- File filter rules ---
- (?i)(^|/).*\.rar$
- (?i)(^|/).*\.(jpg|png)$
--- Directory filter rules ---
- (?i)(^|/).*\.rar$
- (?i)(^|/).*\.(jpg|png)$
--- end filters ---
... good output ...
RCLONE_FILTER="- **.rar - **.{jpg,png}" rclone ls dropbox-api: --ignore-case --human-readable --dump filters
2023/01/07 17:27:38 NOTICE: Automatically setting -vv as --dump is enabled
--- start filters ---
--- File filter rules ---
- (?i)(^|/).*\.rar - .*\.(jpg|png)$
--- Directory filter rules ---
- (?i)(^|/).*\.rar - .*\.(jpg|png)$
--- end filters ---
... bad output ...