Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
docs example list fixes
  • Loading branch information
kisvegabor committed Jun 15, 2021
1 parent c49e830 commit cd600d1
Show file tree
Hide file tree
Showing 2 changed files with 113 additions and 114 deletions.
15 changes: 7 additions & 8 deletions docs/example_list.py
@@ -1,6 +1,4 @@
import os

path ="../examples/"

def process_index_rst(path):
# print(path)
Expand Down Expand Up @@ -71,9 +69,8 @@ def process_index_rst(path):
"grid":"Grid",
}

fout = open("examples.md", "w")

def print_item(path, lvl, d):
def print_item(path, lvl, d, fout):
for k in d:
v = d[k]
b = os.path.basename(k)
Expand All @@ -83,8 +80,10 @@ def print_item(path, lvl, d):
fout.write("\n")

def exec():

path ="../examples/"
fout = open("examples.md", "w")
filelist = []

for root, dirs, files in os.walk(path):
for f in files:
#append the file name to the list
Expand All @@ -111,13 +110,13 @@ def exec():
if h == "widgets":
for w in widgets:
fout.write("### " + widgets[w] + "\n")
print_item(h + "/" + w, 4, d_all)
print_item(h + "/" + w, 4, d_all, fout)
elif h == "layouts":
for l in layouts:
fout.write("### " + layouts[l] + "\n")
print_item(h + "/" + l, 4, d_all)
print_item(h + "/" + l, 4, d_all, fout)
else:
print_item(h, 3, d_all)
print_item(h, 3, d_all, fout)

fout.write("")

0 comments on commit cd600d1

Please sign in to comment.