File: cpp_examples_for_doxygen.py

package info (click to toggle)
gudhi 3.11.0%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 76,972 kB
  • sloc: cpp: 72,639; python: 7,900; xml: 167; makefile: 104; sh: 62; pascal: 18
file content (16 lines) | stat: -rw-r--r-- 600 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import os
import glob

for gd_mod in glob.glob("src/*/"):
    mod_files = []
    for paths in [gd_mod + 'utilities', gd_mod + 'example']:
        if os.path.isdir(paths):
            for root, dirs, files in os.walk(paths):
                for file in files:
                    if file.endswith(".cpp"):
                        mod_files.append(str(os.path.join(root, file)).split(paths)[1][1:])
    if len(mod_files) > 0:
        mod = str(gd_mod).split('/')[1]
        print(' * \section ' + mod + '_example_section ' + mod)
        for file in mod_files:
            print(' * @example ' + file)