Thanks to visit codestin.com
Credit goes to github.com

Skip to content

zosmac/graphviz_swift

Repository files navigation

Welcome to GraphvizSwift, the Swift language based macOS Graphviz Application.

Overview

GraphvizSwift is a macOS application that reads Graphviz DOT Language files for display. DOT defines the nodes and edges of a network graph, which Graphviz interprets to draw a network graph diagram. On macOS, Graphviz can use Quartz to render the diagrams into the following image formats: BMP, GIF, JPEG, PDF, PNG, SVG, and TIFF.

Note that DOT language files by convention have the .gv extension. The .dot extension

First Steps

macOS Apps are built with Xcode, and you may download it from there, from the Mac App Store, or from Apple Developer Applications. Xcode also installs the Command Line Tools (e.g. git, make, xcodebuild) for building Graphviz and the GraphvizSwift app.

Building GraphvizSwift

Clone the GraphvizSwift repo:

git clone [email protected]:zosmac/graphviz_swift.git

Proceed to the repo and make the installer package:

cd graphviz_swift
make pkg

This creates a macOS package installer graphvizswift-arm64.pkg that can install the GraphvizSwift App locally or distributed to install on other macOS hosts.

Installing GraphvizSwift

Open the installer package:

open graphvizswift-arm64.pkg

Enter the password for your macOS system account when prompted, and the app will be installed in /Applications/GraphvizSwift.app.

Running GraphvizSwift

Once installed, you can find GraphvizSwift in the /Applications folder or through the App Launcher. Open the app, which will first present an open document navigator view. Graphviz includes a sample folder which is included in the GraphvizSwift app. In the document navigator, press the key combination cmd‑shift‑G. This opens a sheet to enter a Unix path. The sample folder is /Applications/GraphvizSwift.app/Contents/Frameworks/share/graphviz/graphs/directed

GraphvizSwiftOpen

GraphvizSwiftOpen

Graphviz installs a number of example DOT files (extension is .gv, as .dot was already registered for Microsoft DOcument Template files). Select from this list or navigate to other folders with your .gv files. Upon selection, GraphvizSwift presents a document view of the file:

GraphvizSwiftView

The toolbar has a format selection popup menu that specifies the current image format. The default is PDF, which you can change in Settings:

GraphvizSwiftSettings

With the popup you may select other rendering formats; the adjacent save button saves a file in that format. Next you will see several zoom options to change the size of the image. The message button, if highlighted in red, displays any error messages from rendering the graph:

GraphvizSwiftMessage

The final button displays a sidebar for updating global graph, node, or edge attributes of the graph.

GraphvizSwiftAttrs

From the View menu, you can open Attributes Help for guidance:

GraphvizSwiftAttrsDoc

You may also edit the file directly to update global attributes and to edit attributes for specific nodes, edges, or graph clusters. To enable edit mode, select GV from the format popup:

GraphvizSwiftEdit

About

Graphviz macOS SwiftUI app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published