Skip to content

Commit 09939d6

Browse files
committed
exclude ext. docs
1 parent c4283f9 commit 09939d6

File tree

3 files changed

+1140
-95
lines changed

3 files changed

+1140
-95
lines changed

docs/compile_llms_txt.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import os
2+
3+
def compile_llms_txt():
4+
# Get the docs directory path (where this script is located)
5+
docs_dir = os.path.dirname(os.path.abspath(__file__))
6+
content = ''
7+
# Define names of directories and files to exclude
8+
excluded_names = {'tool'}
9+
10+
# Change to docs directory
11+
os.chdir(docs_dir)
12+
13+
for root, _, files in os.walk('.'):
14+
# Get the last part of the current directory
15+
current_dir = os.path.basename(root)
16+
if current_dir in excluded_names:
17+
continue
18+
19+
for file in files:
20+
if file.endswith('.mdx'):
21+
if file in excluded_names:
22+
continue
23+
24+
file_path = os.path.join(root, file)
25+
relative_path = os.path.relpath(file_path, '.')
26+
27+
with open(file_path, 'r', encoding='utf-8') as f:
28+
file_content = f.read()
29+
content += f"## {relative_path}\n\n{file_content}\n\n"
30+
31+
# Write the complete content, replacing the existing file
32+
output_path = os.path.join(docs_dir, 'llms.txt')
33+
with open(output_path, 'w', encoding='utf-8') as f:
34+
f.write(content)
35+
36+
if __name__ == "__main__":
37+
compile_llms_txt()

docs/development.mdx

Lines changed: 0 additions & 95 deletions
This file was deleted.

0 commit comments

Comments
 (0)