README, config file

This commit is contained in:
2026-07-23 23:48:05 -07:00
parent 504794f9a8
commit 05e70a7fc4
7 changed files with 150 additions and 36 deletions
+1 -14
View File
@@ -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]]:
"""