add breathe extension for Doxygen doc generation
	
		
			
	
		
	
	
		
	
		
			Some checks are pending
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is running
				
			
		
		
	
	
				
					
				
			
		
			Some checks are pending
		
		
	
	continuous-integration/drone/push Build is running
				
			This commit is contained in:
		
							parent
							
								
									0a1bda9573
								
							
						
					
					
						commit
						599f28fe73
					
				
					 8 changed files with 133 additions and 110 deletions
				
			
		
							
								
								
									
										2
									
								
								docs/.gitignore
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								docs/.gitignore
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -1,3 +1,5 @@
 | 
				
			||||||
_build/
 | 
					_build/
 | 
				
			||||||
generated/
 | 
					generated/
 | 
				
			||||||
 | 
					html/
 | 
				
			||||||
 | 
					xml/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										86
									
								
								docs/Doxyfile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								docs/Doxyfile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,86 @@
 | 
				
			||||||
 | 
					TARGET = ./
 | 
				
			||||||
 | 
					INPUT = "../modules"
 | 
				
			||||||
 | 
					RECURSIVE = YES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					PROJECT_NAME           = "Light"
 | 
				
			||||||
 | 
					JAVADOC_AUTOBRIEF      = YES
 | 
				
			||||||
 | 
					JAVADOC_BANNER         = YES
 | 
				
			||||||
 | 
					GENERATE_XML           = YES
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					EXTRACT_PRIVATE = NO
 | 
				
			||||||
 | 
					EXTRACT_STATIC = NO
 | 
				
			||||||
 | 
					EXTRACT_LOCAL_CLASSES = NO
 | 
				
			||||||
 | 
					HIDE_UNDOC_RELATIONS = YES
 | 
				
			||||||
 | 
					HAVE_DOT = NO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					GENERATE_TODOLIST      = NO
 | 
				
			||||||
 | 
					GENERATE_HTML          = NO
 | 
				
			||||||
 | 
					GENERATE_DOCSET        = NO
 | 
				
			||||||
 | 
					GENERATE_HTMLHELP      = NO
 | 
				
			||||||
 | 
					GENERATE_CHI           = NO
 | 
				
			||||||
 | 
					GENERATE_QHP           = NO
 | 
				
			||||||
 | 
					GENERATE_ECLIPSEHELP   = NO
 | 
				
			||||||
 | 
					GENERATE_TREEVIEW      = NO
 | 
				
			||||||
 | 
					GENERATE_LATEX         = NO
 | 
				
			||||||
 | 
					GENERATE_RTF           = NO
 | 
				
			||||||
 | 
					GENERATE_MAN           = NO
 | 
				
			||||||
 | 
					GENERATE_DOCBOOK       = NO
 | 
				
			||||||
 | 
					GENERATE_AUTOGEN_DEF   = NO
 | 
				
			||||||
 | 
					GENERATE_SQLITE3       = NO
 | 
				
			||||||
 | 
					GENERATE_PERLMOD       = NO
 | 
				
			||||||
 | 
					GENERATE_TAGFILE       = NO
 | 
				
			||||||
 | 
					GENERATE_LEGEND        = NO
 | 
				
			||||||
 | 
					GENERATE_TESTLIST      = NO
 | 
				
			||||||
 | 
					GENERATE_BUGLIST       = NO
 | 
				
			||||||
 | 
					GENERATE_DEPRECATEDLIST= NO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FILE_PATTERNS          = *.c \
 | 
				
			||||||
 | 
					                         *.cc \
 | 
				
			||||||
 | 
					                         *.cxx \
 | 
				
			||||||
 | 
					                         *.cxxm \
 | 
				
			||||||
 | 
					                         *.cpp \
 | 
				
			||||||
 | 
					                         *.cppm \
 | 
				
			||||||
 | 
					                         *.ccm \
 | 
				
			||||||
 | 
					                         *.c++ \
 | 
				
			||||||
 | 
					                         *.c++m \
 | 
				
			||||||
 | 
					                         *.java \
 | 
				
			||||||
 | 
					                         *.ii \
 | 
				
			||||||
 | 
					                         *.ixx \
 | 
				
			||||||
 | 
					                         *.ipp \
 | 
				
			||||||
 | 
					                         *.i++ \
 | 
				
			||||||
 | 
					                         *.inl \
 | 
				
			||||||
 | 
					                         *.idl \
 | 
				
			||||||
 | 
					                         *.ddl \
 | 
				
			||||||
 | 
					                         *.odl \
 | 
				
			||||||
 | 
					                         *.h \
 | 
				
			||||||
 | 
					                         *.hh \
 | 
				
			||||||
 | 
					                         *.hxx \
 | 
				
			||||||
 | 
					                         *.hpp \
 | 
				
			||||||
 | 
					                         *.h++ \
 | 
				
			||||||
 | 
					                         *.l \
 | 
				
			||||||
 | 
					                         *.cs \
 | 
				
			||||||
 | 
					                         *.d \
 | 
				
			||||||
 | 
					                         *.php \
 | 
				
			||||||
 | 
					                         *.php4 \
 | 
				
			||||||
 | 
					                         *.php5 \
 | 
				
			||||||
 | 
					                         *.phtml \
 | 
				
			||||||
 | 
					                         *.inc \
 | 
				
			||||||
 | 
					                         *.m \
 | 
				
			||||||
 | 
					                         *.markdown \
 | 
				
			||||||
 | 
					                         *.md \
 | 
				
			||||||
 | 
					                         *.mm \
 | 
				
			||||||
 | 
					                         *.dox \
 | 
				
			||||||
 | 
					                         *.py \
 | 
				
			||||||
 | 
					                         *.pyw \
 | 
				
			||||||
 | 
					                         *.f90 \
 | 
				
			||||||
 | 
					                         *.f95 \
 | 
				
			||||||
 | 
					                         *.f03 \
 | 
				
			||||||
 | 
					                         *.f08 \
 | 
				
			||||||
 | 
					                         *.f18 \
 | 
				
			||||||
 | 
					                         *.f \
 | 
				
			||||||
 | 
					                         *.for \
 | 
				
			||||||
 | 
					                         *.vhd \
 | 
				
			||||||
 | 
					                         *.vhdl \
 | 
				
			||||||
 | 
					                         *.ucf \
 | 
				
			||||||
 | 
					                         *.qsf \
 | 
				
			||||||
 | 
					                         *.ice
 | 
				
			||||||
							
								
								
									
										17
									
								
								docs/api/app.rst
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								docs/api/app.rst
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,17 @@
 | 
				
			||||||
 | 
					Application
 | 
				
			||||||
 | 
					===================================================================================================
 | 
				
			||||||
 | 
					.. toctree::
 | 
				
			||||||
 | 
					   :maxdepth: 3
 | 
				
			||||||
 | 
					   :caption: App
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Functions
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					.. doxygenfunction:: main
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Classes
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					.. doxygenclass:: lt::app::ISystem
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.. doxygenstruct:: lt::app::TickInfo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.. doxygenstruct:: lt::app::TickResult
 | 
				
			||||||
							
								
								
									
										13
									
								
								docs/api/renderer.rst
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								docs/api/renderer.rst
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,13 @@
 | 
				
			||||||
 | 
					Renderer
 | 
				
			||||||
 | 
					===================================================================================================
 | 
				
			||||||
 | 
					.. toctree::
 | 
				
			||||||
 | 
					   :maxdepth: 3
 | 
				
			||||||
 | 
					   :caption: App
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Classes
 | 
				
			||||||
 | 
					---------------------------------------------------------------------------------------------------
 | 
				
			||||||
 | 
					.. doxygenenum:: lt::renderer::Api
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.. doxygenclass:: lt::renderer::System
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.. doxygenstruct:: lt::renderer::components::Sprite
 | 
				
			||||||
							
								
								
									
										14
									
								
								docs/conf.py
									
										
									
									
									
								
							
							
						
						
									
										14
									
								
								docs/conf.py
									
										
									
									
									
								
							| 
						 | 
					@ -13,13 +13,21 @@ author = 'light7734'
 | 
				
			||||||
