Skip to content

Commit 448a16a

Browse files
update output format (#3)
1 parent 9f49f33 commit 448a16a

File tree

2 files changed

+2
-14
lines changed

2 files changed

+2
-14
lines changed

README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ Each file in the combined output is separated by:
2424
```
2525
<file
2626
path="file pathname in the repository"
27-
title="File title"
28-
type="markdown"
29-
word_count="number"
3027
>
3128
```
3229

src/index.js

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ async function processFiles(files, baseDir, repoInfo) {
6868
This document is a compilation of markdown files from a GitHub repository: ${repoInfo.username}/${repoInfo.repo}.
6969
Each <file> tag contains:
7070
- path: Relative file path in the repository
71-
- title: First heading or 'Untitled'
72-
- word_count: Number of words in the file
7371
- Original markdown content intact
7472
7573
Purpose: Use this structured format to understand the repository's documentation structure and content relationships.
@@ -78,15 +76,8 @@ Purpose: Use this structured format to understand the repository's documentation
7876
for (const file of files) {
7977
const relativePath = path.relative(baseDir, file);
8078
const content = await fs.readFile(file, 'utf-8');
81-
const title = content.split('\n')[0].replace(/^#\s*/, '') || 'Untitled';
82-
const wordCount = content.split(/\s+/).length;
83-
84-
output += `<file
85-
path="${relativePath}"
86-
title="${title}"
87-
type="markdown"
88-
word_count="${wordCount}"
89-
>\n`;
79+
80+
output += `<file path="${relativePath}">\n`;
9081
output += content.trim();
9182
output += '\n</file>\n\n';
9283
}

0 commit comments

Comments
 (0)