wangzhibo
2025-07-30 1dd99f552485fe006eb0e9a0ebeacfe559d1e765
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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()