forked from takisd123/executequery
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
246 changed files
with
9,057 additions
and
7,043 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= $(VENV)/bin/sphinx-build | ||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
PYTHON ?= python3 | ||
ROOT := $(shell pwd) | ||
VENV ?= $(ROOT)/.venv | ||
PIP ?= $(VENV)/bin/pip | ||
|
||
.DEFAULT_GOAL := all | ||
|
||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile clean distclean bootstrap | ||
|
||
clean: | ||
- rm -rf $(BUILDDIR) | ||
|
||
distclean: clean | ||
- rm -r $(VENV) | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
bootstrap: | ||
$(PYTHON) -m venv .venv | ||
$(PIP) install -r requirements.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
@ECHO OFF | ||
|
||
pushd %~dp0 | ||
|
||
REM Command file for Sphinx documentation | ||
|
||
if "%SPHINXBUILD%" == "" ( | ||
set SPHINXBUILD=sphinx-build | ||
) | ||
set SOURCEDIR=source | ||
set BUILDDIR=build | ||
|
||
if "%1" == "" goto help | ||
|
||
%SPHINXBUILD% >NUL 2>NUL | ||
if errorlevel 9009 ( | ||
echo. | ||
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx | ||
echo.installed, then set the SPHINXBUILD environment variable to point | ||
echo.to the full path of the 'sphinx-build' executable. Alternatively you | ||
echo.may add the Sphinx directory to PATH. | ||
echo. | ||
echo.If you don't have Sphinx installed, grab it from | ||
echo.https://www.sphinx-doc.org/ | ||
exit /b 1 | ||
) | ||
|
||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
goto end | ||
|
||
:help | ||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% | ||
|
||
:end | ||
popd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Sphinx==7.2.6 | ||
sphinx_design |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
from __future__ import annotations | ||
|
||
__docformat__ = 'reStructuredText' | ||
|
||
import os.path | ||
|
||
from docutils import statemachine | ||
from docutils.parsers.rst import Directive, states | ||
|
||
import globalvar | ||
|
||
class BaseInclude(Directive): | ||
has_content = True | ||
required_arguments = 0 | ||
optional_arguments = 0 | ||
final_argument_whitespace = True | ||
option_spec = {} | ||
|
||
def run(self): | ||
tab_width = self.state.document.settings.tab_width | ||
rawtext = '\n'.join(self.content) | ||
include_lines = statemachine.string2lines(rawtext, tab_width, convert_whitespace=1) | ||
self.state_machine.insert_input(include_lines, '') | ||
return [] | ||
|
||
class HideIfCert(BaseInclude): | ||
def run(self): | ||
if not globalvar.IsCertifiedVersion: | ||
return super().run() | ||
else: | ||
return [] | ||
|
||
class ShowIfCert(BaseInclude): | ||
def run(self): | ||
if globalvar.IsCertifiedVersion: | ||
return super().run() | ||
else: | ||
return [] | ||
|
||
def setup(app): | ||
app.add_directive('hideifcert', HideIfCert) | ||
app.add_directive('showifcert', ShowIfCert) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
from docutils import nodes | ||
from docutils.parsers.rst.states import Struct | ||
import globalvar | ||
|
||
def Hide_ifcert_role(role, rawtext, text, lineno, inliner, options={}, content=[]): | ||
# Prepare context for nested parsing | ||
memo = Struct(document=inliner.document, | ||
reporter=inliner.reporter, | ||
language=inliner.language) | ||
parent = nodes.inline(rawtext, '', **options) | ||
|
||
if not globalvar.IsCertifiedVersion: | ||
# Parse role text for markup and add to parent | ||
processed, messages = inliner.parse(text, lineno, memo, parent) | ||
parent += processed | ||
else: | ||
parent = nodes.Text('') | ||
messages = [] | ||
|
||
return [parent], messages | ||
|
||
def Show_ifcert_role(role, rawtext, text, lineno, inliner, options={}, content=[]): | ||
# Prepare context for nested parsing | ||
memo = Struct(document=inliner.document, | ||
reporter=inliner.reporter, | ||
language=inliner.language) | ||
parent = nodes.inline(rawtext, '', **options) | ||
|
||
if globalvar.IsCertifiedVersion: | ||
# Parse role text for markup and add to parent | ||
processed, messages = inliner.parse(text, lineno, memo, parent) | ||
parent += processed | ||
else: | ||
parent = nodes.Text('') | ||
messages = [] | ||
|
||
return [parent], messages | ||
|
||
|
||
def setup(app): | ||
app.add_role('hideifcert', Hide_ifcert_role) | ||
app.add_role('showifcert', Show_ifcert_role) | ||
|
||
|
Oops, something went wrong.