diff options
author | Arun Isaac | 2021-10-31 21:52:43 +0530 |
---|---|---|
committer | Arun Isaac | 2021-11-02 01:31:37 +0530 |
commit | de4f458df3e58408e1af2375d0f3b3f86b350a73 (patch) | |
tree | 8e63d162a10e16cfafc17f7eae1dc3942c1d5942 /ccwl | |
parent | 43db9a23ee3b0294180eb50eb78d38cd387eb72c (diff) | |
download | ccwl-de4f458df3e58408e1af2375d0f3b3f86b350a73.tar.gz ccwl-de4f458df3e58408e1af2375d0f3b3f86b350a73.tar.lz ccwl-de4f458df3e58408e1af2375d0f3b3f86b350a73.zip |
ccwl: Rename graphviz to dot.
What we call "graphviz syntax" is actually the "graphviz dot
language". Rename accordingly.
* ccwl/graphviz.scm (workflow->graphviz): Rename to
workflow->dot. Call graph->dot instead of graph->graphviz.
(escape-id): Update docstring to mention dot.
(graph->graphviz): Rename to graph->dot. Update docstring to mention
dot.
* scripts/ccwl.in (main): Accept --to=dot instead of
--to=graphviz. Update --help usage information.
* Makefile.am (%.dot): Pass --to=dot instead of --to=graphviz.
Diffstat (limited to 'ccwl')
-rw-r--r-- | ccwl/graphviz.scm | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/ccwl/graphviz.scm b/ccwl/graphviz.scm index 17650cf..7093bdb 100644 --- a/ccwl/graphviz.scm +++ b/ccwl/graphviz.scm @@ -19,7 +19,7 @@ ;;; Commentary: ;; This file implements conversion from ccwl objects (<workflow>, -;; <command>, <input>, <output>, <step>) to graphviz. +;; <command>, <input>, <output>, <step>) to the graphviz dot language. ;;; Code: @@ -31,13 +31,13 @@ #:use-module (ice-9 match) #:use-module (ccwl ccwl) #:use-module (ccwl utils) - #:export (workflow->graphviz)) + #:export (workflow->dot)) -(define (workflow->graphviz workflow port) - "Render WORKFLOW, a <workflow> object, to PORT in the graphviz +(define (workflow->dot workflow port) + "Render WORKFLOW, a <workflow> object, to PORT in the graphviz dot language." - (graph->graphviz (workflow->graph workflow) - port)) + (graph->dot (workflow->graph workflow) + port)) (define-immutable-record-type <graph> (make-graph name properties nodes edges subgraphs) @@ -113,7 +113,7 @@ language." (workflow-outputs workflow)))))) (define (escape-id id) - "Escape string ID if necessary according to graphviz syntax." + "Escape string ID if necessary according to graphviz dot syntax." (let ((id (if (symbol? id) (symbol->string id) id))) @@ -125,8 +125,9 @@ language." (call-with-output-string (cut write id <>))))) -(define* (graph->graphviz graph #:optional (port (current-output-port)) (level 0)) - "Render GRAPH, a <graph> object, in graphviz syntax to PORT." +(define* (graph->dot graph #:optional (port (current-output-port)) (level 0)) + "Render GRAPH, a <graph> object, in the graphviz dot syntax to +PORT." (indent-level port level) (display (format "~a ~a {~%" (if (zero? level) "digraph" "subgraph") @@ -159,7 +160,7 @@ language." port))) (graph-edges graph)) (for-each (lambda (subgraph) - (graph->graphviz subgraph port (1+ level))) + (graph->dot subgraph port (1+ level))) (graph-subgraphs graph)) (indent-level port level) (display (format "}~%") port)) |