会议纪要skill增加历史会议纪要比对

This commit is contained in:
闫旭隆
2026-01-19 13:49:00 +08:00
parent e0aff02e31
commit 97457b8124
28 changed files with 3022 additions and 2223 deletions

View File

@ -0,0 +1,9 @@
{
"permissions": {
"allow": [
"Bash(python replace_speaker.py:*)",
"Bash(cmd //c \"D:\\\\AA_Work\\\\AIEC-团队开发规范Skills\\\\.claude\\\\skills\\\\meeting-minutes-generator-v1\\\\input\\\\本周会议转写文本\\\\replace_speaker.bat\")",
"Bash(export PYTHONIOENCODING=utf-8)"
]
}
}

View File

@ -1,39 +1,48 @@
@echo off
chcp 65001 >nul
setlocal enabledelayedexpansion
echo ========================================
echo 会议转写文本发言人替换工具
echo Speaker Replacement Tool
echo ========================================
echo.
REM 检查是否有参数
if "%~1"=="" (
echo 请将txt文件拖拽到此批处理文件上或使用命令行:
echo replace_speaker.bat 文件名.txt
echo.
pause
exit /b 1
)
REM 获取脚本所在目录
set "SCRIPT_DIR=%~dp0"
set "PYTHONIOENCODING=utf-8"
set "PYTHON=C:\Users\10120\anaconda3\python.exe"
REM 处理输入文件
set "INPUT_FILE=%~1"
echo 正在处理: %INPUT_FILE%
echo.
REM 调用Python脚本
python "%SCRIPT_DIR%replace_speaker.py" "%INPUT_FILE%"
if %ERRORLEVEL% EQU 0 (
if "%~1"=="" (
echo No file specified, processing all .txt files...
echo.
echo 处理成功!
set "COUNT=0"
for %%f in ("%SCRIPT_DIR%*.txt") do (
echo Processing: %%~nxf
echo Running: "%PYTHON%" "%SCRIPT_DIR%replace_speaker.py" "%%f"
"%PYTHON%" "%SCRIPT_DIR%replace_speaker.py" "%%f"
echo Exit code: !ERRORLEVEL!
if !ERRORLEVEL! EQU 0 (
set /a COUNT+=1
) else (
echo Failed: %%~nxf
)
)
echo.
echo ========================================
echo Processed !COUNT! files
echo ========================================
) else (
echo Processing: %~nx1
echo.
echo 处理失败!
"%PYTHON%" "%SCRIPT_DIR%replace_speaker.py" "%~1"
if !ERRORLEVEL! EQU 0 (
echo.
echo Done!
) else (
echo.
echo Failed!
)
)
echo.

View File

@ -23,9 +23,11 @@ def replace_speakers(input_file, output_file=None):
content = f.read()
# 替换发言人(匹配行首的发言人格式)
# 格式: 发言人(时间戳): -> 发言人:
content = re.sub(r'^郝倩玉\(\d{2}:\d{2}:\d{2}\):', r'线下人员:', content, flags=re.MULTILINE)
content = re.sub(r'^\.\(\d{2}:\d{2}:\d{2}\):', r'江争达:', content, flags=re.MULTILINE)
# 格式: 发言人: 或 发言人(时间戳): -> 发言人:
# 时间戳是可选的
content = re.sub(r'^郝倩玉(\(\d{2}:\d{2}:\d{2}\))?:', r'线下人员:', content, flags=re.MULTILINE)
content = re.sub(r'^信通院云大所市场部-张媛媛(\(\d{2}:\d{2}:\d{2}\))?:', r'线下人员:', content, flags=re.MULTILINE)
content = re.sub(r'^\.(\(\d{2}:\d{2}:\d{2}\))?:', r'江争达:', content, flags=re.MULTILINE)
# 删除其他所有发言人后的时间戳
content = re.sub(r'^([^\n\(]+)\(\d{2}:\d{2}:\d{2}\):', r'\1:', content, flags=re.MULTILINE)