可视化 github 上的 git 存储库

发布于 2025-01-03 08:37:18 字数 214 浏览 2 评论 0原文

我在 github 上有一个存储库,我想要一个可以生成如下可视化视频的工具:

Koha Library 软件历史可视化

是否有在 Windows 中制作此类视频的分步教程?

I have a repository on github and i want a tool that produces a visualization video like this:

Koha Library Software History Visualization

is there a step by step tutorial to make such a video in windows ?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

花辞树 2025-01-10 08:37:18

gource wiki 提供了有关如何执行此操作的详细信息。

The gource wiki has good info on how to do it.

罗罗贝儿 2025-01-10 08:37:18

如果有人只想要一个衬垫复制粘贴,请使用这个(需要 ffmpeglibx264):

gource -1280x720 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -crf 1 -threads 0 -bf 0 gource.mp4

If somebody wants just a one liner copy paste, use this (needs ffmpeg with libx264):

gource -1280x720 -o - | ffmpeg -y -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -preset ultrafast -crf 1 -threads 0 -bf 0 gource.mp4
相守太难 2025-01-10 08:37:18

要在 Windows 中生成实际视频(使用 Gource),请查看 http: //code.google.com/p/gource/wiki/Videos。在 Gource on Windows 的旧 SO 帖子中运行了一个相关命令。此处的说明:http://nooshu.com/visualising-subversion-with-gource 展示如何为 svn 生成 gource 日志文件,然后 gource 可以回放该文件。 git 变体应该是类似的。请注意,最初的问题涉及古尔斯。

For generating the actual video in Windows (with Gource), check out the Windows section of http://code.google.com/p/gource/wiki/Videos. There is a related command run at an old SO post at Gource on Windows. The instructions here: http://nooshu.com/visualising-subversion-with-gource show how to generate a gource log file for svn, which gource can then play back. The git variation should be similar. Note that the original question concerned Gource.

烟沫凡尘 2025-01-10 08:37:18

文档中未解释的内容;在标准 Windows GIT 安装中,默认情况下,git 二进制文件的路径不会添加到 Windows PATH 环境变量中。相反,GIT 在 Windows 上使用它自己的命令提示符。因此,从 Windows 命令提示符运行 gource 将导致找不到 git。

要从标准 Windows 命令提示符启用 git,您需要将其添加到 PATH 环境变量中。

从 Windows 命令提示符中键入(其中 C:\Program Files (x86)\Git\bin 是计算机上 git 的路径):

set path=%path%;C:\Program Files (x86)\Git\bin

Something not explained in the docs; In a standard Windows GIT install the path to the git binary is not added to windows PATH environment variable by default. Instead GIT uses it's own command-prompt on windows. Thus running gource from the windows command-prompt will result in git not being found.

To enable git from standard windows command-prompt you will need to add it to the PATH environment variable.

From the windows command-prompt type (where C:\Program Files (x86)\Git\bin is the path to git on your computer):

set path=%path%;C:\Program Files (x86)\Git\bin
小情绪 2025-01-10 08:37:18

嗯,该视频是使用 Gource 创建的。它可以理解 Git 日志,并且有 Windows 版本。此外,此处还提供了有关使用它创建视频的 Wiki 文章。

Well, that video was created using Gource. It understands Git logs and there's a Windows version. Also, there's a Wiki write-up on creating videos with it here.

花心好男孩 2025-01-10 08:37:18
#!/bin/bash
# This is script of the generation video from "Gource".

# project: Screensaver Kodi Universe (http://berserk.tv)
# This script creates a ZIP archive of a Kodi screensaver.
# GNU GENERAL PUBLIC LICENSE. Version 2, June 1991
# 
OUT_DIR="output"
OUT="kodi-universe.mkv"
NAME_PROJ="screensaver.kodi.universe"
MEDIA_PATH="${NAME_PROJ}/resources/skins/default/media"
NAME_REP="https://github.com/berserktv/${NAME_PROJ}.git"

GSFILE="output.ppm"
SECONDS_PER_DAY="1"
GOURCE_FRAME_RATE="30"
RESOLUTION="-1920x1080"
CODEC_OUT_FRAME_RATE="25"

FFPARAM="-vcodec libx264 -profile:v high422 -pix_fmt yuv420p"
GSPARAM1="--camera-mode track ${RESOLUTION} --stop-position 1.0 --seconds-per-day ${SECONDS_PER_DAY}"
GSPARAM2="--git-branch origin/master --multi-sampling --stop-at-end --hide-filenames"
GSPARAM3="--highlight-users --file-idle-time 13 --max-files 0 --hide date"
GSPARAM4="--title Kodi --bloom-multiplier 1.0 --bloom-intensity 1.0"

