add timestamp to dirmd files

This commit is contained in:
2026-09-02 10:39:55 +01:00
parent b1dd808d1e
commit 89b7eb78a7
2 changed files with 21 additions and 8 deletions
+8 -5
View File
@@ -142,6 +142,7 @@ Example output with `dirmd -o docs.md ~/repos/myproject --vertical-slices`:
Output is designed for RAG ingestion and LLM context windows, not human presentation:
- **ISO 8601 Timestamp**: Added as a metadata line (`> Generated: ...`) immediately after the H1 header for every new file created.
- **ASCII tree format** (`+-` instead of Unicode box-drawing) to reduce token overhead
- **Explicit file delimiters**: `--- FILE: ./path (bytes, lines) ---` and `--- END FILE ---`
- **Document type markers**: `[ROOT]` and `[SLICE]` in H1 headers
@@ -218,15 +219,17 @@ For full documentation on the Proton Drive CLI, including installation, authenti
Produces markdown with:
1. Absolute path as H1 header with `[ROOT]` or `[SLICE]` marker
2. ASCII directory tree (indented with `+-` and `|` characters)
3. Vertical slices index table (sliced mode only)
4. All text files with content in fenced code blocks
5. Explicit `--- FILE: ---` and `--- END FILE ---` delimiters with byte and line counts
6. Language detection from file extensions
2. **Timestamp metadata line** (ISO 8601) immediately after the H1 header (only for new files)
3. ASCII directory tree (indented with `+-` and `|` characters)
4. Vertical slices index table (sliced mode only)
5. All text files with content in fenced code blocks
6. Explicit `--- FILE: ---` and `--- END FILE ---` delimiters with byte and line counts
7. Language detection from file extensions
Example output structure (non-sliced mode):
# /home/user/repos/myproject [ROOT]
> Generated: 2026-09-02T14:30:00Z
## Directory Tree