The options module contains the Options class which provides the ability to load settings from the pysiriproxy configuration file, as as being able to parse the command line arguments.
The Settings class defines all of the specific configuration settings that can be used in the pysiriproxy configuration file.
This setting should contain the path to the file that is used as the certification file for connecting to the Guzzoni web server.
This setting should contain the debug level which will be used by the system.
This setting should contain a string that will be spoken by Siri in the event of an Exception while objects are being filtered or speech rules are being applied.
This setting should contain a boolean indicating whether the pysiriproxy SSL certificates should be generated.
This setting should contain the host name of the Guzzoni web server.
This setting should contain the port number used for connecting to the Guzzoni web server.
The setting should contain the path to the file that is used as the key file for connecting to the Guzzoni web server.
This setting should contain the path to the log file where pysiriproxy should log all of its logging messages.
This setting should contain the log level which will used by the system.
Here are valid values for this setting:
- DEBUG,
- INFO,
- WARN, and
- ERROR
This setting should contain the path to the system directory that contains the plugins which pysiriproxy should load.
This setting should contain the port number that the iPhone uses for its connection.
The Options class is responsible for parsing command line and configuration file options and providing the ability to get the value of a given option.
Define the list of all of the options which are configurable only via the command line.
Define the dictionary of possible configuration section names mapped to the list of configuration options available for that section.
Define the dictionary of variables that can be used in the pysiriproxy configuration file.
These variables can be used by adding a dollar sign before the variable name in the configuration file. These variables will be replaced in the configuration file prior to parsing it.
Example:
# If the following setting is configured in the configuration file,
# the $HOME variable would be replaced by the user's home directory
# prior to parsing the configuration file
RandomSetting = $HOME/Documents