Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gitflick · 单文件代码历史倒带电影

GitFlick —— replay any file's evolution as a self-contained HTML movie: every commit becomes a frame.

GitFlick —— 把一个文件的 git 演变史变成自包含 HTML「影片」:每个提交就是一帧。

tests license

解决什么问题

讲一个函数怎么长成的,比"看最终版"有说服力一百倍——面试作品讲解、教学复盘、技术博客配素材,都需要"倒带"。git log -p 是给机器看的;gitflick 生成的是能直接发给任何人的单文件 HTML:自动播放、逐帧步进、进度条拖拽,深色主题,零依赖零网络。

快速上手

python -m gitflick path/to/repo src/core/engine.py -o engine-movie.html
# → 每帧 = 一个修订(hash/日期/作者/行数),旧 → 新播放

真实示例见 examples/demo.html —— 由本工作流的 gitgrave 仓库 cli.py 真实历史生成。

特性

  • --follow 重命名追踪:文件改过名也不丢历史
  • 自包含输出:内联 CSS/JS,双击即放,可挂 GitHub Pages / 发群
  • 确定性渲染:同一仓库状态恒定产出同字节 HTML,可安全进 CI diff
  • 纯标准库:Python ≥3.10 即跑

License

MIT

Install

pip install -e .

Quickstart

  1. git clone https://github.com/qianbrady/gitflick
  2. pip install -e .
  3. Run python -m gitflick --help - full usage on screen

Usage

$ python -m gitflick --help
usage: gitflick [-h] [-o OUTPUT] [--max MAX] repo file
�ѵ����ļ��� git �ݱ�ʷ��Ⱦ���԰��� HTML ������Ӱ��
positional arguments:
  repo                 git �ֿ�·��
  file                 �ļ����·����֧�� --follow ������׷�٣�
options:
  -h, --help           show this help message and exit

Contributing

Issues and PRs welcome - run pytest locally before submitting.

About

Replay a file's git evolution as a single self-contained HTML movie - every commit becomes a frame.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages