User:Tancre/2/hackpact/Git Stalker: Difference between revisions
< User:Tancre | 2 | hackpact
(16 intermediate revisions by the same user not shown) | |||
Line 4: | Line 4: | ||
I imagine a sort of 'git stalker' (it could be an online service). | I imagine a sort of 'git stalker' (it could be an online service). | ||
* Crawler > ask the link of the git repository and start the session through | * Crawler > ask the link of the git repository and start the session through the Github's API (+ further data on the connection, maybe). | ||
* Overview (Map) > ''tree -hJ >> overview.json'' print the data structure in a file. D3.js use the json to produce a visualization of the structure of the directory. Kinda like the map of the links in 'web stalker': central main folder and then the other folders/files distributed around the main folder and so on recursively. (It is relevant the concept of [https://thedigitalprojectmanager.com/mind-mapping-software/ | * Overview (Map) > ''tree -hJ >> overview.json'' print the data structure in a file. D3.js use the json to produce a visualization of the structure of the directory. Kinda like the map of the links in 'web stalker': central main folder and then the other folders/files distributed around the main folder and so on recursively. (It is relevant the concept of [https://thedigitalprojectmanager.com/mind-mapping-software/ Mind Map] and [https://en.wikipedia.org/wiki/Rhizome_(philosophy) Rhizome]) | ||
== Github's API == | |||
* https://developer.github.com/v3/ | |||
== Crawler == | |||
=== Access repository === | |||
* API >> [http://145.137.124.160:8000/hackpact_git_stalker/API/ get repos] | |||
<source lang="html5"> | |||
<body> | |||
<h1>Git Stalker _ API</h1> | |||
<button id="btnRepos">Repos</button> | |||
<div id="divResult"></div> | |||
<script type="text/javascript"> | |||
const btnRepos = document.getElementById('btnRepos') | |||
btnRepos.addEventListener("click", getRepos) | |||
async function getRepos(){ | |||
const url = "https://api.github.com/repos/smore-inc/clippy.js/contents/" | |||
const response = await fetch(url) | |||
const result = await response.json() | |||
console.log(result) | |||
} | |||
</script> | |||
</body> | |||
</source> | |||
* Git clone (request link) | |||
<source lang="bash"> | |||
#!/bin/bash | |||
git clone 'link' | |||
tree -hJ >> overview.json | |||
</source> | |||
<br> | |||
<br> | |||
'''Some note''' | |||
It is interesting to find the web stalker on [https://anthology.rhizome.org/the-web-stalker Rhizome] and think about this concept at the same time. | |||
Evolution of the data viz: linear > tree > rhizome <br> | |||
D&G - 1. Introduction: Rhizome (from A Thousand Plateaux)<br> | |||
Pasquinelli - The arborescent mind |
Latest revision as of 19:37, 3 December 2019
Git Stalker
From web stalker
I imagine a sort of 'git stalker' (it could be an online service).
- Crawler > ask the link of the git repository and start the session through the Github's API (+ further data on the connection, maybe).
- Overview (Map) > tree -hJ >> overview.json print the data structure in a file. D3.js use the json to produce a visualization of the structure of the directory. Kinda like the map of the links in 'web stalker': central main folder and then the other folders/files distributed around the main folder and so on recursively. (It is relevant the concept of Mind Map and Rhizome)
Github's API
Crawler
Access repository
- API >> get repos
<body>
<h1>Git Stalker _ API</h1>
<button id="btnRepos">Repos</button>
<div id="divResult"></div>
<script type="text/javascript">
const btnRepos = document.getElementById('btnRepos')
btnRepos.addEventListener("click", getRepos)
async function getRepos(){
const url = "https://api.github.com/repos/smore-inc/clippy.js/contents/"
const response = await fetch(url)
const result = await response.json()
console.log(result)
}
</script>
</body>
- Git clone (request link)
#!/bin/bash
git clone 'link'
tree -hJ >> overview.json
Some note
It is interesting to find the web stalker on Rhizome and think about this concept at the same time.
Evolution of the data viz: linear > tree > rhizome
D&G - 1. Introduction: Rhizome (from A Thousand Plateaux)
Pasquinelli - The arborescent mind