From 8664776718acd8992b521404ad777712f5b031d6 Mon Sep 17 00:00:00 2001 From: Manuel Coenen Date: Thu, 27 Jun 2019 11:49:40 +0200 Subject: [PATCH] Add -device to help text and extend README --- README.md | 29 ++++++++++++++++++++++++++++- commands/help.go | 5 +++++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 28e4dff..248a847 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,11 @@ Common options to all commands: -domain Network address of device. Mandatory parameter. -port Port the device is reachable on (default 80) -password Connection password (default "reprap") + -device This can be used to either create, update (both + in combination with the above options) or load + an already configured device. This makes multi- + device environments easier to handle. + (default "default") -verbose Output more details -debug Output details on underlying HTTP requests @@ -33,5 +38,27 @@ The commands are: Use "rfm help " for more information about a command. ``` + +## Configuration File +`rfm` will create a configuration file in the user's home directory containing connection parameters for all devices (selectable by `-device` options) the user has ever specified. +This means after connecting succesfully once to a new device this can always be reaccessed by just providing the chosen name to `-device` without the need to reenter `-domain`, `-port` and/or `-password`. + +To create or update settings just specify `-device` and the parameters you want to set or update. + +### Example +``` +# Create a new configuration for "first_device". This will be saved in ~/rfm.toml +rfm ls -device first_device -domain some.domain -port 1234 0:/ + +# Create a new configuration for "second_device" +rfm ls -device second_device -domain some.other.domain -port 2345 0:/ + +# Update configuration of "first_device" after enabling a non-default password +rfm ls -device first_device -password my_insecure_password 0:/ + +# Use second_device +rfm ls -device second_device 0:/ +``` + ## Feedback -Please provide any feedback either here in the Issues or send a pull request or go to [the Duet3D forum](https://forum.duet3d.com/topic/10880/rfm-reprapfirmware-filemanager-duetbackup-successor). +Please provide any feedback either here in the Issues or send a pull request or go to [the Duet3D forum](https://forum.duet3d.com/topic/10880). diff --git a/commands/help.go b/commands/help.go index bca75c6..4bee5a5 100644 --- a/commands/help.go +++ b/commands/help.go @@ -20,6 +20,11 @@ Common options to all commands: -domain Network address of device. Mandatory parameter. -port Port the device is reachable on (default 80) -password Connection password (default "reprap") + -device This can be used to either create, update (both + in combination with the above options) or load + an already configured device. This makes multi- + device environments easier to handle. + (default "default") -verbose Output more details -debug Output details on underlying HTTP requests