From 445073d3e46811bef9a22f780d26843df691b28e Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 25 Aug 2023 22:48:04 +0000 Subject: [PATCH] update docs [bot] --- docs/_static/basic.css | 22 ++++++++++++++++++++++ docs/_static/documentation_options.js | 3 +-- docs/_static/searchtools.js | 26 +++++++++++++++++--------- docs/_static/sphinx_highlight.js | 16 +++++++++++++--- docs/about.html | 12 ++++++------ docs/dev_doc.html | 12 ++++++------ docs/genindex.html | 10 +++++----- docs/index.html | 14 +++++++------- docs/inkycal.html | 18 +++++++++--------- docs/quickstart.html | 16 ++++++++-------- docs/search.html | 10 +++++----- docs/searchindex.js | 2 +- 12 files changed, 100 insertions(+), 61 deletions(-) diff --git a/docs/_static/basic.css b/docs/_static/basic.css index 7577acb..30fee9d 100644 --- a/docs/_static/basic.css +++ b/docs/_static/basic.css @@ -237,6 +237,10 @@ a.headerlink { visibility: hidden; } +a:visited { + color: #551A8B; +} + h1:hover > a.headerlink, h2:hover > a.headerlink, h3:hover > a.headerlink, @@ -670,6 +674,16 @@ dd { margin-left: 30px; } +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + dl > dd:last-child, dl > dd:last-child > :last-child { margin-bottom: 0; @@ -738,6 +752,14 @@ abbr, acronym { cursor: help; } +.translated { + background-color: rgba(207, 255, 207, 0.2) +} + +.untranslated { + background-color: rgba(255, 207, 207, 0.2) +} + /* -- code displays --------------------------------------------------------- */ pre { diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js index 6200b07..138ae34 100644 --- a/docs/_static/documentation_options.js +++ b/docs/_static/documentation_options.js @@ -1,5 +1,4 @@ -var DOCUMENTATION_OPTIONS = { - URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'), +const DOCUMENTATION_OPTIONS = { VERSION: '2.0.3', LANGUAGE: 'en', COLLAPSE_INDEX: false, diff --git a/docs/_static/searchtools.js b/docs/_static/searchtools.js index 97d56a7..7918c3f 100644 --- a/docs/_static/searchtools.js +++ b/docs/_static/searchtools.js @@ -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; @@ -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()) @@ -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); }; @@ -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 ); } @@ -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); }, /** diff --git a/docs/_static/sphinx_highlight.js b/docs/_static/sphinx_highlight.js index aae669d..8a96c69 100644 --- a/docs/_static/sphinx_highlight.js +++ b/docs/_static/sphinx_highlight.js @@ -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( @@ -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(); +}); diff --git a/docs/about.html b/docs/about.html index 948af99..57891c2 100644 --- a/docs/about.html +++ b/docs/about.html @@ -11,11 +11,11 @@ - - - - - + + + + + @@ -79,7 +79,7 @@
-

About Inkycal

+

About Inkycal

inkycal logo

Inkycal is a python3 software for selected E-Paper displays. It’s open-source (non-commercially), fully modular, user-friendly and even runs well even on the Raspberry Pi Zero. Inkycal even has a web-UI which takes diff --git a/docs/dev_doc.html b/docs/dev_doc.html index 3d5629a..2188105 100644 --- a/docs/dev_doc.html +++ b/docs/dev_doc.html @@ -11,11 +11,11 @@ - - - - - + + + + + @@ -78,7 +78,7 @@

-

Developer documentation

+

Developer documentation

This documentation is mainly for developers who wish to create a third party module

diff --git a/docs/genindex.html b/docs/genindex.html index eb99e06..1149ab8 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -10,11 +10,11 @@ - - - - - + + + + + diff --git a/docs/index.html b/docs/index.html index 1985eec..6061004 100644 --- a/docs/index.html +++ b/docs/index.html @@ -11,11 +11,11 @@ - - - - - + + + + + @@ -78,7 +78,7 @@
-

Inkycal documentation

+

Inkycal documentation

logo

Contents:

@@ -98,7 +98,7 @@
-

Indices and tables

+

Indices and tables

  • Index

  • Module Index

  • diff --git a/docs/inkycal.html b/docs/inkycal.html index 661045e..858ecd3 100644 --- a/docs/inkycal.html +++ b/docs/inkycal.html @@ -11,11 +11,11 @@ - - - - - + + + + + @@ -80,16 +80,16 @@ logo
    -

    Inkycal

    +

    Inkycal

    -

    Display

    +

    Display

    -

    Custom functions

    +

    Custom functions

    -

    Helper classes

    +

    Helper classes

    diff --git a/docs/quickstart.html b/docs/quickstart.html index 33db091..334746f 100644 --- a/docs/quickstart.html +++ b/docs/quickstart.html @@ -11,11 +11,11 @@ - - - - - + + + + + @@ -83,9 +83,9 @@
    -

    Quickstart

    +

    Quickstart

    -

    Installing Inkycal

    +

    Installing Inkycal

    Install inkycal directly via the GitHub repo:

    # clone the repo
     git clone https://github.com/aceinnolab/Inkycal
    @@ -99,7 +99,7 @@ pip3 install -e 
     
    -

    Creating settings file

    +

    Creating settings file

    Please navigate to the WEB-UI to create your settings file.

    Copy the generated settings file to the Raspberry Pi more coming soon..

    diff --git a/docs/search.html b/docs/search.html index 7047887..0076dd3 100644 --- a/docs/search.html +++ b/docs/search.html @@ -11,11 +11,11 @@ - - - - - + + + + + diff --git a/docs/searchindex.js b/docs/searchindex.js index ed615ca..301cbe0 100644 --- a/docs/searchindex.js +++ b/docs/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["about", "dev_doc", "index", "inkycal", "quickstart"], "filenames": ["about.md", "dev_doc.md", "index.rst", "inkycal.rst", "quickstart.md"], "titles": ["About Inkycal", "Developer documentation", "Inkycal documentation", "Inkycal", "Quickstart"], "terms": {"i": [0, 1], "python3": 0, "softwar": 0, "select": 0, "e": [0, 4], "paper": 0, "displai": [0, 2], "It": 0, "": 0, "open": 0, "sourc": 0, "non": 0, "commerci": 0, "fulli": 0, "modular": 0, "user": 0, "friendli": 0, "even": 0, "run": 0, "well": 0, "raspberri": [0, 4], "pi": [0, 4], "zero": 0, "ha": 0, "web": [0, 4], "ui": [0, 4], "which": 0, "take": 0, "care": 0, "ad": 0, "your": [0, 4], "detail": 0, "No": 0, "more": [0, 4], "edit": 0, "file": [0, 2], "yai": 0, "parti": [0, 1], "_": 0, "face": 0, "The": 0, "main": 0, "idea": 0, "behind": 0, "wa": 0, "creat": [0, 1, 2], "dashboard": 0, "blend": 0, "its": 0, "environ": 0, "show": 0, "you": 0, "all": 0, "inform": 0, "without": 0, "have": 0, "look": 0, "them": 0, "up": 0, "sever": 0, "built": 0, "modul": [0, 1, 2], "help": 0, "stai": 0, "organis": 0, "provid": 0, "weather": 0, "forecast": 0, "full": 0, "week": 0, "next": 0, "few": 0, "hour": 0, "get": 0, "latest": 0, "new": 0, "from": 0, "atom": 0, "rss": 0, "feed": 0, "icalendar": 0, "agenda": 0, "mai": 0, "synchronis": 0, "phone": 0, "monthli": 0, "calendar": 0, "also": 0, "event": 0, "sync": 0, "googl": 0, "etc": 0, "fetch": 0, "some": 0, "joke": 0, "form": 0, "smile": 0, "what": 0, "compat": 0, "third": [0, 1], "someth": 0, "miss": 0, "can": 0, "write": 0, "own": 0, "share": 0, "commun": 0, "discord": 0, "case": 0, "re": 0, "pinch": 0, "set": [0, 2], "noob": 0, "welcom": 0, "too": 0, "cours": 0, "develop": [0, 2], "mainli": [0, 1], "aceisac": 0, "univers": 0, "student": 0, "other": 0, "free": 0, "time": 0, "mean": 0, "we": 0, "work": 0, "noth": 0, "doesn": 0, "t": 0, "don": 0, "need": 0, "anyth": 0, "invest": 0, "larg": 0, "amount": 0, "effort": 0, "coffe": 0, "pleas": [0, 4], "support": 0, "via": [0, 4], "donat": 0, "u": 0, "keep": 0, "thi": [0, 1], "project": 0, "aliv": 0, "thank": 0, "who": 1, "wish": 1, "custom": 2, "function": 2, "helper": 2, "class": 2, "about": 2, "quickstart": 2, "instal": 2, "index": 2, "search": 2, "page": 2, "directli": 4, "github": 4, "repo": 4, "clone": 4, "git": 4, "http": 4, "com": 4, "aceinnolab": 4, "go": 4, "download": 4, "folder": 4, "cd": 4, "pip3": 4, "navig": 4, "copi": 4, "gener": 4, "come": 4, "soon": 4}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"about": 0, "inkyc": [0, 2, 3, 4], "develop": 1, "document": [1, 2], "content": 2, "indic": 2, "tabl": 2, "displai": 3, "custom": 3, "function": 3, "helper": 3, "class": 3, "quickstart": 4, "instal": 4, "creat": 4, "set": 4, "file": 4}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 57}, "alltitles": {"About Inkycal": [[0, "about-inkycal"]], "Developer documentation": [[1, "developer-documentation"]], "Inkycal documentation": [[2, "inkycal-documentation"]], "Contents:": [[2, null]], "Indices and tables": [[2, "indices-and-tables"]], "Quickstart": [[4, "quickstart"]], "Installing Inkycal": [[4, "installing-inkycal"]], "Creating settings file": [[4, "creating-settings-file"]], "Inkycal": [[3, "inkycal"]], "Display": [[3, "display"]], "Custom functions": [[3, "custom-functions"]], "Helper classes": [[3, "helper-classes"]]}, "indexentries": {}}) \ No newline at end of file +Search.setIndex({"docnames": ["about", "dev_doc", "index", "inkycal", "quickstart"], "filenames": ["about.md", "dev_doc.md", "index.rst", "inkycal.rst", "quickstart.md"], "titles": ["About Inkycal", "Developer documentation", "Inkycal documentation", "Inkycal", "Quickstart"], "terms": {"i": [0, 1], "python3": 0, "softwar": 0, "select": 0, "e": [0, 4], "paper": 0, "displai": [0, 2], "It": 0, "": 0, "open": 0, "sourc": 0, "non": 0, "commerci": 0, "fulli": 0, "modular": 0, "user": 0, "friendli": 0, "even": 0, "run": 0, "well": 0, "raspberri": [0, 4], "pi": [0, 4], "zero": 0, "ha": 0, "web": [0, 4], "ui": [0, 4], "which": 0, "take": 0, "care": 0, "ad": 0, "your": [0, 4], "detail": 0, "No": 0, "more": [0, 4], "edit": 0, "file": [0, 2], "yai": 0, "parti": [0, 1], "_": 0, "face": 0, "The": 0, "main": 0, "idea": 0, "behind": 0, "wa": 0, "creat": [0, 1, 2], "dashboard": 0, "blend": 0, "its": 0, "environ": 0, "show": 0, "you": 0, "all": 0, "inform": 0, "without": 0, "have": 0, "look": 0, "them": 0, "up": 0, "sever": 0, "built": 0, "modul": [0, 1, 2], "help": 0, "stai": 0, "organis": 0, "provid": 0, "weather": 0, "forecast": 0, "full": 0, "week": 0, "next": 0, "few": 0, "hour": 0, "get": 0, "latest": 0, "new": 0, "from": 0, "atom": 0, "rss": 0, "feed": 0, "icalendar": 0, "agenda": 0, "mai": 0, "synchronis": 0, "phone": 0, "monthli": 0, "calendar": 0, "also": 0, "event": 0, "sync": 0, "googl": 0, "etc": 0, "fetch": 0, "some": 0, "joke": 0, "form": 0, "smile": 0, "what": 0, "compat": 0, "third": [0, 1], "someth": 0, "miss": 0, "can": 0, "write": 0, "own": 0, "share": 0, "commun": 0, "discord": 0, "case": 0, "re": 0, "pinch": 0, "set": [0, 2], "noob": 0, "welcom": 0, "too": 0, "cours": 0, "develop": [0, 2], "mainli": [0, 1], "aceisac": 0, "univers": 0, "student": 0, "other": 0, "free": 0, "time": 0, "mean": 0, "we": 0, "work": 0, "noth": 0, "doesn": 0, "t": 0, "don": 0, "need": 0, "anyth": 0, "invest": 0, "larg": 0, "amount": 0, "effort": 0, "coffe": 0, "pleas": [0, 4], "support": 0, "via": [0, 4], "donat": 0, "u": 0, "keep": 0, "thi": [0, 1], "project": 0, "aliv": 0, "thank": 0, "who": 1, "wish": 1, "custom": 2, "function": 2, "helper": 2, "class": 2, "about": 2, "quickstart": 2, "instal": 2, "index": 2, "search": 2, "page": 2, "directli": 4, "github": 4, "repo": 4, "clone": 4, "git": 4, "http": 4, "com": 4, "aceinnolab": 4, "go": 4, "download": 4, "folder": 4, "cd": 4, "pip3": 4, "navig": 4, "copi": 4, "gener": 4, "come": 4, "soon": 4}, "objects": {}, "objtypes": {}, "objnames": {}, "titleterms": {"about": 0, "inkyc": [0, 2, 3, 4], "develop": 1, "document": [1, 2], "content": 2, "indic": 2, "tabl": 2, "displai": 3, "custom": 3, "function": 3, "helper": 3, "class": 3, "quickstart": 4, "instal": 4, "creat": 4, "set": 4, "file": 4}, "envversion": {"sphinx.domains.c": 3, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 9, "sphinx.domains.index": 1, "sphinx.domains.javascript": 3, "sphinx.domains.math": 2, "sphinx.domains.python": 4, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx": 60}, "alltitles": {"About Inkycal": [[0, "about-inkycal"]], "Developer documentation": [[1, "developer-documentation"]], "Inkycal documentation": [[2, "inkycal-documentation"]], "Contents:": [[2, null]], "Indices and tables": [[2, "indices-and-tables"]], "Quickstart": [[4, "quickstart"]], "Installing Inkycal": [[4, "installing-inkycal"]], "Creating settings file": [[4, "creating-settings-file"]], "Inkycal": [[3, "inkycal"]], "Display": [[3, "display"]], "Custom functions": [[3, "custom-functions"]], "Helper classes": [[3, "helper-classes"]]}, "indexentries": {}}) \ No newline at end of file