Skip to content

Commit 8d752e9

Browse files
author
Darius Neațu
committed
Fix in sync-docs.py: copy images from beman/docs/images
1 parent e7f3bb1 commit 8d752e9

7 files changed

+22
-5
lines changed
709 KB
Loading
34.8 MB
Loading
372 KB
Loading

scripts/sync-docs.py

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,30 @@ def copy_images(beman_repo_path: Path, website_repo_path: Path):
2121
Copy directory beman/images/ to /static/images/ for website build.
2222
Copy directory beman/images/ to / for previews in editors.
2323
"""
24-
beman_images_path = beman_repo_path / 'images'
25-
target_directories = [
26-
website_repo_path / 'images',
27-
website_repo_path / 'static' / 'images',
24+
tasks = [
25+
{
26+
'source': beman_repo_path / 'images',
27+
'target': website_repo_path / 'images',
28+
},
29+
{
30+
'source': beman_repo_path / 'images',
31+
'target': website_repo_path / 'static' / 'images',
32+
},
33+
{
34+
'source': beman_repo_path / 'docs' / 'images',
35+
'target': website_repo_path / 'docs' / 'images',
36+
},
37+
{
38+
'source': beman_repo_path / 'docs' / 'images',
39+
'target': website_repo_path / 'static' / 'docs' / 'images',
40+
},
2841
]
29-
for target_directory in target_directories:
42+
43+
for task in tasks:
44+
beman_images_path = task['source']
45+
target_directory = task['target']
3046
print(f"Copying images from {beman_images_path} to {target_directory}")
47+
3148
# Remove the target_directory if it exists and create it again.
3249
if target_directory.exists():
3350
shutil.rmtree(target_directory)
709 KB
Loading
34.8 MB
Loading
372 KB
Loading

0 commit comments

Comments
 (0)