Skip to content
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 33 lines (30 sloc) 1.23 KB
#!/usr/local/bin/cl -s yed-lisp -E main -X --
; -*- mode:common-lisp -*-
(in-package #:cl-user)
(defun main (argv)
((read-and-report (graph-namestring)
(multiple-value-bind (nodes edges)
(yed-lisp:load-graph graph-namestring))
(flet ((node-name (node) (second (assoc node nodes))))
for (nil from to) in edges
do (format t "~&~A -> ~A"
(node-name from) (node-name to))))))
(get-graph-namestring ()
(optima:match argv
((or (list "-h")
(list "--help"))
(format t "Usage: <prog> <graphML file>")
((list (optima:guard graph-namestring (stringp graph-namestring)))
(unless (probe-file graph-namestring)
(uiop:die -1 "File not found: ~A" graph-namestring))
(uiop:die -1 "~&ERROR: malform args, try --help")))))
(read-and-report (get-graph-namestring)))
(error (e)
(uiop:die -1 "~&ERROR: ~A" e))))
You can’t perform that action at this time.