From 8bd9013c1898b92bbc6b3ae53c81c2da4efb7148 Mon Sep 17 00:00:00 2001 From: jknapp Date: Mon, 17 Feb 2025 09:50:51 -0800 Subject: [PATCH] Updated supported file formats --- README.md | 8 ++++++-- git-to-kb.py | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 877ebb7..86f69cc 100644 --- a/README.md +++ b/README.md @@ -15,15 +15,19 @@ A Python utility to create a knowledge base from a Git repository by importing f The utility processes the following file types: - Text files (`.txt`) -- Markdown files (`.md`) +- Markdown files (`.md`) - Python files (`.py`) - JavaScript files (`.js`) +- TypeScript files (`.ts`) +- TypeScript React files (`.tsx`) - HTML files (`.html`) - CSS files (`.css`) - JSON files (`.json`) - YAML files (`.yaml`, `.yml`) - Shell scripts (`.sh`) - Batch files (`.bat`) +- Jinja2 templates (`.j2`) +- Template files (`.tpl`) - Dockerfiles - LICENSE files @@ -84,4 +88,4 @@ This project is licensed under the terms of the MIT [LICENSE](LICENSE). ## Contributing -Feel free to open issues or submit pull requests to improve this tool. \ No newline at end of file +Feel free to open issues or submit pull requests to improve this tool. diff --git a/git-to-kb.py b/git-to-kb.py index 6838b06..a0b028a 100755 --- a/git-to-kb.py +++ b/git-to-kb.py @@ -33,7 +33,7 @@ def create_knowledge_base_from_repo(token, base_url, repo_path, kb_name, kb_purp print(f"Created knowledge base with ID: {kb_id}") # 2. Upload files and add them to knowledge base - file_types = ['*.txt', '*.md', '*.py', '*.js', '*.html', '*.css', '*.json', '*.yaml', '*.yml', '*.sh', '*.bat', 'Dockerfile', 'LICENSE'] + file_types = ['*.txt', '*.md', '*.py', '*.js', '*.html', '*.css', '*.json', '*.yaml', '*.yml', '*.sh', '*.bat', 'Dockerfile', 'LICENSE', '*.tsx', '*.j2', '*.tpl', '*.ts' ] files_processed = 0 for file_pattern in file_types: