a/codesys-ide/scripts/export-documentation.py | b/codesys-ide/scripts/export-documentation.py | ||
---|---|---|---|
... |
... |
||
7 | for root, dirs, files in os.walk(path): |
7 | for root, dirs, files in os.walk(path): |
8 | if "doc_unzip" in root: |
8 | if "doc_unzip" in root: |
9 | for file in files: |
9 | for file in files: |
10 | filename=os.path.join(root, file) |
10 | filename=os.path.join(root, file) |
11 | dirname=re.split("doc_unzip[^\\\\]*", root)[1].lstrip("\\") |
11 | dirname=re.split("doc_unzip[^\\\\]*", root)[1].lstrip("\\") |
12 | print(dirname) |
12 | # print(dirname) |
13 | destdir=os.path.join(libdir + ".doc", dirname) |
13 | destdir=os.path.join(libdir + ".doc", dirname) |
14 | print("parsing file: %s (%s)" % (filename, destdir)) |
14 | # print("parsing file: %s (%s)" % (filename, destdir)) |
15 | if not os.path.exists(destdir): |
15 | if not os.path.exists(destdir): |
16 | os.mkdir(destdir) |
16 | os.mkdir(destdir) |
17 | shutil.copy2(filename, destdir) |
17 | shutil.copy2(filename, destdir) |
18 | artifacts.append(os.path.join(destdir, file)) |
18 | artifacts.append(os.path.join(destdir, file)) |
19 | return artifacts |
19 | return artifacts |
... |
... |
||
31 | 31 | ||
32 | print("%s -> %s\n" % (filename, destination)) |
32 | print("%s -> %s\n" % (filename, destination)) |
33 | 33 | ||
34 | proj = projects.open(filename) |
34 | proj = projects.open(filename) |
35 | proj.save_as_compiled_library(destination) |
35 | proj.save_as_compiled_library(destination) |
36 | print(os.environ) |
||
37 | artifacts = get_artifacts(os.path.join("c:", "users", "Public", "Application Data", "CODESYS", "Temporary Files"), filename) |
36 | artifacts = get_artifacts(os.path.join("c:", "users", "Public", "Application Data", "CODESYS", "Temporary Files"), filename) |
38 | proj.close() |
37 | proj.close() |
39 | 38 | ||
40 | return artifacts |
39 | return artifacts |
41 | 40 |