From 52123531a1ca9ae628a490faad7bba24762151bc Mon Sep 17 00:00:00 2001 From: Zack Porter <121693134+zaporter-work@users.noreply.github.com> Date: Thu, 11 May 2023 13:36:33 -0400 Subject: [PATCH] Improve docs workflow & point to README (#102) --- Doxyfile | 4 ++-- README.md | 13 ++++--------- bin/build-docs.sh | 20 ++++++++++++++++++++ etc/apidocmenu.md | 11 ----------- 4 files changed, 26 insertions(+), 22 deletions(-) create mode 100755 bin/build-docs.sh delete mode 100644 etc/apidocmenu.md diff --git a/Doxyfile b/Doxyfile index b6fa16d29..507311cfc 100644 --- a/Doxyfile +++ b/Doxyfile @@ -907,7 +907,7 @@ WARN_LOGFILE = # spaces. See also FILE_PATTERNS and EXTENSION_MAPPING # Note: If this tag is empty the current directory is searched. -INPUT = src etc/apidocmenu.md +INPUT = README.md src # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses @@ -1076,7 +1076,7 @@ FILTER_SOURCE_PATTERNS = # (index.html). This can be useful if you have a project on for instance GitHub # and want to reuse the introduction page also for the doxygen output. -USE_MDFILE_AS_MAINPAGE = etc/apidocmenu.md +USE_MDFILE_AS_MAINPAGE = README.md # The Fortran standard specifies that for fixed formatted Fortran code all # characters from position 72 are to be considered as comment. A common diff --git a/README.md b/README.md index 2af0c6efa..ed91b81ef 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ ## Getting Started -NOTE: Please see `BUILDING.md` for instructions on how to use +NOTE: Please see [BUILDING.md](https://github.com/viamrobotics/viam-cpp-sdk/blob/main/BUILDING.md) for instructions on how to use CMake-based build system for this project. ## Using Docker for Development @@ -54,17 +54,12 @@ First, make sure doxygen is installed, e.g., (on linux) apt-get install -y doxygen ``` -Second, make sure the documentation directory exists. From the SDK root, run: +Next, generate the documentation. From the SDK root, run: ``` -mkdir -p etc/docs/api/current +./bin/build-docs.sh ``` -Finally, generate the documentation. From the SDK root, run: -``` -doxygen Doxyfile -``` - -That will generate all documentation in the `etc/docs/api/current` folder. Then +That will run `doxygen Doxyfile` and create the `etc/docs/api/current` folder. Then simply open the `index.html` file in your preferred browser to view the documentation. ## A Note on Connectivity and webRTC Functionality diff --git a/bin/build-docs.sh b/bin/build-docs.sh new file mode 100755 index 000000000..aa4aeba90 --- /dev/null +++ b/bin/build-docs.sh @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +set -eu + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +PROJECT_ROOT="$(dirname "$SCRIPT_DIR")" + +pushd "$PROJECT_ROOT" + +RELATIVE_OUTPUT="etc/docs/api/current" + +mkdir -p "$RELATIVE_OUTPUT" + +doxygen Doxyfile + +popd + +echo +echo "Doxygen output has been saved to $PROJECT_ROOT/$RELATIVE_OUTPUT" + diff --git a/etc/apidocmenu.md b/etc/apidocmenu.md deleted file mode 100644 index 0b1e619fe..000000000 --- a/etc/apidocmenu.md +++ /dev/null @@ -1,11 +0,0 @@ -# Viam C++ SDK - -## SDK Status - -Stability indicates whether the SDK is recommended for production use. This document - -and the SDK in general - is a work in progress. The SDK is in alpha/beta state, -and offers no guarantee on API or ABI stability. - -| Family/version | Stability | Development | Purpose | -| ------------------ | ----------- | ------------------- | ----------------------- | -| (repo main branch) | Unstable | Active development | New feature development |