Skip to content

Commit 9261ed4

Browse files
committed
Remove tag-adding code from script
1 parent f1a7802 commit 9261ed4

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

tools/misc/docs_gen.py

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,6 @@ def generate_documentation(dirs, output_dir):
2323
proc.stdin.close()
2424
proc.wait()
2525

26-
MATCH_NAMESPACE = compile(r'^namespace.*')
27-
28-
def find_namespace(contents):
29-
for num, line in enumerate(contents.split("\n")):
30-
if MATCH_NAMESPACE.match(line):
31-
return num + 1
32-
return 0
33-
3426
EXCLUDES = ["targets", "features/FEATURE", "features/mbedtls",
3527
"features/nanostack", "features/storage"]
3628

@@ -48,28 +40,6 @@ def is_not_excluded(src):
4840
from tools.targets import TARGET_MAP
4941
toolchain = GCC_ARM(TARGET_MAP["Super_Target"])
5042
resources = toolchain.scan_resources(".")
51-
for src in filter(is_not_excluded, resources.headers):
52-
if len(src.split(sep)) > 2:
53-
name = src.split(sep)[1]
54-
if name == "features":
55-
name = src.split(sep)[2]
56-
with open(src) as fd:
57-
contents = fd.read()
58-
with open(src, "w+") as fd:
59-
insert_at = find_namespace(contents)
60-
before = "\n".join(contents.split("\n")[:insert_at])
61-
after = "\n".join(contents.split("\n")[insert_at:])
62-
fd.write("{:s}\n/** \\addtogroup {:s} */\n/** @{{*/\n{:s}\n/** @}}*/\n".format(before,name,after))
63-
for name, res in resources.features.iteritems():
64-
for src in filter(is_not_excluded, res.headers):
65-
with open(src) as fd:
66-
contents = fd.read()
67-
with open(src, "w+") as fd:
68-
insert_at = find_namespace(contents)
69-
before = "\n".join(contents.split("\n")[:insert_at])
70-
after = "\n".join(contents.split("\n")[insert_at:])
71-
fd.write("{:s}\n/** \\addtogroup FEATURE_{:s} */\n/** @{{*/\n{:s}\n/** @}}*/\n".format(before,name,after))
72-
7343
generate_documentation(filter(is_not_excluded,
7444
sum(map(lambda x:x.headers,
7545
resources.features.values()),

0 commit comments

Comments
 (0)