Compare commits

...

4 commits

Author SHA1 Message Date
Kirill Markin
8a94182b3d
Bump version to 0.8.0
Some checks failed
Run Tests / test (3.11) (push) Has been cancelled
Run Tests / test (3.13) (push) Has been cancelled
Run Tests / test (3.9) (push) Has been cancelled
2025-10-25 15:33:35 +02:00
Kirill Markin
bcb0d82191
refactor: reorganize cursor rules into .cursor directory
- Move cursor rules from .cursorrules to .cursor/index.mdc
- Create CLAUDE.md and AGENTS.md symlinks in project root
- Delete deprecated .cursorrules file
- Symlinks point to .cursor/index.mdc for consistent rule management
2025-10-25 15:11:43 +02:00
Kirill Markin
2807344752
Merge pull request #35 from kirill-markin/fix-issue-26-windows-tree-command
Fix tree command for Windows
2025-10-25 15:02:46 +02:00
Kirill Markin
3721ed45f0
Fix tree command for Windows (fixes #26)
- Add platform detection to run_tree_command
- Use 'cmd /c tree /a /f' syntax on Windows
- Keep 'tree -a -f --noreport' syntax on Unix/Linux/Mac
- Modernize subprocess call with text=True and encoding='utf-8'
- Add stderr=subprocess.PIPE for better error handling

All 43 tests pass successfully.
2025-10-25 15:02:18 +02:00
5 changed files with 18 additions and 3 deletions

View file

@ -1,3 +1,7 @@
---
alwaysApply: true
---
# repo-to-text # repo-to-text
## Project Overview ## Project Overview

1
AGENTS.md Symbolic link
View file

@ -0,0 +1 @@
.cursor/index.mdc

1
CLAUDE.md Symbolic link
View file

@ -0,0 +1 @@
.cursor/index.mdc

View file

@ -4,7 +4,7 @@ build-backend = "hatchling.build"
[project] [project]
name = "repo-to-text" name = "repo-to-text"
version = "0.7.0" version = "0.8.0"
authors = [ authors = [
{ name = "Kirill Markin", email = "markinkirill@gmail.com" }, { name = "Kirill Markin", email = "markinkirill@gmail.com" },
] ]

View file

@ -4,6 +4,7 @@ Core functionality for repo-to-text
import os import os
import subprocess import subprocess
import platform
from typing import Tuple, Optional, List, Dict, Any, Set from typing import Tuple, Optional, List, Dict, Any, Set
from datetime import datetime, timezone from datetime import datetime, timezone
from importlib.machinery import ModuleSpec from importlib.machinery import ModuleSpec
@ -36,12 +37,20 @@ def get_tree_structure(
def run_tree_command(path: str) -> str: def run_tree_command(path: str) -> str:
"""Run the tree command and return its output.""" """Run the tree command and return its output."""
if platform.system() == "Windows":
cmd = ["cmd", "/c", "tree", "/a", "/f", path]
else:
cmd = ["tree", "-a", "-f", "--noreport", path]
result = subprocess.run( result = subprocess.run(
['tree', '-a', '-f', '--noreport', path], cmd,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
encoding='utf-8',
check=True check=True
) )
return result.stdout.decode('utf-8') return result.stdout
def filter_tree_output( def filter_tree_output(
tree_output: str, tree_output: str,