codetoprompt 0.2.0__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {codetoprompt-0.2.0/codetoprompt.egg-info → codetoprompt-0.2.2}/PKG-INFO +1 -1
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/codetoprompt/cli.py +32 -8
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/codetoprompt/utils.py +0 -3
- codetoprompt-0.2.2/codetoprompt/version.py +3 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2/codetoprompt.egg-info}/PKG-INFO +1 -1
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/pyproject.toml +1 -1
- codetoprompt-0.2.0/codetoprompt/version.py +0 -1
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/LICENSE +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/MANIFEST.in +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/README.md +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/codetoprompt/__init__.py +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/codetoprompt/core.py +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/codetoprompt.egg-info/SOURCES.txt +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/codetoprompt.egg-info/dependency_links.txt +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/codetoprompt.egg-info/entry_points.txt +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/codetoprompt.egg-info/requires.txt +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/codetoprompt.egg-info/top_level.txt +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/setup.cfg +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/tests/test_cli.py +0 -0
- {codetoprompt-0.2.0 → codetoprompt-0.2.2}/tests/test_core.py +0 -0
|
@@ -4,6 +4,7 @@ import argparse
|
|
|
4
4
|
import sys
|
|
5
5
|
from pathlib import Path
|
|
6
6
|
from rich.console import Console
|
|
7
|
+
from rich.panel import Panel
|
|
7
8
|
from rich.progress import (
|
|
8
9
|
Progress,
|
|
9
10
|
SpinnerColumn,
|
|
@@ -60,17 +61,40 @@ def main(args=None):
|
|
|
60
61
|
print(f"Error: '{directory}' is not a directory")
|
|
61
62
|
return 1
|
|
62
63
|
|
|
64
|
+
console = Console()
|
|
65
|
+
|
|
66
|
+
# Show configuration summary
|
|
67
|
+
config_panel = Panel(
|
|
68
|
+
f"""Configuration:
|
|
69
|
+
Root Directory: {directory}
|
|
70
|
+
Include Patterns: ['*']
|
|
71
|
+
Exclude Patterns: []
|
|
72
|
+
Respect .gitignore: {args.respect_gitignore}
|
|
73
|
+
Show Line Numbers: {args.show_line_numbers}
|
|
74
|
+
Max Tokens: Unlimited
|
|
75
|
+
Copy to Clipboard: False""",
|
|
76
|
+
title="CodeToPrompt",
|
|
77
|
+
border_style="blue",
|
|
78
|
+
)
|
|
79
|
+
console.print(config_panel)
|
|
80
|
+
|
|
63
81
|
try:
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
82
|
+
with Progress(
|
|
83
|
+
SpinnerColumn(),
|
|
84
|
+
TextColumn("[progress.description]{task.description}"),
|
|
85
|
+
console=console,
|
|
86
|
+
) as progress:
|
|
87
|
+
task = progress.add_task("Processing files...", total=None)
|
|
88
|
+
process_files(
|
|
89
|
+
directory,
|
|
90
|
+
show_line_numbers=args.show_line_numbers,
|
|
91
|
+
respect_gitignore=args.respect_gitignore,
|
|
92
|
+
output_file=args.output,
|
|
93
|
+
count_tokens=args.count_tokens,
|
|
94
|
+
)
|
|
71
95
|
return 0
|
|
72
96
|
except Exception as e:
|
|
73
|
-
print(f"Error: {str(e)}")
|
|
97
|
+
console.print(f"[red]Error:[/red] {str(e)}")
|
|
74
98
|
return 1
|
|
75
99
|
|
|
76
100
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.2.0"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|