from auto_media_publisher.rewriter.docx_rewriter_thread import DocxRewriteWorkerThread
|
import time
|
import os
|
|
|
def main():
|
input_dir = "input_docx"
|
output_dir = "output_docx"
|
|
thread = DocxRewriteWorkerThread(input_dir, output_dir, interval_minutes=1)
|
thread.start()
|
|
try:
|
while True:
|
time.sleep(1)
|
except KeyboardInterrupt:
|
print("Stopping thread...")
|
thread.stop()
|
thread.join()
|
|
if __name__ == "__main__":
|
# 启用代理(根据你的代理工具和端口调整)
|
os.environ["HTTP_PROXY"] = "http://127.0.0.1:7890"
|
os.environ["HTTPS_PROXY"] = "http://127.0.0.1:7890"
|
main()
|