meshchatlib
¶
meshchatlib.die() | Exit the program with an error message |
meshchatlib.capture() | Execute a command and capture the output |
meshchatlib.node_name() | Retrieve the current node name |
meshchatlib.zone_name() | Retrieve the current MeshChat zone name that the node is operating under |
meshchatlib.file_md5() | Generate the MD5 sum of a file |
meshchatlib.hash() | Generate a unique hash |
meshchatlib.str_escape() | Escape percent signs |
Exit the program with an error message.
msg | (string) | Message to display |
Execute a command and capture the output.
cmd | (string) | Command line to execute |
(string) | stdout of the command |
Retrieve the current node name.
This function will interogate the UCI settings to retrieve the current
node name stored in the hsmmmesh
settings.
(string) | Name of current node |
Retrieve the current MeshChat zone name that the node is operating under.
(string) | Name of MeshChat zone |
Generate the MD5 sum of a file.
This under the covers relies on md5sum
and executes md5sum
against
the specified file.
There is no checking to determine if md5sum
is installed or
executable. In the future, this may change.
file | (string) | Path to file |
(string) | Result of |
Generate a unique hash.
Combine the current time (epoch time) and a randomly generated number
between 0 - 99999 and run through md5sum
to generate a random hash.
There is no checking to determine if md5sum
is installed or
executable. In the future, this may change.
(string) | Generated hash value |
Escape percent signs.
str | (string) | String to encode |
(string) | Encoded string |