Evref-BL / PharoGEXF

Manipulate GEXF file format with Pharo

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PharoGEXF

Moose 10 Coverage Status

Manipulate GEXF file format with Pharo.

Installation

Metacello new
  githubUser: 'badetitou' project: 'PharoGEXF' commitish: 'main' path: 'src';
  baseline: 'GEXF';
  load

Usage

  1. Create a gexf element
    gexf := GEXF new.
  2. Set metadata
    gexf metadata creator: 'Gephi.org'.
    gexf metadata description: 'A Web network'.
  3. Add nodes
    node1 := graph createNodeWithId: '0'.
      node1 label: 'Hello'.
      node2 := graph createNodeWithId: '2'.
      node2 label: 'World'.
  4. Connect nodes
    node1 connectTo: node2.
  5. Export file
    String streamContents: [:stream |
        (GEXFWriter on: stream)
    	    prettyPrinting;
     	    export: gexf ]

About

Manipulate GEXF file format with Pharo

License:MIT License


Languages

Language:Smalltalk 100.0%