Last active
December 9, 2025 04:45
-
-
Save 2minchul/fa6758044229a6555de942345cfc5330 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import base64 | |
| import pyperclip | |
| target_file_path = r'C:\Users\user\Desktop\project.zip' | |
| def chunks(lst, n): | |
| for i in range(0, len(lst), n): | |
| yield lst[i:i+n] | |
| if __name__ == '__main__': | |
| with open(target_file_path, "rb") as f: | |
| b = f.read() | |
| b64 = base64.b64encode(b).decode('charmap') | |
| chunksize = 3145728 | |
| b64_chunks = list(chunks(b64, chunksize)) | |
| for idx, chunk in enumerate(b64_chunks): | |
| print("chunk", idx+1, "/", len(b64_chunks)) | |
| pyperclip.copy(chunk) | |
| if len(b64_chunks) == idx+1: | |
| break | |
| input("Press Enter too continue...") |
Author
2minchul
commented
Dec 9, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment