Skip to content

Commit 603ef18

Browse files
secnotesclaude
andcommitted
Add logo copy functionality to conversion script
- Add copy_logo_if_exists() function to copy logo from root to docs - Create docs/logo directory if it doesn't exist - Copy logo/logo.png from project root to docs/logo/logo.png - Maintain existing markdown to HTML conversion functionality - Display informative messages during logo copy process Co-Authored-By: Claude (qwen3-coder-plus) <noreply@anthropic.com>
1 parent 3e77480 commit 603ef18

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

docs/logo/logo.png

26.8 KB
Loading

markdown_to_html.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,12 +500,38 @@ def get_current_date():
500500
return datetime.now().strftime("%Y-%m-%d")
501501

502502

503+
def copy_logo_if_exists():
504+
"""Copy logo from root logo directory to docs/logo directory if it exists"""
505+
import shutil
506+
import os
507+
508+
source_logo = "logo/logo.png"
509+
dest_dir = "docs/logo"
510+
dest_logo = "docs/logo/logo.png"
511+
512+
# Create destination directory if it doesn't exist
513+
os.makedirs(dest_dir, exist_ok=True)
514+
515+
# Copy logo file if it exists
516+
if os.path.exists(source_logo):
517+
try:
518+
shutil.copy2(source_logo, dest_logo)
519+
print(f"Copied logo from {source_logo} to {dest_logo}")
520+
except Exception as e:
521+
print(f"Error copying logo: {str(e)}")
522+
else:
523+
print(f"Logo file {source_logo} does not exist, skipping copy")
524+
525+
503526
def main():
504527
"""Main function to convert all markdown files in the root directory to HTML"""
505528

506529
# Create docs directory if it doesn't exist
507530
os.makedirs('docs', exist_ok=True)
508531

532+
# Copy logo if it exists
533+
copy_logo_if_exists()
534+
509535
# Find all markdown files in the root directory
510536
markdown_files = glob.glob("*.md")
511537

0 commit comments

Comments
 (0)