FileConnector is a service that crawls thru a folder and publishes one document for each found file.
Example code (from branch develop):
#file : FileConnector.py (github)
# FileConnector crawler # Crawls a directory and publishes a docment for each files found def onDocument(doc): print(doc) fc = runtime.start("fc","FileConnector") fc.addListener("publishDocument","python","onDocument") # start crawling fc.setDirectory(".myrobotlab") fc.startCrawling() sleep(5) fc.stopCrawling()
Example configuration (from branch develop):
#file : FileConnector.py (github)
!!org.myrobotlab.service.config.ServiceConfig listeners: null peers: null type: FileConnector