MCPcopy Create free account
hub / github.com/Bleemsys/Artisan-Core / copy_json

Method copy_json

AGUI/JSONtreeview.py:154–163  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

152 self.tree.move(selected_item, parent, next_index)
153
154 def copy_json(self):
155 try:
156 selected_item = self.tree.selection()[0] # Get selected item
157 item_data = self.tree.item(selected_item)
158 key = item_data['text']
159 json_to_copy = json.dumps({key: self.extract_treeview_data(selected_item)}, indent=4)
160 self.root.clipboard_clear()
161 self.root.clipboard_append(json_to_copy)
162 except:
163 pass
164
165 def paste_json(self):
166 selected_item = self.tree.selection()[0] if self.tree.selection() else ''

Callers

nothing calls this directly

Calls 1

extract_treeview_dataMethod · 0.95

Tested by

no test coverage detected