15 lines
1.8 KiB
Plaintext
15 lines
1.8 KiB
Plaintext
from pathlib import Path
|
|
import json,datetime,subprocess,hashlib
|
|
R=Path.cwd();REF=R/'docs/hel-892/director-project-reference';now=datetime.datetime.now(datetime.timezone.utc).isoformat();fragment=Path('.local-evidence/setup-anima.py').read_text();fragment=fragment[fragment.index('def fetch(spec):'):fragment.index('with concurrent.futures.ThreadPoolExecutor')].replace('anima-','director-project-');exec(fragment)
|
|
rows=json.loads((REF/'sources.json').read_bytes())['sources']
|
|
specs=[('project','yolain/ComfyUI-Easy-Media','5739638c646a66a93d60c51714593b2b96a2a3b6',['nodes/__init__.py','nodes/basic.py','nodes/minimax.py','nodes/video.py','frontend/src/index.ts','frontend/src/components/widgets/index.ts','pyproject.toml','frontend/package.json']),('pack','yolain/ComfyUI-Easy-Media','e1893122c0e5a26d3544e99e4b35124d64901e66',['nodes/__init__.py','nodes/common.py','nodes/video.py']),('hybrid','scottmudge/ComfyUI_MinimaxH3HybridLoader','a44c69b02242e41fbd01e22abe2a492adc853038',['minimaxh3.py','LICENSE.txt','README.md']),('core0330','Comfy-Org/ComfyUI','v0.33.0',['nodes.py','comfy_extras/nodes_attention.py','comfy/samplers.py']),('frontend','Comfy-Org/ComfyUI_frontend','v1.51.9',['package.json','package-lock.json','LICENSE','src/scripts/widgets.ts','src/lib/litegraph.ts'])]
|
|
for spec in specs:
|
|
key=spec[0];p=REF/(key+'-fetch.txt')
|
|
if p.exists():(REF/(key+'-fetch-initial.txt')).write_bytes(p.read_bytes())
|
|
for e in fetch(spec):
|
|
rows=[x for x in rows if not(x['id']==e['id']and x['file']==e['file'])];rows.append(e)
|
|
for e in rows:
|
|
if e['id']=='hybrid':e['license_file']='hybrid__LICENSE.txt'
|
|
elif not(REF/e['license_file']).exists():e['license_file']=next(x['local_file']for x in rows if x['id']==e['id']and x['file']=='LICENSE')
|
|
(REF/'sources.json').write_text(json.dumps(dict(sources=rows),ensure_ascii=False,indent=2)+'\n')
|