One step closer to migrating this to the other repo as a jekyll file.
Confirmed with diff that the only differences are extra blank lines,
nothing important.
sdlshapes.png : sdlshapes.ps
./ps_to_png.sh sdlshapes.ps sdlshapes.png
-colors.html : colors.1 colors.n ../../lib/common/color_names ../../lib/common/svgcolor_names ../../lib/common/brewer_colors mkcolors.awk brewer.awk svg.awk
+colors.html : ../../lib/common/color_names ../../lib/common/svgcolor_names ../../lib/common/brewer_colors mkcolors.awk brewer.awk svg.awk mkcolors.py
mkdir -p colortmp
awk -f brewer.awk ../../lib/common/brewer_colors
- cat colors.1 > colors.html
- awk -f mkcolors.awk ../../lib/common/color_names >> colors.html
- echo '<H2><A NAME="svg">The SVG color scheme</A></H2>' >> colors.html
+ awk -f mkcolors.awk ../../lib/common/color_names > x11_colors.html
awk -f svg.awk ../../lib/common/svgcolor_names > svg
- awk -f mkcolors.awk svg >> colors.html
- rm -rf svg
- echo '<H2><A NAME="brewer">Brewer color schemes</A></H2>' >> colors.html
- (for f in $$(ls colortmp); do awk -f mkcolors.awk -s colortmp/$$f >> colors.html; done)
- cat colors.n >> colors.html
- rm -rf colortmp
+ awk -f mkcolors.awk svg > svg_colors.html
+ (for f in $$(ls colortmp); do awk -f mkcolors.awk -s colortmp/$$f; done) > brewer_colors.html
+ ./mkcolors.py x11_colors.html svg_colors.html brewer_colors.html > colors.html
+ rm -rf svg colortmp x11_colors.html svg_colors.html brewer_colors.html
schema.html : jconvert.py graphviz_json_schema.json
EXTRA_DIST = $(XGIF) mklang.y mkarrows.sh mkshapes.sh mkstyles.sh mktapers.sh \
mkarrowtbl.sh mkshhtml.py \
ps_to_png.sh arrow_grammar grammar html_grammar \
- shapelist colors.1 colors.n \
+ shapelist \
shapes.1 shapes.2 shapes.3 lang.1 lang.2 arrows.1 arrows.2 \
brewer.awk mkcolors.awk svg.awk sz.awk \
colorlist.dot html1.dot html4.dot round.dot constraint.dot \
+++ /dev/null
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
-<!--
-This is a generated document. Do not edit.
--->
-<HTML VERSION=\"2.0\">
-<HEAD>
-<TITLE>Color Names</TITLE>
-</HEAD>
-<BODY BGCOLOR=#ffffff>
-
-<H1 ALIGN=CENTER>Color Names</H1>
-Color names are resolved in the context of a
-<A HREF="attrs.html#d:colorscheme">color scheme</A>. Graphviz currently
-supports the <A HREF="#x11">X11 scheme</A>,
-the <A HREF="#svg">SVG scheme</A>, and the <A HREF="#brewer">Brewer schemes</A>,
-with X11 being the default.
-<P>
-Color names are case-insensitive.
-<P>
-The Brewer color schemes below are covered by this <A HREF=#brewer_license>license</A>.
-<HR>
-<H2><A NAME="x11">The X11 color scheme</A></H2>
--- /dev/null
+#!/usr/bin/env python3
+# Generates colors.html. Takes color files as args.
+
+import markupsafe
+import sys
+import templates
+
+template = templates.env().get_template('colors.html.j2')
+print(template.render(
+ x11_colors=markupsafe.Markup(open(sys.argv[1]).read()),
+ svg_colors=markupsafe.Markup(open(sys.argv[2]).read()),
+ brewer_colors=markupsafe.Markup(open(sys.argv[3]).read()),
+))
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<!--
+This is a generated document. Do not edit.
+-->
+<HTML VERSION=\"2.0\">
+<HEAD>
+<TITLE>Color Names</TITLE>
+</HEAD>
+<BODY BGCOLOR=#ffffff>
+
+<H1 ALIGN=CENTER>Color Names</H1>
+Color names are resolved in the context of a
+<A HREF="attrs.html#d:colorscheme">color scheme</A>. Graphviz currently
+supports the <A HREF="#x11">X11 scheme</A>,
+the <A HREF="#svg">SVG scheme</A>, and the <A HREF="#brewer">Brewer schemes</A>,
+with X11 being the default.
+<P>
+Color names are case-insensitive.
+<P>
+The Brewer color schemes below are covered by this <A HREF=#brewer_license>license</A>.
+<HR>
+<H2><A NAME="x11">The X11 color scheme</A></H2>
+{{ x11_colors }}
+<H2><A NAME="svg">The SVG color scheme</A></H2>
+{{ svg_colors }}
+<H2><A NAME="brewer">Brewer color schemes</A></H2>
+{{ brewer_colors }}
<BR>
<A NAME=brewer_license>Apache-Style Software License for ColorBrewer software and ColorBrewer
Color Schemes, Version 1.1</A>