git提交频率的punchcard生成器

git-punchcard的Python项目详细描述


简单的git punchcard实用程序,灵感来自git-punchcard-plot,但已重写 对于带有matplotlib的python3。

Screenshot

安装

PyPI安装或升级,如下所示:

pip install --user --upgrade git-punchcard

另外,确保$HOME/.local/bin位于$PATH中。

为了避免与其他软件包冲突,我建议安装到 隔离环境,例如使用pipx

pipx install git-punchcard

用法

基本用法:

git punchcard

其他参数可以指定如下:

git punchcard [<input path>...][<options>][--][<log options>][<revision range>][-- <path>...]

有关可用选项的更多帮助,请键入:

git punchcard -h            # [options]
git help log                # [log options]
git help gitrevisions       # [revision]

选项

最常见的内置选项是:

# use a fixed timezone for all commits:
git punchcard --timezone CET
git punchcard --timezone Europe/Berlin
git punchcard --timezone UTC+02:30

# show punchcard with specified y/x axes:
git punchcard -p year/month
git punchcard -p wday/month

# histogram with specified x axis:
git punchcard -p /wday

# set the directory of the git repository (multiple allowed):
git punchcard /path/to/repo

# analyze all repositories in ~/dev:
git punchcard ~/dev/*/.git

# read commit dates from stdin:
git punchcard -

# show a github-like punchcard plot with grid:
git punchcard --grid

默认情况下,每个提交的本地时区用于绘图。如果设置 固定时区,应根据时区名称指定(例如 CETEurope/Berlin,但也可以通过iso 3166国家代码给出 或国家名称(如果时区不明确,我们将选择第一个条目)。

Git日志选项

此外,您可以将git log理解的任何选项传递给例如。 限制提交的范围并限制由某个 作者:

# include only commits by specific author:
git punchcard --author=myself

# consider only only the 20 commits:
git punchcard master~20..master

# commits within a certain time frame:
git punchcard --since="1 year ago" --until=now

# show at which times a certain file/folder is usually edited:
git punchcard --follow -- README.rst docs

# show at which times, people like to merge:
git punchcard --merges

高级示例

跟踪多年来提交活动的演变:

for year in {2016..2019};do
    git punchcard -o $year.png --title $year\
        --since 1.1.$year --until 31.12.$yeardone

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
如何用java表示这个数学函数的算法   Java/Stream帮助:仅使用streams将嵌套的映射列表转换为映射   使用Selenium连接到数据库时发生java未知主机异常   java如何了解jvm内存使用:“堆内存”和“堆外内存”   java Oracle BI报告导入模板   java如何使用Spring将xml转换为bean?   java线程。join()以保证执行顺序   java从THINGSPEAK到ANDROID应用程序获取JSON数据   使用Java的stanford库中的异常   java正确使用来自其他类文件的方法   如果集合中的元素类型为接口类型,如何填充集合?(爪哇)   记录java。util。记录器创建的文件超过了应有的数量   类Java对象uniq值   尝试调用无法应用于()的方法时出现java错误