VIS="visualize"
GIT_REP="https://github.com/xbmc/xbmc.git"
# arg1 - Git Project PATH
# example: ./create.sh "https://github.com/facebook/react.git"
if [ -n "$1" ]; then GIT_REP="$1"; fi

# INSTALL PACKAGE git zip ffmpeg gource
packages="git zip ffmpeg gource"
for i in $packages; do
  if ! dpkg -s $i | grep -q "install ok installed"; then sudo apt-get install -y $i; fi
done 

test -d ${OUT_DIR} || mkdir -p ${OUT_DIR}
cd ${OUT_DIR}
# download screensaver Kodi Universe и GIT for Visualization
if ! git clone ${NAME_REP} ${NAME_PROJ}; then echo "Error, not load ${NAME_REP}, exit ..."; exit 1; fi
if ! git clone ${GIT_REP} ${VIS};        then echo "Error, not load ${GIT_REP},  exit ..."; exit 2; fi


gource ${VIS} ${GSPARAM1} ${GSPARAM2} ${GSPARAM3} ${GSPARAM4} --output-framerate ${GOURCE_FRAME_RATE} --output-ppm-stream ${GSFILE}
ffmpeg -y -r ${GOURCE_FRAME_RATE} -f image2pipe -vcodec ppm -i ${GSFILE} ${FFPARAM} -r ${CODEC_OUT_FRAME_RATE} ${OUT} && sync
mv -f ${OUT} ${MEDIA_PATH}
rm -f ${GSFILE}
zip -r ${NAME_PROJ}.zip ${NAME_PROJ}
#!/bin/bash
# This is script of the generation video from "Gource".

# project: Screensaver Kodi Universe (http://berserk.tv)
# This script creates a ZIP archive of a Kodi screensaver.
# GNU GENERAL PUBLIC LICENSE. Version 2, June 1991
# 
OUT_DIR="output"
OUT="kodi-universe.mkv"
NAME_PROJ="screensaver.kodi.universe"
MEDIA_PATH="${NAME_PROJ}/resources/skins/default/media"
NAME_REP="https://github.com/berserktv/${NAME_PROJ}.git"

GSFILE="output.ppm"
SECONDS_PER_DAY="1"
GOURCE_FRAME_RATE="30"
RESOLUTION="-1920x1080"
CODEC_OUT_FRAME_RATE="25"

FFPARAM="-vcodec libx264 -profile:v high422 -pix_fmt yuv420p"
GSPARAM1="--camera-mode track ${RESOLUTION} --stop-position 1.0 --seconds-per-day ${SECONDS_PER_DAY}"
GSPARAM2="--git-branch origin/master --multi-sampling --stop-at-end --hide-filenames"
GSPARAM3="--highlight-users --file-idle-time 13 --max-files 0 --hide date"
GSPARAM4="--title Kodi --bloom-multiplier 1.0 --bloom-intensity 1.0"

VIS="visualize"
GIT_REP="https://github.com/xbmc/xbmc.git"
# arg1 - Git Project PATH
# example: ./create.sh "https://github.com/facebook/react.git"
if [ -n "$1" ]; then GIT_REP="$1"; fi

# INSTALL PACKAGE git zip ffmpeg gource
packages="git zip ffmpeg gource"
for i in $packages; do
  if ! dpkg -s $i | grep -q "install ok installed"; then sudo apt-get install -y $i; fi
done 

test -d ${OUT_DIR} || mkdir -p ${OUT_DIR}
cd ${OUT_DIR}
# download screensaver Kodi Universe и GIT for Visualization
if ! git clone ${NAME_REP} ${NAME_PROJ}; then echo "Error, not load ${NAME_REP}, exit ..."; exit 1; fi
if ! git clone ${GIT_REP} ${VIS};        then echo "Error, not load ${GIT_REP},  exit ..."; exit 2; fi


gource ${VIS} ${GSPARAM1} ${GSPARAM2} ${GSPARAM3} ${GSPARAM4} --output-framerate ${GOURCE_FRAME_RATE} --output-ppm-stream ${GSFILE}
ffmpeg -y -r ${GOURCE_FRAME_RATE} -f image2pipe -vcodec ppm -i ${GSFILE} ${FFPARAM} -r ${CODEC_OUT_FRAME_RATE} ${OUT} && sync
mv -f ${OUT} ${MEDIA_PATH}
rm -f ${GSFILE}
zip -r ${NAME_PROJ}.zip ${NAME_PROJ}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文