codetoprompt 0.2.3__tar.gz → 0.2.4__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.3
3
+ Version: 0.2.4
4
4
  Summary: Convert your codebase into a single LLM prompt
5
5
  Author-email: Yash Bhaskar <yash9439@gmail.com>
6
6
  License: MIT
@@ -113,6 +113,7 @@ def process_files(
113
113
  respect_gitignore: bool = True,
114
114
  output_file: Optional[str] = None,
115
115
  count_tokens: bool = False,
116
+ copy_to_clipboard: bool = True,
116
117
  ) -> None:
117
118
  """Process all files in a directory and generate a prompt.
118
119
 
@@ -122,6 +123,7 @@ def process_files(
122
123
  respect_gitignore: Whether to respect .gitignore rules
123
124
  output_file: Optional output file path
124
125
  count_tokens: Whether to count tokens in the output
126
+ copy_to_clipboard: Whether to copy the prompt to clipboard
125
127
  """
126
128
  # Get git info if needed
127
129
  git_info = get_git_info(directory) if respect_gitignore else None
@@ -145,8 +147,19 @@ def process_files(
145
147
  token_count = len(prompt.split())
146
148
  print(f"\nToken count: {token_count}")
147
149
 
150
+ # Copy to clipboard if requested
151
+ if copy_to_clipboard:
152
+ try:
153
+ import pyperclip
154
+ pyperclip.copy(prompt)
155
+ print("\n✓ Prompt copied to clipboard")
156
+ except Exception as e:
157
+ print(f"\nWarning: Could not copy to clipboard: {e}")
158
+
148
159
  # Save to file or print to stdout
149
160
  if output_file:
150
161
  with open(output_file, "w", encoding="utf-8") as f:
151
162
  f.write(prompt)
152
163
  print(f"\nPrompt saved to: {output_file}")
164
+ else:
165
+ print(prompt)
@@ -1,3 +1,3 @@
1
1
  """Version information."""
2
2
 
3
- __version__ = "0.2.3"
3
+ __version__ = "0.2.4"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codetoprompt
3
- Version: 0.2.3
3
+ Version: 0.2.4
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.3"
7
+ version = "0.2.4"
8
8
  description = "Convert your codebase into a single LLM prompt"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.8"
File without changes
File without changes
File without changes
File without changes