Skip to content
Snippets Groups Projects
Commit e3403649 authored by Campbell Barton's avatar Campbell Barton
Browse files

Pass doxyfile as a command line arg

parent a6a5db74
Branches
Tags
No related merge requests found
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
""" """
This script takes 2-3 args: [--browse] <Doxyfile> <sourcefile> This script takes 2-3 args: [--browse] <Doxyfile> <sourcefile>
Where Doxyfile is a path relative to source root,
and the sourcefile as an absolute path.
--browse will open the resulting docs in a web browser. --browse will open the resulting docs in a web browser.
""" """
import sys import sys
...@@ -17,15 +20,9 @@ def find_gitroot(filepath_reference): ...@@ -17,15 +20,9 @@ def find_gitroot(filepath_reference):
path = os.path.dirname(path) path = os.path.dirname(path)
return path return path
def find_doxy(filepath_reference): doxyfile, sourcefile = sys.argv[-2:]
root = find_gitroot(filepath_reference)
# project specific!
return os.path.join(root, "doc", "doxygen", "Doxyfile")
sourcefile = sys.argv[-1]
doxyfile = find_doxy(sourcefile) doxyfile = os.path.join(find_gitroot(sourcefile), doxyfile)
os.chdir(os.path.dirname(doxyfile)) os.chdir(os.path.dirname(doxyfile))
tempfile = tempfile.NamedTemporaryFile(mode='w+b') tempfile = tempfile.NamedTemporaryFile(mode='w+b')
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<category>Documentation</category> <category>Documentation</category>
<executable output="showinpane" error="showinpane" modifiesdocument="no"> <executable output="showinpane" error="showinpane" modifiesdocument="no">
<path>qtc_doxy_file.py</path> <path>qtc_doxy_file.py</path>
<arguments>--browse %{CurrentDocument:FilePath}</arguments> <arguments>--browse doc/doxygen/Doxyfile %{CurrentDocument:FilePath}</arguments>
<workingdirectory>%{CurrentProject:BuildPath}</workingdirectory> <workingdirectory>%{CurrentProject:BuildPath}</workingdirectory>
</executable> </executable>
</externaltool> </externaltool>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment