parse.py 473 字节
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
import sys

output = ""
for line in sys.stdin:
    line.strip()
    tag = "\\"
    if tag in line:
        index = line.index("\\")
        line = line[:index]
    output += line
for line in output.split(" "):
    line = line.strip()
    if "/Applications" in line:
        continue
    if len(line) <= 0:
        continue
    if not line.endswith(".h"):
        continue
    if not line.startswith("../../../src/"):
        continue
    print(line[len("../../../src/"):])