PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Monday, June 27, 2022

[FIXED] How to get the full github.com visualization of the /network of a repo

 June 27, 2022     git, github, graph, visualization     No comments   

Issue

EDIT: This is supposed to be a gift for my mother, If I have to I'll drag and drop it and stitch a bunch of screen-prints together... however the resource has to live on the website somewhere. I do believe that at least someone on this site knows how to do this.

EDIT: So I dug around on this somemore and found that if you put /meta after network you get a JSON. Also /chunk was in the page source, but after loading /chunk neither /chunk or /meta are loading for me anymore. I just want the entire graph in one picture, is that too much to ask?

Adding /network to the end of a repo URL in github gets me an image something like this

enter image description here

You can click and drag it side to side, but for the life of me I have not been able to get more than a small segment to show at one time.

Is the any tool to generate the entire network graph in one image file?

I don't want a chunk of the graph, I want to view the entire graph. I saw http://gitup.co/ mentioned in another question, but it appears to be OS X only. A linux or a microsoft solution would work for me.

Thanks


Solution

I just had this problem (again), and finally was able to find a decent solution.

Here is the gist with the code below: 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')
// Note: they updated this class name from .p4-4 to .pb-4
remove_class('.pb-4')

resize_canvas('2150px')
move_left(14)

Related twitter thread (shows some examples): https://twitter.com/DinisCruz/status/1171411025570275329



Answered By - Dinis Cruz
Answer Checked By - Willingham (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing