Yaml Config¶
Switchboard can also with a config.yaml file. See below for an example configuration.
pollingInterval: 10
watchers:
- path: "/home/user/Downloads"
destination: "/home/user/Documents"
ext: ".txt"
- path: "/home/user/Downloads"
destination: "/home/user/Videos"
ext: ".mp4"
pollingInterval: 10
watchers:
- path: "/home/user/Downloads"
destination: "/home/user/Documents"
ext: ".txt"
pattern: "(?i)(financial-report-[a-z]+-[0-9]+.txt)"
priority: 0
- path: "/home/user/Downloads"
destination: "/home/user/Videos"
ext: ".mp4"
priority: 1
With the content above, create a config.yaml
file. You can then pass it as a flag to switchboard like so:
switchboard watch --config config.yaml
###
Using config file: yaml/config.yaml
2022/01/04 22:53:15 Observing