Echo-aloha/asphalt-codex-skills-5 / skills/pfc-postprocessing
pfc-postprocessing
VerifiedPost-process PFC 5.0 asphalt CSV and image exports into reproducible curves, fields, rose diagrams, animations, and summary tables without relying on a local PFC installation.
scripts/export_animation.py
View on GitHubfrom __future__ import annotations
from pathlib import Path
import argparse
import imageio.v2 as imageio
from PIL import Image
from _common import ensure_dir
def main() -> None:
parser = argparse.ArgumentParser(description="Create GIF and optional MP4 from ordered PNG frames")
parser.add_argument("--input-dir", type=Path, required=True)
parser.add_argument("--output-dir", type=Path, required=True)
parser.add_argument("--stem", default="animation")
parser.add_argument("--fps", type=int, default=4)
parser.add_argument("--write-mp4", action="store_true")
args = parser.parse_args()
output_dir = ensure_dir(args.output_dir)
frames = sorted(args.input_dir.glob("frame_*.png"))
if not frames:
raise FileNotFoundError(f"No ordered frames found in {args.input_dir}")
images = [Image.open(frame).convert("RGBA") for frame in frames]
gif_path = output_dir / f"{args.stem}.gif"
images[0].save(
gif_path,
save_all=True,
append_images=images[1:],
duration=int(1000 / max(args.fps, 1)),
loop=0,
disposal=2,
)
if args.write_mp4:
mp4_path = output_dir / f"{args.stem}.mp4"
with imageio.get_writer(mp4_path, fps=args.fps) as writer:
for frame in frames:
writer.append_data(imageio.imread(frame))
print(mp4_path)
print(gif_path)
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| deprecation-and-migrationaddyosmani/agent-skillsManages deprecation and migration. Use when removing old systems, APIs, or features. Use when migrating users from one implementation to another. Use when migrating a database schema in production, such as renaming or dropping a column without downtime (expand/contract). Use when deciding whether to maintain or sunset existing code. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| performance-optimizationaddyosmani/agent-skillsOptimizes application performance across frontend, backend, queries, and databases. Use when performance requirements exist, when you suspect performance regressions, when Core Web Vitals or load times need improvement, when N+1 query patterns need fixing, or when profiling reveals bottlenecks. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |
| Agent Cost Reportthedotmack/claude-memBelievable agent cost report for any period, default the last 7 full days PT, not counting today. Measured tokens from Claude Code transcripts priced at OpenRouter list prices (ESTIMATED), measured provider spend when a sanctioned source exists, note-taker cost separate, Timing-style HTML/PDF plus report.json, line-items.csv, evidence.json. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |