编辑:这应该是我母亲的礼物,如果我必须拖放它并将一堆丝网印在一起......但是资源必须存在于某个地方的网站上。我相信这个网站上至少有人知道如何做到这一点。
编辑:所以我对此进行了挖掘,发现如果你在网络后放置/ meta,你会得到一个JSON。此外/ chunk在页面源中,但在加载/块后,/ chunk或/ meta都不再为我加载。我只想在一张图片中看到整个图表,是不是要问太多了?
在github中添加/ network到repo URL的末尾会得到一个像这样的图像
你可以点击并左右拖动,但对于我的生活,我一次无法获得超过一小部分。
是否可以在一个图像文件中生成整个网络图?
我不想要图表的一大块,我想查看整个图表。 我在另一个问题中看到了http://gitup.co/,但它似乎只是OS X. Linux或Microsoft软件解决方案对我有用。
由于
答案 0 :(得分:4)
有了同样的愿望,为gitgraphjs做了一个小小的在线脚本......
答案 1 :(得分:2)
https://github.com/esc/git-big-picture似乎做得很好。
您需要下载GraphViz并将其放入path
。您还需要在path
中使用python。
$ set PATH=%PATH%;C:\GraphViz\release\bin
$ git clone git@github.com:esc/git-big-picture.git
$ cd git-big-picture
$ python git-big-picture -h
$ python git-big-picture -f png -o out.png -b # branches - look
答案 2 :(得分:2)
我再次遇到这个问题,终于找到了一个不错的解决方案
以下是要点,其代码如下:https://gist.github.com/DinisCruz/6866dede5cdff60d97790a14490f7844
function hide(selector) { $(selector).setAttribute('style','display:none')}
function remove(selector) { $(selector).remove()}
function remove_class(selector) { $(selector).setAttribute('class','')}
function move_left(count)
{
var eventObj = document.createEvent("Events");
eventObj.initEvent("keydown", true, true);
eventObj.which = 37; // left key
for (i=0; i < count ; i++) {
document.dispatchEvent(eventObj);
}
}
function resize_canvas(width)
{
document.getElementById("network").style="width:" + width; window.dispatchEvent(new Event("resize"))
}
remove('.pagehead')
remove('.js-header-wrapper')
remove('.menu')
remove('.Subhead')
remove('.info')
remove('.btn-link')
remove('.footer')
remove_class('.container-lg')
remove_class('.pr-4')
resize_canvas('2150px')
move_left(14)
相关的Twitter线程(显示一些示例):https://twitter.com/DinisCruz/status/1171411025570275329
答案 3 :(得分:2)
我的答案不是关于创建图像作为输出;但是对于那些想要有用的网络图的人可能会有帮助。
我已经为GitHub网络页面编写了一个用户脚本:https://github.com/maliayas/github-network-ninja
基本上它提供:
答案 4 :(得分:1)
这也困扰着我。我想在GitHub上看到它,而不导出任何JSON。例如,在Firefox或Chrome的JS控制台中的任何GitHub“网络”页面上:
document.getElementById("network").style="width:10000px"
注释: