filewatchpublisher.agent module

class filewatchpublisher.agent.FileWatchPublisher(config, **kwargs)[source]


Monitors files from configuration for changes and publishes added lines on corresponding topics. Ignores if a file does not exist and move to next file in configuration with an error message. Exists if all files does not exist. :param config: Configuration dict :type config: dict

Example configuration:

    "publish_file": [
            "file": "/var/log/syslog",
            "topic": "platform/syslog",
            "file": "/home/volttron/tempfile.txt",
            "topic": "temp/filepublisher",
publish_file(line, topic)[source]
starting(sender, **kwargs)[source]
filewatchpublisher.agent.file_watch_publisher(config_path, **kwargs)[source]

Load the FileWatchPublisher agent configuration and returns and instance of the agent created using that configuration. :param config_path: Path to a configuration file. :type config_path: str :returns: FileWatchPublisher agent instance :rtype: FileWatchPublisher agent

filewatchpublisher.agent.main(argv=['/home/docs/checkouts/', '-T', '-E', '-b', 'html', '-d', '_build/doctrees', '-D', 'language=en', '.', '_build/html'])[source]

Main method called by the platform.