mirror of
https://github.com/kirill-markin/repo-to-text.git
synced 2025-12-05 19:12:24 -08:00
Compare commits
4 commits
de1c84eca3
...
8a94182b3d
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8a94182b3d | ||
|
|
bcb0d82191 | ||
|
|
2807344752 | ||
|
|
3721ed45f0 |
5 changed files with 18 additions and 3 deletions
|
|
@ -1,3 +1,7 @@
|
|||
---
|
||||
alwaysApply: true
|
||||
---
|
||||
|
||||
# repo-to-text
|
||||
|
||||
## Project Overview
|
||||
1
AGENTS.md
Symbolic link
1
AGENTS.md
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.cursor/index.mdc
|
||||
1
CLAUDE.md
Symbolic link
1
CLAUDE.md
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
.cursor/index.mdc
|
||||
|
|
@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||
|
||||
[project]
|
||||
name = "repo-to-text"
|
||||
version = "0.7.0"
|
||||
version = "0.8.0"
|
||||
authors = [
|
||||
{ name = "Kirill Markin", email = "markinkirill@gmail.com" },
|
||||
]
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ Core functionality for repo-to-text
|
|||
|
||||
import os
|
||||
import subprocess
|
||||
import platform
|
||||
from typing import Tuple, Optional, List, Dict, Any, Set
|
||||
from datetime import datetime, timezone
|
||||
from importlib.machinery import ModuleSpec
|
||||
|
|
@ -36,12 +37,20 @@ def get_tree_structure(
|
|||
|
||||
def run_tree_command(path: str) -> str:
|
||||
"""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(
|
||||
['tree', '-a', '-f', '--noreport', path],
|
||||
cmd,
|
||||
stdout=subprocess.PIPE,
|
||||
stderr=subprocess.PIPE,
|
||||
text=True,
|
||||
encoding='utf-8',
|
||||
check=True
|
||||
)
|
||||
return result.stdout.decode('utf-8')
|
||||
return result.stdout
|
||||
|
||||
def filter_tree_output(
|
||||
tree_output: str,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue