Skip to content

Commit

Permalink
Improve docs workflow & point to README (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
zaporter-work authored May 11, 2023
1 parent 259fdda commit 5212353
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
4 changes: 2 additions & 2 deletions Doxyfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions bin/build-docs.sh
Original file line number Diff line number Diff line change
@@ -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"

11 changes: 0 additions & 11 deletions etc/apidocmenu.md

This file was deleted.

0 comments on commit 5212353

Please sign in to comment.