Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
oseiskar committed Jan 11, 2024
1 parent a9def3f commit caa007a
Show file tree
Hide file tree
Showing 21 changed files with 2,695 additions and 2,116 deletions.
4 changes: 4 additions & 0 deletions sdk/_static/basic.css
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,10 @@ a.headerlink {
visibility: hidden;
}

a:visited {
color: #551A8B;
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
Expand Down
15 changes: 10 additions & 5 deletions sdk/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ dl.property {
background: none !important;
}

/* Hide certain elements in CSS */
footer, .wy-breadcrumbs-aside {
display: none !important;
}

/* ----------- Uncollapse menu with CSS violence */
.wy-menu-vertical li ul {
display: block !important;
Expand Down Expand Up @@ -72,3 +67,13 @@ button.toctree-expand {
font-weight: bold;
color: white;
}

footer {
margin-top: 1em;
text-align: center;
}

li.version {
font-weight: bold;
color: black;
}
3 changes: 1 addition & 2 deletions sdk/_static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
const DOCUMENTATION_OPTIONS = {
VERSION: '',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
Expand Down
26 changes: 17 additions & 9 deletions sdk/_static/searchtools.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,12 @@ const _removeChildren = (element) => {
const _escapeRegExp = (string) =>
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string

const _displayItem = (item, searchTerms) => {
const _displayItem = (item, searchTerms, highlightTerms) => {
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
const contentRoot = document.documentElement.dataset.content_root;

const [docName, title, anchor, descr, score, _filename] = item;

Expand All @@ -75,20 +75,24 @@ const _displayItem = (item, searchTerms) => {
if (dirname.match(/\/index\/$/))
dirname = dirname.substring(0, dirname.length - 6);
else if (dirname === "index/") dirname = "";
requestUrl = docUrlRoot + dirname;
requestUrl = contentRoot + dirname;
linkUrl = requestUrl;
} else {
// normal html builders
requestUrl = docUrlRoot + docName + docFileSuffix;
requestUrl = contentRoot + docName + docFileSuffix;
linkUrl = docName + docLinkSuffix;
}
let linkEl = listItem.appendChild(document.createElement("a"));
linkEl.href = linkUrl + anchor;
linkEl.dataset.score = score;
linkEl.innerHTML = title;
if (descr)
if (descr) {
listItem.appendChild(document.createElement("span")).innerHTML =
" (" + descr + ")";
// highlight search terms in the description
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
}
else if (showSearchSummary)
fetch(requestUrl)
.then((responseData) => responseData.text())
Expand All @@ -97,6 +101,9 @@ const _displayItem = (item, searchTerms) => {
listItem.appendChild(
Search.makeSearchSummary(data, searchTerms)
);
// highlight search terms in the summary
if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js
highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted"));
});
Search.output.appendChild(listItem);
};
Expand All @@ -115,14 +122,15 @@ const _finishSearch = (resultCount) => {
const _displayNextItem = (
results,
resultCount,
searchTerms
searchTerms,
highlightTerms,
) => {
// results left, load the summary and display it
// this is intended to be dynamic (don't sub resultsCount)
if (results.length) {
_displayItem(results.pop(), searchTerms);
_displayItem(results.pop(), searchTerms, highlightTerms);
setTimeout(
() => _displayNextItem(results, resultCount, searchTerms),
() => _displayNextItem(results, resultCount, searchTerms, highlightTerms),
5
);
}
Expand Down Expand Up @@ -360,7 +368,7 @@ const Search = {
// console.info("search results:", Search.lastresults);

// print the results
_displayNextItem(results, results.length, searchTerms);
_displayNextItem(results, results.length, searchTerms, highlightTerms);
},

/**
Expand Down
16 changes: 13 additions & 3 deletions sdk/_static/sphinx_highlight.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,19 @@ const _highlight = (node, addItems, text, className) => {
}

span.appendChild(document.createTextNode(val.substr(pos, text.length)));
const rest = document.createTextNode(val.substr(pos + text.length));
parent.insertBefore(
span,
parent.insertBefore(
document.createTextNode(val.substr(pos + text.length)),
rest,
node.nextSibling
)
);
node.nodeValue = val.substr(0, pos);
/* There may be more occurrences of search term in this node. So call this
* function recursively on the remaining fragment.
*/
_highlight(rest, addItems, text, className);

if (isInSVG) {
const rect = document.createElementNS(
Expand Down Expand Up @@ -140,5 +145,10 @@ const SphinxHighlight = {
},
};

_ready(SphinxHighlight.highlightSearchWords);
_ready(SphinxHighlight.initEscapeListener);
_ready(() => {
/* Do not call highlightSearchWords() when we are on the search page.
* It will highlight words from the *previous* search query.
*/
if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords();
SphinxHighlight.initEscapeListener();
});
51 changes: 21 additions & 30 deletions sdk/api.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en">
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

Expand All @@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=8e72557d" />
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=3a41478c" />


<link rel="shortcut icon" href="https://www.spectacularai.com/favicon/favicon.ico"/>
Expand All @@ -18,9 +18,9 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=b3ba4146"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -81,23 +81,24 @@
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">API Reference</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/api.md.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<ul class="wy-breadcrumbs">
<li><a href="index.html" aria-label="Home">Spectacular AI SDK documentation</a></li>
<li class="breadcrumb-item active">API Reference</li>
<li class="wy-breadcrumbs-aside version">
v1.26
</li>
</ul>

<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<section id="api-reference">
<h1>API Reference<a class="headerlink" href="#api-reference" title="Permalink to this heading"></a></h1>
<h1>API Reference<a class="headerlink" href="#api-reference" title="Link to this heading"></a></h1>
<p>Full API reference on a single page</p>
<section id="latest-version">
<h2>Latest version<a class="headerlink" href="#latest-version" title="Permalink to this heading"></a></h2>
<h2>Latest version<a class="headerlink" href="#latest-version" title="Link to this heading"></a></h2>
<div class="toctree-wrapper compound">
<ul>
<li class="toctree-l1"><a class="reference internal" href="python/latest/index.html">Python</a></li>
Expand All @@ -110,22 +111,12 @@ <h2>Latest version<a class="headerlink" href="#latest-version" title="Permalink

</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="index.html" class="btn btn-neutral float-left" title="Spectacular AI SDK documentation" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="python/latest/index.html" class="btn btn-neutral float-right" title="Python" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer>
<div role="contentinfo">
<hr/>
<p>The publicly available Spectacular AI SDK versions are free for non-commercial use.</p>
<p>&#169; 2024 Spectacular AI Ltd</p>
</div>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023 Spectacular AI Ltd.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
Expand Down
49 changes: 20 additions & 29 deletions sdk/core.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en">
<html class="writer-html5" lang="en" data-content_root="./">
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.18.1: http://docutils.sourceforge.net/" />

Expand All @@ -8,7 +8,7 @@
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=fa44fd50" />
<link rel="stylesheet" type="text/css" href="_static/css/theme.css?v=19f00094" />
<link rel="stylesheet" type="text/css" href="_static/tabs.css?v=a5c4661c" />
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=8e72557d" />
<link rel="stylesheet" type="text/css" href="_static/custom.css?v=3a41478c" />


<link rel="shortcut icon" href="https://www.spectacularai.com/favicon/favicon.ico"/>
Expand All @@ -18,9 +18,9 @@

<script src="_static/jquery.js?v=5d32c60e"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js?v=2cd50e6c"></script>
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js?v=b3ba4146"></script>
<script src="_static/documentation_options.js?v=5929fcd5"></script>
<script src="_static/doctools.js?v=888ff710"></script>
<script src="_static/sphinx_highlight.js?v=4825356b"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
Expand Down Expand Up @@ -81,20 +81,21 @@
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home" aria-label="Home"></a></li>
<li class="breadcrumb-item active">Core SDK</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/core.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<ul class="wy-breadcrumbs">
<li><a href="index.html" aria-label="Home">Spectacular AI SDK documentation</a></li>
<li class="breadcrumb-item active">Core SDK</li>
<li class="wy-breadcrumbs-aside version">
v1.26
</li>
</ul>

<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">

<section id="core-sdk">
<h1>Core SDK<a class="headerlink" href="#core-sdk" title="Permalink to this heading"></a></h1>
<span id="id1"></span><h1>Core SDK<a class="headerlink" href="#core-sdk" title="Link to this heading"></a></h1>
<p>The Spectacular AI Core SDK is a platform-independent software solution for real-time 3D mapping and
6-DoF pose tracking. The core SDK includes the following public modules, which can be used with any device supported by the SDK.</p>
<div class="toctree-wrapper compound">
Expand All @@ -112,22 +113,12 @@ <h1>Core SDK<a class="headerlink" href="#core-sdk" title="Permalink to this head

</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="cpp/latest/index.html" class="btn btn-neutral float-left" title="C++" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
<a href="tracking.html" class="btn btn-neutral float-right" title="Tracking API" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right" aria-hidden="true"></span></a>
<footer>
<div role="contentinfo">
<hr/>
<p>The publicly available Spectacular AI SDK versions are free for non-commercial use.</p>
<p>&#169; 2024 Spectacular AI Ltd</p>
</div>

<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023 Spectacular AI Ltd.</p>
</div>

Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.


</footer>
</div>
</div>
Expand Down
Loading

0 comments on commit caa007a

Please sign in to comment.