def run(name, configFile, ttsConfigFile, contentFile, videoFile, logFile): OutputPath.init(configFile) #thread = ThreadWritableObject(configFile, name, logFile) #thread.start() #sys.stdout = thread #sys.errout = thread # XXX: Actually, it does NOT work try: print('Now: ', datetime.now().strftime('%Y-%m-%d %H:%M:%S')) Network.setIsEnabled(True) tts = Tts(ttsConfigFile) combiner = Combiner(configFile) combiner.combine(tts, contentFile, videoFile) except KeyboardInterrupt: pass except Exception as e: print('Error occurs at', datetime.now().strftime('%Y-%m-%d %H:%M:%S')) traceback.print_exc(file=sys.stdout) finally: pass
from combiner import Combiner from analyzer import Analyzer from combiner_config import MessagesConfig, PostsConfig, LocationsConfig, LikesConfig, CommentsConfig from analyzer_config import MessagesAnalyzerConfig, CommentsAnalyzerConfig, PostsAnalyzerConfig combiner = Combiner(config=PostsConfig) files = combiner.combine() analyzer = Analyzer(config=PostsAnalyzerConfig) analyzer.analyze()