From 7438e1a2425cd0ab49777957e5f2dd1882cd8820 Mon Sep 17 00:00:00 2001 From: dperry Date: Thu, 24 Feb 2011 23:15:31 +0000 Subject: [PATCH] Code to support the updating of the website database with dynamically generated documents --- doc/webupdate/convert_and_upload | 9 +++++++++ doc/webupdate/convert_arrows | 6 ++++++ doc/webupdate/convert_attrs | 19 +++++++++++++++++++ doc/webupdate/convert_colors | 9 +++++++++ doc/webupdate/convert_command | 8 ++++++++ doc/webupdate/convert_lang | 10 ++++++++++ doc/webupdate/convert_output | 20 ++++++++++++++++++++ doc/webupdate/convert_shapes | 13 +++++++++++++ doc/webupdate/db_upload | 23 +++++++++++++++++++++++ 9 files changed, 117 insertions(+) create mode 100755 doc/webupdate/convert_and_upload create mode 100755 doc/webupdate/convert_arrows create mode 100755 doc/webupdate/convert_attrs create mode 100755 doc/webupdate/convert_colors create mode 100755 doc/webupdate/convert_command create mode 100755 doc/webupdate/convert_lang create mode 100755 doc/webupdate/convert_output create mode 100755 doc/webupdate/convert_shapes create mode 100755 doc/webupdate/db_upload diff --git a/doc/webupdate/convert_and_upload b/doc/webupdate/convert_and_upload new file mode 100755 index 000000000..bdcf86845 --- /dev/null +++ b/doc/webupdate/convert_and_upload @@ -0,0 +1,9 @@ +#! /bin/bash + +for doc in arrows attrs colors command lang output shapes +do + ./convert_${doc}; ./db_upload ${doc}_db | mysql -u root -pgraphviz2011 -D graphviz; + rm ${doc}_db +done + + diff --git a/doc/webupdate/convert_arrows b/doc/webupdate/convert_arrows new file mode 100755 index 000000000..7211b43dd --- /dev/null +++ b/doc/webupdate/convert_arrows @@ -0,0 +1,6 @@ +#! /bin/bash + +dir="/home/dperry/graphviz2/doc/info" +cat ${dir}/arrows.html | sed -e /"DOCTYPE HTML"/,/"BODY BGCOLOR"/d -e /"Arrow Shapes<\/H1>"/d -e /"<\/BODY>"/d -e /"<\/HTML>"/d | \ +sed -e s/'SRC=\"'/'SRC=\"\/doc\/info\/'/g > arrows_db + diff --git a/doc/webupdate/convert_attrs b/doc/webupdate/convert_attrs new file mode 100755 index 000000000..804765563 --- /dev/null +++ b/doc/webupdate/convert_attrs @@ -0,0 +1,19 @@ +#! /bin/bash + +dir="/home/dperry/graphviz2/doc/info" +cat ${dir}/attrs.html | sed -e /"DOCTYPE HTML"/,/"BODY BGCOLOR"/d -e /"Node, Edge and Graph Attributes<\/H1>"/d \ +-e /"<\/BODY>"/d -e /"<\/HTML>"/d | \ +sed -e s/"d:"/"d"/g -e s/"k:"/"k"/g -e s/"a:"/"a"/g \ +| sed -e s/'http:\/\/www.graphviz.org\/doc\/info\/lang.html'/'dot-language'/g \ +-e s/'http:\/\/www.graphviz.org\/Documentation\/html\/layers\/'/'graphviz-layered-drawing'/g \ +-e s/'http:\/\/www.graphviz.org\/Documentation\/html\/shapehowto.html'/'\/Documentation\/html\/shapehowto.html'/g \ +-e s/'http:\/\/www.graphviz.org\/doc\/info\/output.html'/'output-formats'/g \ +-e s/'http:\/\/www.graphviz.org\/Documentation'/'\/Documentation'/g \ +-e s/"output.html"/"output-formats"/g -e s/"attrs.html"/"attrs"/g -e s/'SRC=\"'/'SRC=\"\/doc\/info\/'/g \ +| sed -e s/"colors.html"/"color-names"/g -e s/"shapes.html"/"node-shapes"/g \ +-e s/"command.html"/"command-line-invocation"/g \ +-e s/"en.wikipedia.org\/wiki\/Point_(typography)"/"en.wikipedia.org\/wiki\/Point_(typography) target="_blank""/g \ +-e s/"cab38\/ColorBrewer\/ColorBrewer_intro.html"/"cab38\/ColorBrewer\/ColorBrewer_intro.html target="_blank""/g \ +> attrs_db + + diff --git a/doc/webupdate/convert_colors b/doc/webupdate/convert_colors new file mode 100755 index 000000000..ac05ac10d --- /dev/null +++ b/doc/webupdate/convert_colors @@ -0,0 +1,9 @@ +#! /bin/bash + +dir="/home/dperry/graphviz2/doc/info" +cat ${dir}/colors.html | sed -e /"DOCTYPE HTML"/,/"BODY BGCOLOR"/d -e /"Color Names<\/H1>"/d \ +-e /"<\/BODY>"/d -e /"<\/HTML>"/d | \ +sed -e s/"d:"/"d"/g -e s/"attrs.html"/"attrs"/g \ +> colors_db + + diff --git a/doc/webupdate/convert_command b/doc/webupdate/convert_command new file mode 100755 index 000000000..2f1d0adcd --- /dev/null +++ b/doc/webupdate/convert_command @@ -0,0 +1,8 @@ +#! /bin/bash + +dir="/home/dperry/graphviz2/doc/info" +cat ${dir}/command.html | sed -e /"DOCTYPE HTML"/,/"BODY BGCOLOR"/d -e /"Command-line Invocation"/d -e /"<\/BODY>"/d -e /"<\/HTML>"/d | \ +sed -e s/"d:"/"d"/g -e s/'http:\/\/www.graphviz.org\/doc\/info\/output.html'/output-formats/g \ +-e s/"output.html"/output-formats/g -e s/"attrs.html"/attrs/g \ +> command_db + diff --git a/doc/webupdate/convert_lang b/doc/webupdate/convert_lang new file mode 100755 index 000000000..7c655cc4c --- /dev/null +++ b/doc/webupdate/convert_lang @@ -0,0 +1,10 @@ +#! /bin/bash + +dir="/home/dperry/graphviz2/doc/info" +cat ${dir}/lang.html | sed -e /"DOCTYPE HTML"/,/"BODY BGCOLOR"/d -e /"The DOT Language<\/H1>"/d \ +-e /"<\/BODY>"/d -e /"<\/HTML>"/d | \ +sed -e s/"attrs.html"/"attrs"/g -e s/"a:"/"a"/g \ +-e s/"http:\/\/www.graphviz.org\/doc\/char.html\">"/"\/doc\/char.html\" target=\"_blank\">"/g \ +> lang_db + + diff --git a/doc/webupdate/convert_output b/doc/webupdate/convert_output new file mode 100755 index 000000000..f6f53c879 --- /dev/null +++ b/doc/webupdate/convert_output @@ -0,0 +1,20 @@ +#! /bin/bash + +dir="/home/dperry/graphviz2/doc/info" +cat ${dir}/output.html | sed -e /"DOCTYPE HTML"/,/"BODY BGCOLOR"/d -e /"Output Formats<\/H1><\/H1>"/d \ +-e /"<\/BODY>"/d -e /"<\/HTML>"/d | \ +sed -e s/"d:"/"d"/g -e s/"a:"/"a"/g -e s/"k:"/"k"/g \ +| sed -e s/'http:\/\/www.gtk.org\/\">'/'http:\/\/www.gtk.org\/\" target=\"_blank\">'/g \ +-e s/'icon_image_file_format)\">'/'icon_image_file_format)\" target=\"_blank\">'/g \ +-e s/'devnet\/pdf\/\">'/'devnet\/pdf\/\" target=\"_blank\">'/g \ +-e s/'www.adobe.com\/svg\/\">'/'www.adobe.com\/svg\/\" target=\"_blank\">'/g \ +-e s/'www.libtiff.org\/\">'/'www.libtiff.org\/\" target=\"_blank\">'/g \ +-e s/"TR\/NOTE-VML\">"/"TR\/NOTE-VML\" target=\"blank\">"/g \ +-e s/"www.vrml.org\/\">"/"www.vrml.org\/\" target=\"blank\">"/g \ +-e s/"wiki\/Xlib\">"/"wiki\/Xlib\" target=\"blank\">"/g \ +-e s/"wiki\/Bitmap\">"/"wiki\/Bitmap\" target=\"blank\">"/g \ +-e s/"lang.html"/"dot-language"/g \ +-e s/"attrs.html"/"attrs"/g \ +> output_db + + diff --git a/doc/webupdate/convert_shapes b/doc/webupdate/convert_shapes new file mode 100755 index 000000000..ed51c8c84 --- /dev/null +++ b/doc/webupdate/convert_shapes @@ -0,0 +1,13 @@ +#! /bin/bash + +dir="/home/dperry/graphviz2/doc/info" +cat ${dir}/shapes.html | sed -e /"DOCTYPE HTML"/,/"BODY BGCOLOR"/d -e /"Node Shapes<\/H1>"/d \ +-e /"<\/BODY>"/d -e /"<\/HTML>"/d | \ +sed -e s/"attrs.html"/"attrs"/g -e s/"a:"/"a"/g -e s/"d:"/"d"/g -e s/"k:"/"k"/g \ +-e s/"http:\/\/www.graphviz.org\/doc\/char.html\">"/"\/doc\/char.html\" target=\"_blank\">"/g \ +-e s/"A HREF=html"/"A HREF=\/doc\/info\/html"/g \ +-e s/"