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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codetoprompt
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Convert your codebase into a single LLM prompt
5
5
  Author-email: Yash Bhaskar <yash9439@gmail.com>
6
6
  License: MIT
@@ -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
- process_files(
65
- directory,
66
- show_line_numbers=args.show_line_numbers,
67
- respect_gitignore=args.respect_gitignore,
68
- output_file=args.output,
69
- count_tokens=args.count_tokens,
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
 
@@ -150,6 +150,3 @@ def process_files(
150
150
  with open(output_file, "w", encoding="utf-8") as f:
151
151
  f.write(prompt)
152
152
  print(f"\nPrompt saved to: {output_file}")
153
- else:
154
- print("\nGenerated Prompt:")
155
- print(prompt)
@@ -0,0 +1,3 @@
1
+ """Version information."""
2
+
3
+ __version__ = "0.2.2"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codetoprompt
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: Convert your codebase into a single LLM prompt
5
5
  Author-email: Yash Bhaskar <yash9439@gmail.com>
6
6
  License: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "codetoprompt"
7
- version = "0.2.0"
7
+ version = "0.2.2"
8
8
  description = "Convert your codebase into a single LLM prompt"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
@@ -1 +0,0 @@
1
- __version__ = "0.2.0"
File without changes
File without changes
File without changes
File without changes