MCPcopy Create free account
hub / github.com/NanmiCoder/MediaCrawler / generate_copyright_header

Function generate_copyright_header

tools/file_header_manager.py:67–87  ·  view source on GitHub ↗

Generate copyright declaration header Args: relative_path: File path relative to project root Returns: Formatted copyright declaration string

(relative_path: str)

Source from the content-addressed store, hash-verified

65
66
67def generate_copyright_header(relative_path: str) -> str:
68 """
69 Generate copyright declaration header
70
71 Args:
72 relative_path: File path relative to project root
73
74 Returns:
75 Formatted copyright declaration string
76 """
77 file_url = f"{REPO_URL}/blob/main/{relative_path}"
78
79 header = f"""# Copyright (c) {COPYRIGHT_YEAR} {EMAIL}
80#
81# This file is part of MediaCrawler project.
82# Repository: {file_url}
83# GitHub: {GITHUB_PROFILE}
84# Licensed under {LICENSE_TYPE}
85#"""
86
87 return header
88
89
90def has_copyright_header(content: str) -> bool:

Callers 1

process_fileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected