Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:7onez Cti expert Render Network Main

From Leeroopedia
Knowledge Sources
Domains OSINT, Visualization
Last Updated 2026-10-28 14:00 GMT

Overview

Concrete tool for rendering a graph_build JSON into a self-contained interactive Cytoscape HTML network diagram, provided by the cti-expert IntelGraph module.

Description

The main function in render_network.py reads a graph_build.py JSON (nodes, edges, communities) and produces a self-contained interactive HTML file with vendored Cytoscape.js inlined. The HTML is fully self-contained — no external CDN dependencies, no network calls — so it can be opened offline or embedded in a report. The template supports title/subtitle, community cycling, and the graph data is embedded as JSON.

Usage

Import this when you need to:

  • Render a KB projection (graph_build JSON) into an interactive network diagram.
  • Produce a self-contained HTML file (no external dependencies) for report embedding.
  • Visualize cluster membership, entity types, and broker centrality interactively.

Code Reference

Source Location

  • Repository: cti-expert
  • File: intel_engine/IntelGraph/scripts/render_network.py
  • Lines: L413-431 (main)

Signature

def main():
    """CLI: render_network.py <graph.json> <out.html> [--title ...] [--subtitle ...]
    Reads graph_build.py JSON, inlines Cytoscape.js, writes self-contained HTML."""

Import

# CLI tool — invoked via subprocess
# python3 render_network.py graph.json out.html --title "..." --subtitle "..."

I/O Contract

Inputs

Name Type Required Description
graph str Yes graph_build.py JSON file path (nodes, edges, communities)
out str Yes Output HTML file path
--title str No /// Diagram title (default: "OSINT link-analysis network")
--subtitle str No /// Diagram subtitle

Outputs

Name Type Description
html file Self-contained interactive Cytoscape HTML (vendored JS inlined)

Usage Examples

Render Network Diagram

python3 intel_engine/IntelGraph/scripts/render_network.py \
    cases/CASE-0001/graph.json \
    cases/CASE-0001/report/network.html \
    --title "CASE-0001 Network" \
    --subtitle "Clustered network. Node size = broker centrality · color = cluster · shape = entity type."

Related Pages

Implements Principle

Requires Environment

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment