Add support for add channels query string to --seturl
Append any channels in a channels URL to the end of the array if the add=true query string value is present.
Otherwise delete and replace all channels (exiting functionality)
I opened MR #708 which creates new option --ch-add-url that adds any new channels from an add URL. It doesn't change any existing channels. It errors out with relevant messages if the URL is invalid or the node runs out of channels.
I don't know pytest so I didn't contibute any tests for it in test_node.py.
Examples of use:
Add channels with new names from the URL:
% meshtastic --ch-add-url 'https://meshtastic.org/e/?add=true#Ch0SEAdk8ukuvs5lth8X1TQ5qlkaBFRlc3QlBAAAAAoeEhCklt7p_KHfBjTQmokk2D4FGgVUZXN0MiUFAAAAEg8IATgBQANIAVAeaAHABgE'
Connected to radio
Adding new channel 'Test' to device
Adding new channel 'Test2' to device
Fail when a non-add URL was provided:
% meshtastic --ch-add-url 'https://meshtastic.org/e/#Ch0SEAdk8ukuvs5lth8X1TQ5qlkaBFRlc3QlBAAAAAoeEhCklt7p_KHfBjTQmokk2D4FGgVUZXN0MiUFAAAAEg8IATgBQANIAVAeaAHABgE'
Connected to radio
Warning: Invalid URL 'https://meshtastic.org/e/#Ch0SEAdk8ukuvs5lth8X1TQ5qlkaBFRlc3QlBAAAAAoeEhCklt7p_KHfBjTQmokk2D4FGgVUZXN0MiUFAAAAEg8IATgBQANIAVAeaAHABgE'
I chose a new argument instead of overloading --seturl because it feels like a different behavior. But I can refactor it into --seturl if you prefer.
available in v2.7.3. Is there anything remaining to do or can this point be closed?
Close it, thanks.
I don't have the permissions to do so... @garthvh : can you please close it?