From 1843b633ce5411ca60b8f0aecfed0185abd400ca Mon Sep 17 00:00:00 2001 From: Petr Pucil Date: Wed, 1 Jul 2020 11:31:10 +0200 Subject: [PATCH 1/4] Add KSY syntax diagram generated by Docson See https://github.com/kaitai-io/kaitai_struct/issues/655 --- .travis.yml | 1 + Makefile | 4 ++++ index.adoc | 1 + ksy_diagram-docinfo-footer.html | 14 ++++++++++++++ ksy_diagram-docinfo.html | 1 + ksy_diagram.adoc | 7 +++++++ 6 files changed, 28 insertions(+) create mode 100644 ksy_diagram-docinfo-footer.html create mode 100644 ksy_diagram-docinfo.html create mode 100644 ksy_diagram.adoc diff --git a/.travis.yml b/.travis.yml index 65cccf0..49235bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,7 @@ cache: before_install: - gem install asciidoctor pygments.rb - git clone -b 2.5.2 https://github.com/pygments/pygments.git + - git clone -b v2.1.0 --depth 1 https://github.com/lbovet/docson.git script: - make diff --git a/Makefile b/Makefile index 89ee67f..89a03e9 100644 --- a/Makefile +++ b/Makefile @@ -8,6 +8,7 @@ TARGETS=\ out/developers_intro.html \ out/faq.html \ out/ksy_reference.html \ + out/ksy_diagram.html \ out/lang_cpp_stl.html \ out/lang_java.html \ out/lang_javascript.html \ @@ -24,6 +25,9 @@ all: $(TARGETS) rm -rf out/img cp -r img styles js out cp raw/pygments-default.css out/styles + cp -r docson/public/docson.js docson/public/lib/ out/js + cp -r docson/public/templates out + cp docson/public/css/docson.css out/styles out/%.html: raw/%.html tmpl/navbar.html postprocess-html ./postprocess-html $< $@ diff --git a/index.adoc b/index.adoc index 7145d40..f1170e0 100644 --- a/index.adoc +++ b/index.adoc @@ -5,6 +5,7 @@ * <> * <> — best practices in creation of robust KSY specs * <> +* <> * <> — frequently asked questions * https://github.com/kaitai-io/awesome-kaitai[awesome-kaitai] — A list of Kaitai Struct tools and resources diff --git a/ksy_diagram-docinfo-footer.html b/ksy_diagram-docinfo-footer.html new file mode 100644 index 0000000..6af53f3 --- /dev/null +++ b/ksy_diagram-docinfo-footer.html @@ -0,0 +1,14 @@ + + + diff --git a/ksy_diagram-docinfo.html b/ksy_diagram-docinfo.html new file mode 100644 index 0000000..63107cf --- /dev/null +++ b/ksy_diagram-docinfo.html @@ -0,0 +1 @@ + diff --git a/ksy_diagram.adoc b/ksy_diagram.adoc new file mode 100644 index 0000000..d1c8c86 --- /dev/null +++ b/ksy_diagram.adoc @@ -0,0 +1,7 @@ += Kaitai Struct: KSY syntax diagram + +Here you can examine the KSY syntax diagram describing all YAML keys that can be used in the Kaitai Struct YAML spec (KSY). + +++++ +
+++++ From 665d6b64a85241d56391b0a0bae7faaedcf98bd2 Mon Sep 17 00:00:00 2001 From: Petr Pucil Date: Wed, 1 Jul 2020 14:19:13 +0200 Subject: [PATCH 2/4] Add docson/ folder to .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d628c74..507bb7c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ out/ raw/ pygments/ +docson/ From 139bf571180b449d760b3d95b47db261d3cc0485 Mon Sep 17 00:00:00 2001 From: Petr Pucil Date: Wed, 1 Jul 2020 14:19:40 +0200 Subject: [PATCH 3/4] Show a loading spinner until the diagram is shown --- img/ajax-loader.gif | Bin 0 -> 1754 bytes ksy_diagram-docinfo-footer.html | 10 ++++++---- ksy_diagram-docinfo.html | 5 +++++ ksy_diagram.adoc | 6 ++++++ 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 img/ajax-loader.gif diff --git a/img/ajax-loader.gif b/img/ajax-loader.gif new file mode 100644 index 0000000000000000000000000000000000000000..b59ce4bb4f10d285d99971dff150bfe6cd98d820 GIT binary patch literal 1754 zcmZXUdsLEV0LDMyLq0y7B3^=014G2?m?zA#HV`jiY6wOq>0;s~L&dbhO9luiXic3u z#dN4;-YRECv$UZrH@a-))|uui6pv-jWkocH-X=XsttmLC(o zSxN<{z%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)I_aAC05`RhTEHFC5HyiVDfDvT`geu;I*>lO>jQyxu5~&4A`@T(XtXwkt4*^}bqTYV3D=H<(PR%6 zu3HWJULOXPZ;p11x}r&i(^@XtNLQq>7O2A9JEzTI~Vq;Jlo7Ms-zWp3g0EATG)h1E|O!wyT6@B0I zXS0zC7^R)5tIM$@)lM2CKBoK2W$t`!ZZ zEdXox$GS-B8F*TVYBCP%c@9{Hph?$U^}3)nRnLS1YRdW60dY)c{^;~eCmjR=8!Ahl pe>jLsivMOSX9rl=OW~rRmrUHTjF@B5-VT)_ea&HY6~P6F_!|eYevSYD literal 0 HcmV?d00001 diff --git a/ksy_diagram-docinfo-footer.html b/ksy_diagram-docinfo-footer.html index 6af53f3..1845142 100644 --- a/ksy_diagram-docinfo-footer.html +++ b/ksy_diagram-docinfo-footer.html @@ -2,12 +2,14 @@