🔄 卡若AI 同步 2026-07-19 10:29 | 更新:多目录更新 | 排除 >1MB: 515 个
This commit is contained in:
@@ -65,20 +65,33 @@ def label(p):
|
||||
return '根目录文档'
|
||||
return None
|
||||
|
||||
def describe(path):
|
||||
p = path.strip()
|
||||
name = Path(p).name
|
||||
if p == '.gitignore': return '更新大文件排除规则'
|
||||
if p.endswith('gitea_push.conf'): return 'Gitea局域网地址改为192.168.110.101'
|
||||
if p.endswith('自动同步.sh'): return '同步前检查、去重、本地主版本与受保护推送'
|
||||
if p.endswith('gitea_push_smart.sh'): return '局域网优先推送与本地主版本策略'
|
||||
if p.endswith('sync_wiki_to_gitea.sh'): return '百科同步地址切换到公司NAS'
|
||||
if p.endswith('SKILL.md'): return f'{p.rsplit("/",1)[0]} Skill规则更新'
|
||||
if p.endswith('agents/openai.yaml'): return '智能体配置更新'
|
||||
if '审核前检查清单' in p: return '新增审核前检查清单'
|
||||
if '审核经验库' in p: return '补充审核经验'
|
||||
if p == 'SKILL_REGISTRY.md': return '更新Skill登记索引'
|
||||
return f'更新{name}'
|
||||
|
||||
def main():
|
||||
raw = sys.stdin.buffer.read().decode('utf-8', errors='ignore').strip()
|
||||
lines = [s.strip() for s in raw.splitlines() if s.strip()]
|
||||
seen = []
|
||||
for p in lines:
|
||||
l = label(p)
|
||||
if l and l not in seen:
|
||||
seen.append(l)
|
||||
out = '、'.join(seen[:10])
|
||||
if len(seen) > 10:
|
||||
out += '等'
|
||||
if not out:
|
||||
out = '多目录更新'
|
||||
entries=[]
|
||||
for line in lines:
|
||||
parts=line.split('\t',1)
|
||||
path=parts[-1]
|
||||
item=describe(path)
|
||||
if item not in entries: entries.append(item)
|
||||
if not entries: print('无文件变更'); return
|
||||
out=';'.join(entries[:12])
|
||||
if len(entries)>12: out += f';其余{len(entries)-12}项见提交文件清单'
|
||||
print(out)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
if __name__ == '__main__': main()
|
||||
|
||||
Reference in New Issue
Block a user