# -- General configuration ---------------------------------------------------
 | 
					# -- General configuration ---------------------------------------------------
 | 
				
			||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
 | 
					# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
 | 
				
			||||||
 | 
					
 | 
				
			||||||
extensions = []
 | 
					extensions = ['breathe']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					breathe_projects = {"Light": "./xml"}
 | 
				
			||||||
 | 
					breathe_default_project = "Light"
 | 
				
			||||||
 | 
					breathe_default_members = ()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Tell sphinx what the primary language being documented is.
 | 
				
			||||||
 | 
					primary_domain = 'cpp'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Tell sphinx what the pygments highlight language should be.
 | 
				
			||||||
 | 
					highlight_language = 'cpp'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
templates_path = ['_templates']
 | 
					templates_path = ['_templates']
 | 
				
			||||||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
 | 
					exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
# -- Options for HTML output -------------------------------------------------
 | 
					# -- Options for HTML output -------------------------------------------------
 | 
				
			||||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
 | 
					# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,68 +0,0 @@
 | 
				
			||||||
from git import Repo
 | 
					 | 
				
			||||||
import re
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
repo = Repo(search_parent_directories=True)
 | 
					 | 
				
			||||||
assert not repo.bare
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
file_path = "generated/changelog.rst"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
messages = []
 | 
					 | 
				
			||||||
