MCPcopy Create free account
hub / github.com/smallfawn/QLScriptPublic / encode_rfc2047

Function encode_rfc2047

daily/notify.py:809–813  ·  view source on GitHub ↗

将文本编码为符合 RFC 2047 标准的格式

(text: str)

Source from the content-addressed store, hash-verified

807 """
808
809 def encode_rfc2047(text: str) -> str:
810 """将文本编码为符合 RFC 2047 标准的格式"""
811 encoded_bytes = base64.b64encode(text.encode("utf-8"))
812 encoded_str = encoded_bytes.decode("utf-8")
813 return f"=?utf-8?B?{encoded_str}?="
814
815 if not push_config.get("NTFY_TOPIC"):
816 return

Callers 1

ntfyFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected