Copyright | (c) Fuzz Leonard 2025 |
---|---|
License | MIT |
Maintainer | cyborg@bionicfuzz.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Clod.FileSystem.Transformations
Description
This module handles special file type transformations required for Claude AI compatibility. It contains transformations like SVG to XML conversion that are required due to external constraints from Claude's Project Knowledge system, as well as path flattening and sanitization functions for improved compatibility.
Note: These transformations exist solely due to limitations in Claude's file format support and may be removed in future versions if those limitations are lifted.
Synopsis
- transformFilename :: String -> String -> String
- flattenPath :: FilePath -> FilePath
- sanitizeFilename :: FilePath -> FilePath
- transformFileContent :: FileReadCap -> FileWriteCap -> (ByteString -> Text) -> FilePath -> FilePath -> ClodM ()
Documentation
flattenPath :: FilePath -> FilePath Source #
Flatten a path by removing directory separators and replacing them This makes paths suitable for flat storage
sanitizeFilename :: FilePath -> FilePath Source #
Sanitize a filename by removing special characters This ensures filenames are valid across platforms
Arguments
:: FileReadCap | |
-> FileWriteCap | |
-> (ByteString -> Text) | Transformation function |
-> FilePath | |
-> FilePath | |
-> ClodM () |
Transform file content for Claude compatibility This function is used for special file types that need transformation