Skip to content

Commit bf2e1b3

Browse files
committed
copying webm files
1 parent 60e2973 commit bf2e1b3

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
## 0.0.15dev
44

5+
* [Feature] Copying `.webm` files when rendering posts
6+
57
## 0.0.14 (2024-03-25)
68

79
* [Feature] Keep existing date if the current file has been rendered already

src/jupyblog/util.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,13 @@ def add_output_tags(md, outputs):
5454

5555
def copy_all_images(src, target, dir_name):
5656
"""
57-
Copy all .png files in src to target inside a folder with the passed name
57+
Copy all .png, .gif, and .webm files in src to target inside a folder with the passed name
5858
"""
5959
pngs = glob(str(Path(src, "**", "*.png")), recursive=True)
6060
gifs = glob(str(Path(src, "**", "*.gif")), recursive=True)
61+
videos = glob(str(Path(src, "**", "*.webm")), recursive=True)
6162

62-
for img in chain(pngs, gifs):
63+
for img in chain(pngs, gifs, videos):
6364
# target location: {target}/{dir-name}/{original-relative-path}
6465
rel_path = str(Path(img).relative_to(src))
6566
target_file = Path(target, dir_name, rel_path)

0 commit comments

Comments
 (0)