Skip to content
Open
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions gpt_repository_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import os
import sys
import fnmatch
import pyperclip

def get_ignore_list(ignore_file_path):
ignore_list = []
Expand Down Expand Up @@ -58,4 +59,11 @@ def process_repository(repo_path, ignore_list, output_file):
with open('output.txt', 'a') as output_file:
output_file.write("--END--")
print("Repository contents written to output.txt.")

# Copy the output to the clipboard if the -c flag is provided
if "-c" in sys.argv:
with open('output.txt', 'r') as output_file:
clipboard_contents = output_file.read()
pyperclip.copy(clipboard_contents)
print("Repository contents copied to clipboard.")

1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pyperclip