|
|
def | write_if_changed (f, text, header=None) |
| |
|
|
string | process_encoding = 'latin1' |
| |
|
string | read_encoding = 'latin1' |
| |
|
string | scriptPattern_rel = "../../packages/python/*.py" |
| |
|
string | target_dir_rel = "../../packages/doc" |
| |
|
| file_dir = os.path.split(__file__)[0] |
| |
|
| scriptPattern = os.path.abspath(os.path.join(file_dir,scriptPattern_rel)) |
| |
|
| target_dir = os.path.abspath(os.path.join(file_dir,target_dir_rel)) |
| |
|
| files = glob(scriptPattern) |
| |
|
list | skip = ['__init__.py', 'runStripAdjust.py', '_writeQgisProj.py', 'pyDM.py', 'metaShape2stripAdjust.py'] |
| |
|
bool | delVarR_HOME = False |
| |
|
string | suffix_param = "Param.xml" |
| |
|
string | suffix_dox = ".dox" |
| |
|
string | header_param = "<!-- This file has been automatically generated by "+__file__+" - do not edit! --> \n\n" |
| |
|
string | header_dox = "\n// This file has been automatically generated by "+__file__+" - remove this header line to avoid overwriting in the future!\n\n" |
| |
| string | dox_template |
| |
|
int | counterError = 0 |
| |
|
int | counterOk = 0 |
| |
|
int | counterSkip = 0 |
| |
|
| fpath = os.path.abspath(f) |
| |
|
| fname = os.path.split(f)[1] |
| |
|
| sname = os.path.splitext(fname)[0] |
| |
|
| fparam = os.path.join(target_dir,sname+suffix_param) |
| |
|
| fdox = os.path.join(target_dir,sname+suffix_dox) |
| |
|
| end |
| |
| | p |
| |
|
| out = out.replace("\r\n","\n") |
| |
|
| err = out |
| |
|
string | text = header_param+out |
| |
Create doxygen param files for all packages scripts
- See also
- createParamFiles
◆ dox_template
Initial value:
3 \\page {0} Python script {0}
9 \\section {0}_aim Aim of module
11 \\copybrief python::packages::{0}
13 \\section {0}_general_description General description
14 \\copydetails python::packages::{0}
16 \\section {0}_parameter_description Parameter description
17 \\include{{doc}} {0}Param.xml
19 \\section {0}_examples Examples
Initial value: 1 = subprocess.Popen([sys.executable, fpath,
'-_doxygen'], stdout=subprocess.PIPE, stderr=subprocess.PIPE,
2 encoding=process_encoding)