Permalink
Browse files

import from google code

  • Loading branch information...
0 parents commit 11070cdd81e6f8be2ecefb1d7c99898f899d73a5 Ryan Koopmans committed Mar 29, 2011
Showing 337 changed files with 41,824 additions and 0 deletions.
@@ -0,0 +1,40 @@
+Apache-Style Software License for ColorBrewer software and ColorBrewer Color
+Schemes
+
+Copyright (c) 2002 Cynthia Brewer, Mark Harrower, and The Pennsylvania State
+University.
+
+Licensed under the Apache License, Version 2.0 (the "License"); you may not use
+this file except in compliance with the License.
+
+You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software distributed
+under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+CONDITIONS OF ANY KIND, either express or implied. See the License for the
+specific language governing permissions and limitations under the License.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions as source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+2. The end-user documentation included with the redistribution, if any, must
+include the following acknowledgment:
+
+"This product includes color specifications and designs developed by Cynthia
+Brewer (http://colorbrewer.org/)."
+
+Alternately, this acknowledgment may appear in the software itself, if and
+wherever such third-party acknowledgments normally appear.
+
+4. The name "ColorBrewer" must not be used to endorse or promote products
+derived from this software without prior written permission. For written
+permission, please contact Cynthia Brewer at cbrewer@psu.edu.
+
+5. Products derived from this software may not be called "ColorBrewer", nor may
+"ColorBrewer" appear in their name, without prior written permission of Cynthia
+Brewer.
@@ -0,0 +1,21 @@
+MIT-style software license for Canviz library
+
+Copyright (c) 2006-2009 Ryan Schmidt
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
@@ -0,0 +1,92 @@
+#
+# This file is part of Canviz. See http://www.canviz.org/
+# $Id: Makefile 259 2009-01-20 22:52:24Z ryandesign.com $
+#
+
+AWK=awk
+FIND=find
+SED=sed
+SORT=sort
+TAIL=tail
+XARGS=xargs
+DOT=$(shell which dot)
+GRAPHVIZ_PREFIX=$(shell dirname $(shell dirname $(DOT)))
+GRAPHVIZ_SRC:=$(shell $(FIND) . -type d -name 'graphviz-*' | $(TAIL) -n 1 | $(SED) s%^\./%%)
+GRAPHVIZ_LAYOUTS=circo dot fdp neato twopi
+GRAPHVIZ_FIRST_LAYOUT=$(firstword $(GRAPHVIZ_LAYOUTS))
+EXAMPLES_DIR=examples
+EXAMPLE_GRAPHS_SRC_DIR:=$(GRAPHVIZ_PREFIX)/share/graphviz/graphs
+#EXAMPLE_GRAPHS_SRC_DIR:=$(GRAPHVIZ_SRC)/rtest/graphs
+EXAMPLE_GRAPHS_SRC:=$(shell $(FIND) $(EXAMPLE_GRAPHS_SRC_DIR) -type f -name '*.dot' -or -name '*.gv')
+EXAMPLE_GRAPHS_DIR=./graphs
+EXAMPLE_GRAPH_IMAGES_DIR=$(EXAMPLE_GRAPHS_DIR)/images
+EXAMPLE_GRAPHS=$(patsubst $(EXAMPLE_GRAPHS_SRC_DIR)/%,$(EXAMPLE_GRAPHS_DIR)/$(GRAPHVIZ_FIRST_LAYOUT)/%.txt,$(EXAMPLE_GRAPHS_SRC))
+
+.PHONY: all examples hello-world-example examples-images colorschemes clean
+
+all: examples
+
+colorschemes: x11colors.js brewercolors.js
+
+examples: hello-world-example $(EXAMPLE_GRAPHS_DIR)/graphlist.js $(EXAMPLE_GRAPHS_DIR)/layoutlist.js $(EXAMPLE_GRAPHS) examples-images
+
+hello-world-example: $(EXAMPLES_DIR)/hello_world/new.html $(EXAMPLES_DIR)/hello_world/old.html
+
+$(EXAMPLES_DIR)/hello_world/new.html: $(EXAMPLES_DIR)/hello_world/new.html.in $(EXAMPLES_DIR)/hello_world/graph.gv $(EXAMPLES_DIR)/hello_world/graph-xdot.gv insert_file.awk
+ $(AWK) -f insert_file.awk -v placeholder=@GRAPH@ $(EXAMPLES_DIR)/hello_world/graph.gv $< > $@
+
+$(EXAMPLES_DIR)/hello_world/old.html: $(EXAMPLES_DIR)/hello_world/old.html.in $(EXAMPLES_DIR)/hello_world/graph.gv $(EXAMPLES_DIR)/hello_world/graph-cmapx.html $(EXAMPLES_DIR)/hello_world/graph.png insert_file.awk
+ $(AWK) -f insert_file.awk -v placeholder=@GRAPH@ $(EXAMPLES_DIR)/hello_world/graph.gv $< > $@.tmp
+ $(AWK) -f insert_file.awk -v placeholder=@CMAPX@ $(EXAMPLES_DIR)/hello_world/graph-cmapx.html $@.tmp > $@
+ rm -f $@.tmp
+
+$(EXAMPLES_DIR)/hello_world/graph-xdot.gv: $(EXAMPLES_DIR)/hello_world/graph.gv
+ $(DOT) $< -Txdot -o$@
+
+$(EXAMPLES_DIR)/hello_world/graph-cmapx.html: $(EXAMPLES_DIR)/hello_world/graph.gv
+ $(DOT) $< -Tcmapx -o$@
+
+$(EXAMPLES_DIR)/hello_world/graph.png: $(EXAMPLES_DIR)/hello_world/graph.gv
+ $(DOT) $< -Tpng -o$@
+
+$(EXAMPLE_GRAPHS_DIR):
+ mkdir $(EXAMPLE_GRAPHS_DIR)
+
+$(EXAMPLE_GRAPH_IMAGES_DIR):
+ mkdir $(EXAMPLE_GRAPH_IMAGES_DIR)
+
+$(EXAMPLE_GRAPHS_DIR)/graphlist.js: graphlist.awk $(EXAMPLE_GRAPHS_DIR)
+ @echo "Generating $@"
+ @echo $(patsubst $(EXAMPLE_GRAPHS_SRC_DIR)/%,%,$(EXAMPLE_GRAPHS_SRC)) | $(AWK) -f graphlist.awk > $@;
+
+$(EXAMPLE_GRAPHS_DIR)/layoutlist.js: layoutlist.awk $(EXAMPLE_GRAPHS_DIR)
+ @echo "Generating $@"
+ @echo $(GRAPHVIZ_LAYOUTS) | $(AWK) -f layoutlist.awk > $@;
+
+$(EXAMPLE_GRAPHS_DIR)/$(GRAPHVIZ_FIRST_LAYOUT)/%.dot.txt: $(EXAMPLE_GRAPHS_SRC_DIR)/%.dot $(EXAMPLE_GRAPHS_DIR)
+ $(render-example-graph)
+
+$(EXAMPLE_GRAPHS_DIR)/$(GRAPHVIZ_FIRST_LAYOUT)/%.gv.txt: $(EXAMPLE_GRAPHS_SRC_DIR)/%.gv $(EXAMPLE_GRAPHS_DIR)
+ $(render-example-graph)
+
+define render-example-graph
+@echo "Rendering $(subst /$(GRAPHVIZ_FIRST_LAYOUT)/,/*/,$@)"
+@./render_example_graph.sh $(EXAMPLE_GRAPHS_SRC_DIR) $(patsubst $(EXAMPLE_GRAPHS_SRC_DIR)/%,%,$<) $(EXAMPLE_GRAPHS_DIR) $(GRAPHVIZ_PREFIX) $(GRAPHVIZ_LAYOUTS)
+endef
+
+examples-images: $(EXAMPLE_GRAPH_IMAGES_DIR)
+ $(FIND) $(EXAMPLE_GRAPHS_SRC_DIR) -type f -name '*.gif' -or -name '*.jpg' -or -name '*.png' -print0 | $(XARGS) -0 -t -n 1 -I % cp % $(EXAMPLE_GRAPH_IMAGES_DIR)
+
+
+x11colors.js: gvcolors.awk $(GRAPHVIZ_SRC)/lib/common/color_names
+ $(AWK) -f gvcolors.awk < $(GRAPHVIZ_SRC)/lib/common/color_names > $@
+
+brewercolors.js: gvcolors.awk $(GRAPHVIZ_SRC)/lib/common/brewer_lib
+ $(AWK) -f gvcolors.awk < $(GRAPHVIZ_SRC)/lib/common/brewer_lib > $@
+
+/lib/common/color_names /lib/common/brewer_lib:
+ @echo 'Unpack the Graphviz source in this directory first.' 1>&2
+ @exit 1
+
+clean:
+ -rm -rf $(EXAMPLES_DIR)/hello_world/graph-xdot.gv $(EXAMPLES_DIR)/hello_world/graph-cmapx.html $(EXAMPLES_DIR)/hello_world/graph.png $(EXAMPLES_DIR)/hello_world/new.html $(EXAMPLES_DIR)/hello_world/old.html $(EXAMPLES_DIR)/hello_world/old.html.tmp $(EXAMPLE_GRAPHS_DIR)
@@ -0,0 +1,26 @@
+CANVIZ
+======
+
+
+Introduction
+------------
+
+Canviz is a library for drawing Graphviz graphs to a web browser canvas. It is
+designed to be used by web applications that need to display or edit graphs, as
+a replacement for sending graphs as bitmapped images and image maps.
+
+For more information, please visit the Canviz web site at http://canviz.org/ .
+
+
+License
+-------
+
+Canviz is provided under the terms of the MIT license. See the file LICENSE.txt.
+
+This product includes color specifications and designs developed by Cynthia
+Brewer (http://colorbrewer.org/). Use of the ColorBrewer color schemes is
+subject to a separate license. See the file LICENSE-ColorBrewer.txt.
+
+Canviz requires the use of some other software, including the Path, Prototype
+and Excanvas libraries, and the Graphviz software, which have licenses of their
+own.
Oops, something went wrong.

0 comments on commit 11070cd

Please sign in to comment.