From 356064f40dacbe57c9c662ae75ed7ec065bca7c4 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Fri, 29 Apr 2016 14:13:12 +0200 Subject: [PATCH] add api-viewer to index.adoc --- Makefile | 22 ++++++++++++---------- PVEAPI.js => api-viewer/PVEAPI.js | 0 apidoc.htm => api-viewer/index.html | 0 doc-debian/pve-docs.conf | 3 --- index.adoc | 5 +++++ 5 files changed, 17 insertions(+), 13 deletions(-) rename PVEAPI.js => api-viewer/PVEAPI.js (100%) rename apidoc.htm => api-viewer/index.html (100%) diff --git a/Makefile b/Makefile index d7e3f3a..2a1ffdd 100644 --- a/Makefile +++ b/Makefile @@ -74,6 +74,10 @@ SYSADMIN_SOURCES= \ system-software-updates.adoc \ sysadmin.adoc +API_VIEWER_SOURCES= \ + api-viewer/index.html \ + api-viewer/apidoc.js + PVE_ADMIN_GUIDE_SOURCES= \ ${DATACENTER_CONF_MAN5_SOURCES} \ ${QM_CONF_MAN5_SOURCES} \ @@ -140,7 +144,7 @@ pmxcfs.8.html: pmxcfs.adoc pmxcfs.8-cli.adoc ${PVE_COMMON_DOC_SOURCES} asciidoc ${ADOC_MAN5_HTML_ARGS} -o $@ $*.adoc test -n "$${NOVIEW}" || $(BROWSER) $@ & -index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES} +index.html: index.adoc ${PVE_ADMIN_GUIDE_SOURCES} ${API_VIEWER_SOURCES} $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub $(MAKE) NOVIEW=1 $(addsuffix .1.html, ${COMMAND_LIST}) $(addsuffix .8.html, ${SERVICE_LIST}) $(addsuffix .5.html, ${CONFIG_LIST}) asciidoc -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}" index.adoc @@ -159,11 +163,11 @@ pve-admin-guide.epub: ${PVE_ADMIN_GUIDE_SOURCES} a2x -f epub pve-admin-guide.adoc test -n "$${NOVIEW}" || $(BROWSER) $@ & -apidata.js: extractapi.pl +api-viewer/apidata.js: extractapi.pl ./extractapi.pl >$@ -apidoc.js: apidata.js PVEAPI.js - cat apidata.js PVEAPI.js >$@ +api-viewer/apidoc.js: api-viewer/apidata.js api-viewer/PVEAPI.js + cat api-viewer/apidata.js api-viewer/PVEAPI.js >$@ .PHONY: dinstall dinstall: ${GEN_DEB} @@ -185,7 +189,7 @@ DOC_DEB_FILES= \ pve-admin-guide.epub \ index.html -${DOC_DEB}: index.adoc ${PVE_ADMIN_GUIDE_SOURCES} apidoc.js apidoc.htm +${DOC_DEB}: index.adoc ${PVE_ADMIN_GUIDE_SOURCES} ${API_VIEWER_SOURCES} $(MAKE) NOVIEW=1 pve-admin-guide.pdf pve-admin-guide.html pve-admin-guide.epub $(MAKE) NOVIEW=1 $(addsuffix .1.html, ${COMMAND_LIST}) $(addsuffix .8.html, ${SERVICE_LIST}) $(addsuffix .5.html, ${CONFIG_LIST}) asciidoc -a "date=$(shell date)" -a "revnumber=${DOCRELEASE}" index.adoc @@ -197,11 +201,9 @@ ${DOC_DEB}: index.adoc ${PVE_ADMIN_GUIDE_SOURCES} apidoc.js apidoc.htm echo "git clone git://git.proxmox.com/git/pve-docs.git\\ngit checkout ${GITVERSION}" > build/usr/share/doc/${DOC_PACKAGE}/SOURCE # install doc files install -m 0644 ${DOC_DEB_FILES} build/usr/share/${DOC_PACKAGE} - install -m 0644 index.html build/usr/share/${DOC_PACKAGE} # install api doc viewer - mkdir build/usr/share/${DOC_PACKAGE}/pve2-api-doc - install -m 0644 apidoc.htm build/usr/share/${DOC_PACKAGE}/pve2-api-doc/index.html - install -m 0644 apidoc.js build/usr/share/${DOC_PACKAGE}/pve2-api-doc/ + mkdir build/usr/share/${DOC_PACKAGE}/api-viewer + install -m 0644 ${API_VIEWER_SOURCES} build/usr/share/${DOC_PACKAGE}/api-viewer cd build; dpkg-buildpackage -rfakeroot -b -us -uc lintian ${DOC_DEB} @@ -233,5 +235,5 @@ update: clean make all clean: - rm -rf *~ *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build apidata.js apidoc.js + rm -rf *~ *.html *.pdf *.epub *.tmp *.1 *.5 *.8 *.deb *.changes build api-viewer/apidata.js api-viewer/apidoc.js diff --git a/PVEAPI.js b/api-viewer/PVEAPI.js similarity index 100% rename from PVEAPI.js rename to api-viewer/PVEAPI.js diff --git a/apidoc.htm b/api-viewer/index.html similarity index 100% rename from apidoc.htm rename to api-viewer/index.html diff --git a/doc-debian/pve-docs.conf b/doc-debian/pve-docs.conf index c092b9d..2b9b8e1 100644 --- a/doc-debian/pve-docs.conf +++ b/doc-debian/pve-docs.conf @@ -5,6 +5,3 @@ Alias /pve-docs /usr/share/pve-docs/ - -Alias /pve2-api-doc /usr/share/pve-docs/pve2-api-doc/ - diff --git a/index.adoc b/index.adoc index d220ca0..c0ab53c 100644 --- a/index.adoc +++ b/index.adoc @@ -67,3 +67,8 @@ Configuration Options |=========================================================== +API Viewer +~~~~~~~~~~ + +The link:api-viewer/index.html[API viewer] is a tiny web application +which allows you to inspect all available API calls. -- 2.39.2