Skip to content

Eileenes/creative-skills / skills/promo-video-director

promo-video-director

Verified

根据账号链接、网站地址或参考视频,引导并完成体素吉祥物宣传片的资料收集、平台适配、角色调整、关键帧预览、渲染和交付。支持 X、小红书、微信公众号及产品官网的 19 秒模板,也支持基于该模板的定制;适用于账号宣传片、鲸鱼同款视频和吉祥物点按界面动效。

scripts/prepare_project.py

View on GitHub
#!/usr/bin/env python3
"""Create a new film workspace from bundled templates; never downloads dependencies."""
import argparse
import json
import os
from pathlib import Path
import shutil
import subprocess
import tempfile

REQUIRED = (
    'lib/motion.js', 'scripts/stills.py', 'scripts/render.py',
    'scripts/verify_promo.py', 'scripts/sfx_palette.py',
)


def prepare(platform, output, onetake=None):
    # Do not resolve a dangling destination symlink into a different target.
    dest = Path(os.path.abspath(Path(output).expanduser()))
    if os.path.lexists(dest):
        raise ValueError(f'Output already exists; choose a new directory: {dest}')
    source = Path(__file__).resolve().parents[1] / 'assets' / 'promo-kit'
    dependency = Path(onetake).expanduser().resolve() if onetake else None
    if dependency:
        missing = [name for name in REQUIRED if not (dependency / name).is_file()]
        if missing:
            raise ValueError('Incomplete Onetake installation: ' + ', '.join(missing))
    dest.parent.mkdir(parents=True, exist_ok=True)
    staging = Path(tempfile.mkdtemp(prefix='.promo-', dir=dest.parent))
    try:
        shutil.copytree(source, staging, dirs_exist_ok=True,
                        ignore=shutil.ignore_patterns('__pycache__', '*.pyc'))
        shutil.copyfile(staging / 'examples' / f'{platform}.json', staging / 'config.json')
        state = {'platform': platform, 'demo_data': True, 'onetake': None,
                 'status': 'prepared; replace demo data and install rendering dependencies'}
        if dependency:
            (staging / 'onetake').symlink_to(dependency, target_is_directory=True)
            (staging / 'motion.js').symlink_to(dependency / 'lib' / 'motion.js')
            revision = None
            if (dependency / '.git').exists():
                result = subprocess.run(['git', '-C', str(dependency), 'rev-parse', 'HEAD'],
                                        capture_output=True, text=True, check=False)
                if result.returncode == 0:
                    revision = result.stdout.strip()
            state['onetake'] = {'path': str(dependency), 'git_revision': revision,
                                 'license': 'check the linked installation; not inferred by this tool'}
        (staging / 'project-state.json').write_text(
            json.dumps(state, ensure_ascii=False, indent=2) + '\n', encoding='utf-8')
        # mkdir fails if another operation creates this destination in the meantime.
        dest.mkdir()
        try:
            for item in staging.iterdir():
                shutil.move(str(item), str(dest / item.name))
        except Exception:
            shutil.rmtree(dest)
            raise
    finally:
        shutil.rmtree(staging)
    return dest


def main():
    parser = argparse.ArgumentParser(description=__doc__)
    parser.add_argument('--platform', choices=['x', 'xhs', 'wechat', 'web'], required=True)
    parser.add_argument('--output', required=True, help='New, non-existing film directory')
    parser.add_argument('--onetake', help='Existing, appropriately licensed Onetake installation')
    args = parser.parse_args()
    try:
        output = prepare(args.platform, args.output, args.onetake)
    except (OSError, ValueError) as exc:
        parser.exit(1, f'Cannot prepare project: {exc}\n')
    print(f'Prepared: {output}')
    print('Replace demo config, prepare dependencies, then build and inspect stills before rendering.')


if __name__ == '__main__':
    main()
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 194kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 194kUpdated Claude CodeCodexVerifiedInstall