# copyCode prototypes: 15 versions towards ThuOneCopy

> Across October and November 2024 I iterated a file-picker-to-clipboard tool through 15 versions, adding filtering and a packaged build before it became ThuOneCopy.

URL: https://thuyavan.netlify.app/projects/copycode-prototypes
Updated: 2026-10-12

- Period: 2024-10 → 2024-11
- Technologies: Python, Desktop GUI (Tk / Qt)

## Purpose

Select multiple files from a project tree and copy their contents as one block (for pasting into ChatGPT), with filtering and light code cleanup.

## Version History

Version
Date
Lines
Key functions / change

copyCode.py
10-21
267
First full UI: initUI, recursive checkboxes (add_checkbox_recursive), tree click → open_file_tab, selected list, filters (create_filters, update_filter), copy_code, process_file, extract_class_names, open_folder

copyCode2.py
10-21
111
Side experiment: pyperclip copy + cleanup (remove_multiline_comments, remove_single_line_comments, remove_imports, order_with_numbers, show_copied_code)

copyCode3.py
10-21
254
Back to the tree UI; adds close_tab

copyCode4.py
10-21
262
Refinements

copyCode5.py
10-21
288
select_files_in_folder (folder select)

copyCode6.py
10-21
282
toggle_selection_in_folder (toggle instead of select)

copyCode7.py
10-21
352
Custom checkable model (flags, data, setData, get_checked_files, clear_checked) + two-way sync (update_selected_files, on_selected_list_item_changed)

copyCode8.py
11-18
366
Adds eventFilter (keyboard / mouse handling)

copyCode_8_1.py
11-18
380
8.x branch tweaks

copyCode_8_2.py
11-18
383
8.x tweaks

copyCode_8_3.py
11-18
403
Most complete 8.x

copyCode9.py
11-18
355
Alternative without eventFilter

copyCode10.py
11-18
354
Variant of 9

exe/ThuOneCopy_v1.py
11-18
403
Release candidate (= the 8_3 feature set) + setup.py for packaging → first exe

Best / latest: exe/ThuOneCopy_v1.py (equivalent to copyCode_8_3.py). copyCode5.txt is a text copy of v5; note.txt / note0.txt hold the prompts.

## How it works



## Techniques

Qt model / view with custom flags / setData check states; recursive tree traversal; regex comment / import stripping; event filters; iterative prototyping with LLM assistance.
