videos/sorted
This commit is contained in:
parent
bf31e8a4c9
commit
47aa5ec591
1 changed files with 5 additions and 1 deletions
4
build.py
4
build.py
|
@ -88,12 +88,16 @@ def main():
|
|||
}
|
||||
content = []
|
||||
raw_category = os.path.join(raw_root, category)
|
||||
videos = {}
|
||||
for directory, directories, files in os.walk(raw_category):
|
||||
for file in files:
|
||||
relative = os.path.relpath(directory, raw_root)
|
||||
name, _ = os.path.splitext(file)
|
||||
raw_file = os.path.join('raw', relative, file)
|
||||
web_file = os.path.join('web', relative, f'{name}.mp4')
|
||||
videos[name] = [web_file, raw_file]
|
||||
for name, files in sorted(videos.items()):
|
||||
web_file, raw_file = files
|
||||
content.append(card(name, web_file, raw_file))
|
||||
section['content'] = os.linesep.join(content)
|
||||
sections[category] = section
|
||||
|
|
Loading…
Reference in a new issue