mirror of
https://github.com/lvgl/lvgl.git
synced 2024-11-26 19:23:46 +08:00
docs add demos
This commit is contained in:
parent
26ea9b00fc
commit
02a6614b38
@ -84,14 +84,15 @@ def print_item(path, lvl, d, fout):
|
||||
fout.write("\n")
|
||||
|
||||
def exec():
|
||||
path ="../examples/"
|
||||
paths = [ "../examples/", "../demos/"]
|
||||
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
|
||||
filelist.append(os.path.join(root,f))
|
||||
for path in paths:
|
||||
for root, dirs, files in os.walk(path):
|
||||
for f in files:
|
||||
#append the file name to the list
|
||||
filelist.append(os.path.join(root,f))
|
||||
|
||||
filelist = [ fi for fi in filelist if fi.endswith("index.rst") ]
|
||||
|
||||
|
@ -3,7 +3,7 @@ echo "/* Autogenerated */"
|
||||
echo '#include <stddef.h>'
|
||||
echo '#include "examplelist.h"'
|
||||
TMPFILE=$(mktemp)
|
||||
find examples -name \*.h | xargs grep -h "^void lv_example" | sed 's/(/ /g' | awk '{print $2}' > $TMPFILE
|
||||
find examples demos -name \*.h | xargs grep -hE "^void lv_(example|demo)" | sed 's/(/ /g' | awk '{print $2}' > $TMPFILE
|
||||
cat $TMPFILE | while read -r line; do
|
||||
echo "extern void ${line}(void);"
|
||||
done
|
||||
|
Loading…
Reference in New Issue
Block a user