Skip to content

Commit

Permalink
#1
Browse files Browse the repository at this point in the history
  • Loading branch information
Scobiform committed Apr 17, 2024
1 parent ff154f9 commit bdb4ba6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions start.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ async def home():
access_token=session['access_token'],
api_base_url=config['instance_url']
)

# Fetch the authenticated user
user = mastodon.account_verify_credentials()

# Fetch followers and followings
Expand Down
7 changes: 7 additions & 0 deletions templates/graph.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

<p>Nodes: <span id="nodeCount"></span></p>
<p>Links: <span id="linkCount"></span></p>
<div id="graph"></div>
<script>

Expand All @@ -12,4 +15,8 @@
Graph.d3Force('charge', d3.forceManyBody().strength(-120));
Graph.d3Force('link', d3.forceLink().distance(50));

// Display the counts
document.getElementById('nodeCount').textContent = graphData.nodes.length;
document.getElementById('linkCount').textContent = graphData.links.length;

</script>

0 comments on commit bdb4ba6

Please sign in to comment.