README, config file
This commit is contained in:
+1
-14
@@ -3,6 +3,7 @@ import datetime
|
||||
from pathlib import Path
|
||||
from typing import List, Dict, Any, Optional
|
||||
|
||||
|
||||
class ToolError(Exception):
|
||||
"""Custom exception for tool-related errors to be caught by the MCP server."""
|
||||
pass
|
||||
@@ -39,20 +40,6 @@ def format_relative_time(timestamp: float) -> str:
|
||||
dt = datetime.datetime.fromtimestamp(timestamp)
|
||||
return dt.strftime('%Y-%m-%d')
|
||||
|
||||
# Cross-platform font candidates
|
||||
# ImageFont.truetype can often find these by name on Windows,
|
||||
# or we can provide paths for Linux.
|
||||
COMMON_FONTS = [
|
||||
# Linux paths
|
||||
"/usr/share/fonts/truetype/dejavu/DejaVuSans-Bold.ttf",
|
||||
"/usr/share/fonts/truetype/liberation/LiberationSans-Bold.ttf",
|
||||
"/usr/share/fonts/truetype/freefont/FreeSansBold.ttf",
|
||||
# Windows filenames (Pillow often finds these in the system path)
|
||||
"arialbd.ttf",
|
||||
"calibrib.ttf",
|
||||
"verdanab.ttf",
|
||||
"tahomabd.ttf",
|
||||
]
|
||||
|
||||
def get_file_info_list(path: Path, extensions: Optional[tuple] = None) -> List[Dict[str, Any]]:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user