short_shas = []
 | 
					 | 
				
			||||||
hex_shas = []
 | 
					 | 
				
			||||||
logs = []
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
remote_url = "https://git.light7734.com/light7734/light/commit"
 | 
					 | 
				
			||||||
def format_log(commit_type, message, major, minor, patch, short_sha, hex_sha):
 | 
					 | 
				
			||||||
    href = f"{remote_url}/{hex_sha}"
 | 
					 | 
				
			||||||
    version = f"{major}.{minor}.{patch}-kitten+{short_sha}";
 | 
					 | 
				
			||||||
    link = f"`{version} <{remote_url}/{hex_sha}>`__"
 | 
					 | 
				
			||||||
    return f"| **{message}** ({link})"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
for commit in repo.iter_commits():
 | 
					 | 
				
			||||||
    messages.append(commit.summary)
 | 
					 | 
				
			||||||
    short_shas.append(repo.git.rev_parse(commit.hexsha, short=5))
 | 
					 | 
				
			||||||
    hex_shas.append(commit.hexsha)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
ver_major = 0
 | 
					 | 
				
			||||||
ver_minor = 0
 | 
					 | 
				
			||||||
ver_patch = 0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
idx = len(messages)
 | 
					 | 
				
			||||||
for message in reversed(messages):
 | 
					 | 
				
			||||||
    idx = idx - 1;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    commit_type = re.match("^(feat|fix|refactor|perf|build|asset|test|chore|ci|docs)", message)
 | 
					 | 
				
			||||||
    if not commit_type:
 | 
					 | 
				
			||||||
        continue
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    match commit_type.group(0):
 | 
					 | 
				
			||||||
        case "feat":
 | 
					 | 
				
			||||||
            ver_minor = ver_minor + 1
 | 
					 | 
				
			||||||
            ver_patch = 0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        case "fix":
 | 
					 | 
				
			||||||
            ver_patch = ver_patch + 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        case "refactor":
 | 
					 | 
				
			||||||
            ver_patch = ver_patch + 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        case "perf":
 | 
					 | 
				
			||||||
            ver_patch = ver_patch + 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        case "build":
 | 
					 | 
				
			||||||
            ver_patch = ver_patch + 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
        case "asset":
 | 
					 | 
				
			||||||
            ver_patch = ver_patch + 1
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    logs.append(format_log(commit_type, message, ver_major, ver_minor, ver_patch, short_shas[idx], hex_shas[idx]))
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
with open(file_path, "w") as f:
 | 
					 | 
				
			||||||
    f.write(".. changelogs\n\n\n")
 | 
					 | 
				
			||||||
    f.write("Changelogs\n")
 | 
					 | 
				
			||||||
    f.write("==================================================\n\n")
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    f.write("KITTEN\n")
 | 
					 | 
				
			||||||
    f.write("--------------------------------------------------\n\n")
 | 
					 | 
				
			||||||
    for log in reversed(logs):
 | 
					 | 
				
			||||||
          f.write(log + '\n')
 | 
					 | 
				
			||||||
| 
						 | 
					@ -23,10 +23,10 @@
 | 
				
			||||||
   guidelines/conventions.rst
 | 
					   guidelines/conventions.rst
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. toctree::
 | 
					.. toctree::
 | 
				
			||||||
   :maxdepth: 2
 | 
					   :maxdepth: 3
 | 
				
			||||||
   :caption: Generated Docs
 | 
					   :caption: API
 | 
				
			||||||
 | 
					
 | 
				
			||||||
   generated/api.rst
 | 
					   api/app.rst
 | 
				
			||||||
   generated/changelog.rst
 | 
					   api/renderer.rst
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,35 +0,0 @@
 | 
				
			||||||
@ECHO OFF
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
pushd %~dp0
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
REM Command file for Sphinx documentation
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if "%SPHINXBUILD%" == "" (
 | 
					 | 
				
			||||||
	set SPHINXBUILD=sphinx-build
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
set SOURCEDIR=.
 | 
					 | 
				
			||||||
set BUILDDIR=_build
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
%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
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
if "%1" == "" goto help
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
 | 
					 | 
				
			||||||
goto end
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:help
 | 
					 | 
				
			||||||
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
:end
 | 
					 | 
				
			||||||
popd
 | 
					 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue