Explorar o código

修改项目名称

liyuyi@c-top.com.cn %!s(int64=4) %!d(string=hai) anos
pai
achega
4bcd360712

+ 1 - 1
get_material_and_script/get_material_from_kuaishou_kaiyan.py

@@ -94,7 +94,7 @@ if __name__ == '__main__':
                'database': 'db_ai_word'}
     db_engine = get_db_engine(db_info)
 
-    logger = get_logger(log_file_name="/data/pythonProject/video-to-word/logs/get_video_from_kuaishou_kaiyan.log",
+    logger = get_logger(log_file_name="/data/pythonProject/video_to_word/logs/get_video_from_kuaishou_kaiyan.log",
                         log_name='get_video_from_kuaishou_kaiyan_logger')
     logger.info("get_video_from_kuaishou_kaiyan started! id of logger is: %s" % id(logger))
 

+ 1 - 1
get_material_and_script/get_material_from_ocean_engine.py

@@ -151,7 +151,7 @@ if __name__ == '__main__':
                'database': 'db_ai_word'}
     db_engine = get_db_engine(db_info)
 
-    logger = get_logger(log_file_name="/data/pythonProject/video-to-word/logs/get_video_from_ocean_engine.log",
+    logger = get_logger(log_file_name="/data/pythonProject/video_to_word/logs/get_video_from_ocean_engine.log",
                         log_name='get_video_from_ocean_engine_logger')
     logger.info("get_video_from_ocean_engine started! id of logger is: %s" % id(logger))
 

+ 10 - 10
readme.md

@@ -8,30 +8,30 @@
 **项目启动说明**
 
 1、git clone 最新代码<br>
- git clone http://git.tjyourong.com.cn/liyuyi/video-to-word.git <br>
+ git clone http://git.tjyourong.com.cn/liyuyi/video_to_word.git <br>
 
 2、启动获取腾讯云语音转脚本的服务<br>
-切换到目录: cd /data/pythonProject/video-to-word
-nohup /data/Miniconda3/envs/video-to-word/bin/python -u /data/pythonProject/video-to-word/main.py >/dev/null 2>&1 &
+切换到目录: cd /data/pythonProject/video_to_word
+nohup /data/Miniconda3/envs/video_to_word/bin/python -u /data/pythonProject/video_to_word/main.py >/dev/null 2>&1 &
 
 3、定时任务配置<br>
 3-1 定期从巨量引擎获取优质素材,并转化为脚本。每周日晚上10:30执行一次<br>
-30 20  *  *  7   /data/Miniconda3/envs/video-to-word/bin/python -u  /data/pythonProject/video-to-word/get_video_from_ocean_engine.py  >> /data/pythonProject/video-to-word/logs/get_video_from_ocean_engine.log &
+30 20  *  *  7   /data/Miniconda3/envs/video_to_word/bin/python -u  /data/pythonProject/video_to_word/get_video_from_ocean_engine.py  >> /data/pythonProject/video_to_word/logs/get_video_from_ocean_engine.log &
 
 -- for test<br>
-nohup /data/Miniconda3/envs/video-to-word/bin/python -u  /data/pythonProject/video-to-word/get_video_from_ocean_engine.py  >> /data/pythonProject/video-to-word/logs/get_video_from_ocean_engine.log &
+nohup /data/Miniconda3/envs/video_to_word/bin/python -u  /data/pythonProject/video_to_word/get_video_from_ocean_engine.py  >> /data/pythonProject/video_to_word/logs/get_video_from_ocean_engine.log &
 
 3-2 每周导出内部高质量&低质量,巨量引擎优质素材的脚本。每周一早上08:30 执行一次<br>
-30 8  *  *  1   /data/Miniconda3/envs/video-to-word/bin/python -u  /data/pythonProject/video-to-word/get_high_quality_script.py  >> /data/pythonProject/video-to-word/logs/get_high_quality_script.log &
+30 8  *  *  1   /data/Miniconda3/envs/video_to_word/bin/python -u  /data/pythonProject/video_to_word/get_high_quality_script.py  >> /data/pythonProject/video_to_word/logs/get_high_quality_script.log &
 
 -- for test<br>
-nohup /data/Miniconda3/envs/video-to-word/bin/python -u  /data/pythonProject/video-to-word/get_high_quality_script.py  >> /data/pythonProject/video-to-word/logs/get_high_quality_script.log &
+nohup /data/Miniconda3/envs/video_to_word/bin/python -u  /data/pythonProject/video_to_word/get_high_quality_script.py  >> /data/pythonProject/video_to_word/logs/get_high_quality_script.log &
 
 
 4、查看执行日志<br>
-cd /data/pythonProject/video-to-word/logs<br>
-tail -f /data/pythonProject/video-to-word/logs/get_high_quality_script.log<br>
-tail -f /data/pythonProject/video-to-word/logs/get_video_from_ocean_engine.log<br>
+cd /data/pythonProject/video_to_word/logs<br>
+tail -f /data/pythonProject/video_to_word/logs/get_high_quality_script.log<br>
+tail -f /data/pythonProject/video_to_word/logs/get_video_from_ocean_engine.log<br>
 
 
 配置定时任务:<br>

+ 5 - 4
time_task/get_material_and_script_by_query_word.py

@@ -7,7 +7,7 @@ import pandas as pd
 import yaml
 
 curr_path = os.path.abspath(os.path.dirname(__file__))
-project_root_path = curr_path[:curr_path.find("video-to-word") + len("video-to-word")]
+project_root_path = curr_path[:curr_path.find("video_to_word") + len("video_to_word")]
 sys.path.append(project_root_path)
 
 from common_func import get_db_engine, get_logger
@@ -16,15 +16,16 @@ from get_material_and_script.get_material_from_kuaishou_kaiyan import GetMateria
 from get_material_and_script.get_material_from_ocean_engine import GetMaterialFromOceanEngine
 from get_material_and_script.get_script_from_tengxunyun import GetScriptFromTengXunYunServer
 
+
 if __name__ == '__main__':
     print("test end")
     # 创建日志对象
-    logger = get_logger(log_file_name="/data/pythonProject/video-to-word/logs/get_high_quality_material.log",
+    logger = get_logger(log_file_name="/data/pythonProject/video_to_word/logs/get_high_quality_material.log",
                         log_name='get_high_quality_material_logger')
     logger.info("get_high_quality_material_logger started! id of logger is: %s" % id(logger))
 
     # 1 读取配置文件
-    with open('/data/pythonProject/video-to-word/config/config.yaml', mode='r', encoding='utf-8') as f:
+    with open('/data/pythonProject/video_to_word/config/config.yaml', mode='r', encoding='utf-8') as f:
         config = yaml.load(f.read(), Loader=yaml.FullLoader)
 
     # 1-1 数据库连接引擎,依据开发环境/生产环境 进行切换
@@ -57,7 +58,7 @@ if __name__ == '__main__':
 
         # 2-1 获取内外部优质素材
         full_high_material_df = pd.DataFrame()
-        writer = pd.ExcelWriter('/data/pythonProject/video-to-word/data/%s_内外部优质素材_%s.xlsx' %
+        writer = pd.ExcelWriter('/data/pythonProject/video_to_word/data/%s_内外部优质素材_%s.xlsx' %
                                 (query_word, datetime.date.today().strftime('%Y-%m-%d')))
         for source_code in source_code_lst:
             if source_code == 1: