Compare commits

..

No commits in common. "8a94182b3d26aa9edc76b1040c50745e3da8bb64" and "de1c84eca37e714efdc80f5f8fd30701227c9cec" have entirely different histories.

5 changed files with 3 additions and 18 deletions

View file

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

View file

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

View file

@ -1 +0,0 @@
.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.8.0" version = "0.7.0"
authors = [ authors = [
{ name = "Kirill Markin", email = "markinkirill@gmail.com" }, { name = "Kirill Markin", email = "markinkirill@gmail.com" },
] ]

View file

@ -4,7 +4,6 @@ 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
@ -37,20 +36,12 @@ 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(
cmd, ['tree', '-a', '-f', '--noreport', path],
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
text=True,
encoding='utf-8',
check=True check=True
) )
return result.stdout return result.stdout.decode('utf-8')
def filter_tree_output( def filter_tree_output(
tree_output: str, tree_output: str,