Using long options wherever applicable, using "=" spacer for them.
This commit is contained in:
		@@ -57,7 +57,7 @@ class Flag(CommandMapping):
 | 
				
			|||||||
class Option(CommandMapping):
 | 
					class Option(CommandMapping):
 | 
				
			||||||
    def __init__(self, option):
 | 
					    def __init__(self, option):
 | 
				
			||||||
        self.option = option
 | 
					        self.option = option
 | 
				
			||||||
        self.spacer = " "
 | 
					        self.spacer = "=" if option.startswith("--") else " "
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def map(self, value):
 | 
					    def map(self, value):
 | 
				
			||||||
        if value is not None:
 | 
					        if value is not None:
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,15 +23,15 @@ class ConnectorSource(SdrSource):
 | 
				
			|||||||
            .getCommandMapper()
 | 
					            .getCommandMapper()
 | 
				
			||||||
            .setMappings(
 | 
					            .setMappings(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    "samp_rate": Option("-s"),
 | 
					                    "samp_rate": Option("--samplerate"),
 | 
				
			||||||
                    "tuner_freq": Option("-f"),
 | 
					                    "tuner_freq": Option("--frequency"),
 | 
				
			||||||
                    "port": Option("-p"),
 | 
					                    "port": Option("--port"),
 | 
				
			||||||
                    "controlPort": Option("-c"),
 | 
					                    "controlPort": Option("--control"),
 | 
				
			||||||
                    "device": Option("-d"),
 | 
					                    "device": Option("--device"),
 | 
				
			||||||
                    "iqswap": Flag("-i"),
 | 
					                    "iqswap": Flag("--iqswap"),
 | 
				
			||||||
                    "rtltcp_compat": Option("-r"),
 | 
					                    "rtltcp_compat": Option("--rtltcp"),
 | 
				
			||||||
                    "ppm": Option("-P"),
 | 
					                    "ppm": Option("--ppm"),
 | 
				
			||||||
                    "rf_gain": Option("-g"),
 | 
					                    "rf_gain": Option("--gain"),
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -11,7 +11,7 @@ class RtlSdrSource(ConnectorSource):
 | 
				
			|||||||
            super()
 | 
					            super()
 | 
				
			||||||
            .getCommandMapper()
 | 
					            .getCommandMapper()
 | 
				
			||||||
            .setBase("rtl_connector")
 | 
					            .setBase("rtl_connector")
 | 
				
			||||||
            .setMappings({"bias_tee": Flag("-b"), "direct_sampling": Option("-e")})
 | 
					            .setMappings({"bias_tee": Flag("--biastee"), "direct_sampling": Option("--directsampling")})
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,8 +13,8 @@ class RtlTcpSource(ConnectorSource):
 | 
				
			|||||||
            .setBase("rtl_tcp_connector")
 | 
					            .setBase("rtl_tcp_connector")
 | 
				
			||||||
            .setMappings(
 | 
					            .setMappings(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    "bias_tee": Flag("-b"),
 | 
					                    "bias_tee": Flag("--biastee"),
 | 
				
			||||||
                    "direct_sampling": Option("-e"),
 | 
					                    "direct_sampling": Option("--directsampling"),
 | 
				
			||||||
                    "remote": Argument(),
 | 
					                    "remote": Argument(),
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -15,8 +15,8 @@ class SoapyConnectorSource(ConnectorSource, metaclass=ABCMeta):
 | 
				
			|||||||
            .setBase("soapy_connector")
 | 
					            .setBase("soapy_connector")
 | 
				
			||||||
            .setMappings(
 | 
					            .setMappings(
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    "antenna": Option("-a"),
 | 
					                    "antenna": Option("--antenna"),
 | 
				
			||||||
                    "soapy_settings": Option("-t"),
 | 
					                    "soapy_settings": Option("--settings"),
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
            )
 | 
					            )
 | 
				
			||||||
        )
 | 
					        )
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user