Greg647465374's picture
shorten the files
41c095f
{
"ast": {
"items": [
{
"use": {
"tree": {
"path": {
"ident": "dioxus",
"tree": {
"path": {
"ident": "prelude",
"tree": "*"
}
}
}
}
}
},
{
"use": {
"tree": {
"path": {
"ident": "crate",
"tree": {
"path": {
"ident": "extractor",
"tree": {
"group": [
{
"path": {
"ident": "components",
"tree": {
"path": {
"ident": "codesnippet",
"tree": {
"ident": "CodeSnippetView"
}
}
}
}
},
{
"path": {
"ident": "types",
"tree": {
"group": [
{
"ident": "CodeSnippet"
},
{
"ident": "ExtractedFile"
}
]
}
}
}
]
}
}
}
}
}
}
},
{
"fn": {
"attrs": [
{
"meta": {
"path": {
"segments": [
{
"ident": "component"
}
]
}
},
"style": "outer"
}
],
"ident": "FileResults",
"inputs": [
{
"typed": {
"pat": {
"ident": {
"ident": "file"
}
},
"ty": {
"path": {
"segments": [
{
"ident": "ExtractedFile"
}
]
}
}
}
},
{
"typed": {
"pat": {
"ident": {
"ident": "copied_snippets"
}
},
"ty": {
"path": {
"segments": [
{
"ident": "std"
},
{
"ident": "collections"
},
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"ident": "String"
}
]
}
}
}
]
}
},
"ident": "HashSet"
}
]
}
}
}
},
{
"typed": {
"pat": {
"ident": {
"ident": "on_copy"
}
},
"ty": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"tuple": {
"elems": [
{
"path": {
"segments": [
{
"ident": "String"
}
]
}
},
{
"path": {
"segments": [
{
"ident": "String"
}
]
}
}
]
}
}
}
]
}
},
"ident": "EventHandler"
}
]
}
}
}
},
{
"typed": {
"pat": {
"ident": {
"ident": "on_download"
}
},
"ty": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"tuple": {
"elems": [
{
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"ident": "CodeSnippet"
}
]
}
}
}
]
}
},
"ident": "Vec"
}
]
}
},
{
"path": {
"segments": [
{
"ident": "String"
}
]
}
}
]
}
}
}
]
}
},
"ident": "EventHandler"
}
]
}
}
}
}
],
"output": {
"path": {
"segments": [
{
"ident": "Element"
}
]
}
},
"stmts": [
{
"let": {
"init": {
"expr": {
"method_call": {
"args": [],
"method": "collect",
"receiver": {
"method_call": {
"args": [],
"method": "into_iter",
"receiver": {
"method_call": {
"args": [],
"method": "collect",
"receiver": {
"method_call": {
"args": [
{
"closure": {
"body": {
"method_call": {
"args": [],
"method": "clone",
"receiver": {
"field": {
"base": {
"path": {
"segments": [
{
"ident": "s"
}
]
}
},
"ident": "language"
}
}
}
},
"inputs": [
{
"ident": {
"ident": "s"
}
}
],
"output": null
}
}
],
"method": "map",
"receiver": {
"method_call": {
"args": [],
"method": "iter",
"receiver": {
"field": {
"base": {
"path": {
"segments": [
{
"ident": "file"
}
]
}
},
"ident": "snippets"
}
}
}
}
}
},
"turbofish": {
"args": [
{
"type": {
"path": {
"segments": [
{
"ident": "std"
},
{
"ident": "collections"
},
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": "_"
}
]
}
},
"ident": "HashSet"
}
]
}
}
}
],
"colon2_token": true
}
}
}
}
}
}
}
},
"pat": {
"type": {
"pat": {
"ident": {
"ident": "unique_languages"
}
},
"ty": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"ident": "String"
}
]
}
}
}
]
}
},
"ident": "Vec"
}
]
}
}
}
}
}
},
{
"macro": {
"delimiter": "brace",
"path": {
"segments": [
{
"ident": "rsx"
}
]
},
"tokens": [
{
"ident": "div"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "h2"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"📝 {file.name}\""
}
]
}
},
{
"ident": "if"
},
{
"punct": {
"op": "!",
"spacing": "alone"
}
},
{
"ident": "file"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "is_empty"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "div"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "class"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"lit": "\"summary-stats\""
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "p"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"📊 Found {file.snippets.len()} code snippets in {file.total_lines} lines\""
}
]
}
},
{
"ident": "p"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"🔤 Languages: {unique_languages.join(\\\", \\\")}\""
}
]
}
},
{
"ident": "div"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "class"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"lit": "\"button-group\""
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "button"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "class"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "if"
},
{
"ident": "copied_snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "contains"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"lit": "\"all_snippets\""
}
]
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"copy-btn copied\""
}
]
}
},
{
"ident": "else"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"copy-btn\""
}
]
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "onclick"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "let"
},
{
"ident": "on_copy"
},
{
"punct": {
"op": "=",
"spacing": "alone"
}
},
{
"ident": "on_copy"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ";",
"spacing": "alone"
}
},
{
"ident": "let"
},
{
"ident": "combined"
},
{
"punct": {
"op": "=",
"spacing": "alone"
}
},
{
"ident": "file"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "iter"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "map"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"punct": {
"op": "|",
"spacing": "alone"
}
},
{
"ident": "s"
},
{
"punct": {
"op": "|",
"spacing": "alone"
}
},
{
"ident": "s"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "content"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
}
]
}
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "collect"
},
{
"punct": {
"op": ":",
"spacing": "joint"
}
},
{
"punct": {
"op": ":",
"spacing": "joint"
}
},
{
"punct": {
"op": "<",
"spacing": "alone"
}
},
{
"ident": "Vec"
},
{
"punct": {
"op": "<",
"spacing": "alone"
}
},
{
"ident": "_"
},
{
"punct": {
"op": ">",
"spacing": "joint"
}
},
{
"punct": {
"op": ">",
"spacing": "alone"
}
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "join"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"lit": "\"\\n\\n\""
}
]
}
},
{
"punct": {
"op": ";",
"spacing": "alone"
}
},
{
"ident": "move"
},
{
"punct": {
"op": "|",
"spacing": "alone"
}
},
{
"ident": "_"
},
{
"punct": {
"op": "|",
"spacing": "alone"
}
},
{
"ident": "on_copy"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"ident": "combined"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"lit": "\"all_snippets\""
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "to_string"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
}
]
}
}
]
}
}
]
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "if"
},
{
"ident": "copied_snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "contains"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"lit": "\"all_snippets\""
}
]
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"✅ Copied All!\""
}
]
}
},
{
"ident": "else"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"📋 Copy All Snippets\""
}
]
}
}
]
}
},
{
"ident": "for"
},
{
"ident": "language"
},
{
"ident": "in"
},
{
"ident": "unique_languages"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "iter"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "button"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "key"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"lit": "\"{language}_download\""
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "class"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"lit": "\"download-btn\""
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "onclick"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "let"
},
{
"ident": "on_download"
},
{
"punct": {
"op": "=",
"spacing": "alone"
}
},
{
"ident": "on_download"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ";",
"spacing": "alone"
}
},
{
"ident": "let"
},
{
"ident": "snippets"
},
{
"punct": {
"op": "=",
"spacing": "alone"
}
},
{
"ident": "file"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ";",
"spacing": "alone"
}
},
{
"ident": "let"
},
{
"ident": "lang"
},
{
"punct": {
"op": "=",
"spacing": "alone"
}
},
{
"ident": "language"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ";",
"spacing": "alone"
}
},
{
"ident": "move"
},
{
"punct": {
"op": "|",
"spacing": "alone"
}
},
{
"ident": "_"
},
{
"punct": {
"op": "|",
"spacing": "alone"
}
},
{
"ident": "on_download"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"ident": "snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "lang"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
}
]
}
}
]
}
}
]
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"lit": "\"⬇️ Download {language.to_uppercase()}\""
}
]
}
}
]
}
}
]
}
}
]
}
},
{
"ident": "for"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"ident": "idx"
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "snippet"
}
]
}
},
{
"ident": "in"
},
{
"ident": "file"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "iter"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "enumerate"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "CodeSnippetView"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "key"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"lit": "\"{idx}\""
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "snippet"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "snippet"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "snippet_id"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "format"
},
{
"punct": {
"op": "!",
"spacing": "alone"
}
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"lit": "\"{}_{}\""
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "file"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "name"
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "idx"
}
]
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "is_copied"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "copied_snippets"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "contains"
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"punct": {
"op": "&",
"spacing": "alone"
}
},
{
"ident": "format"
},
{
"punct": {
"op": "!",
"spacing": "alone"
}
},
{
"group": {
"delimiter": "parenthesis",
"stream": [
{
"lit": "\"{}_{}\""
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "file"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "name"
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "idx"
}
]
}
}
]
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "on_copy"
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
}
]
}
}
]
}
}
]
}
},
{
"ident": "else"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "p"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"ℹ️ No code snippets found in this file\""
}
]
}
}
]
}
}
]
}
}
]
}
}
],
"vis": "pub"
}
}
]
},
"file_path": "src\\extractor\\components\\fileresult.rs",
"summary": {
"emoji_counts_in_strings": {
"ℹ": 1,
"✅": 1,
"⬇": 1,
"️": 2,
"📊": 1,
"📋": 1,
"📝": 1,
"🔤": 1
},
"string_literals": [
"\"📝 {file.name}\"",
"\"summary-stats\"",
"\"📊 Found {file.snippets.len()} code snippets in {file.total_lines} lines\"",
"\"🔤 Languages: {unique_languages.join(\\\", \\\")}\"",
"\"button-group\"",
"\"all_snippets\"",
"\"copy-btn copied\"",
"\"copy-btn\"",
"\"\\n\\n\"",
"\"all_snippets\"",
"\"all_snippets\"",
"\"✅ Copied All!\"",
"\"📋 Copy All Snippets\"",
"\"{language}_download\"",
"\"download-btn\"",
"\"⬇️ Download {language.to_uppercase()}\"",
"\"{idx}\"",
"\"{}_{}\"",
"\"{}_{}\"",
"\"ℹ️ No code snippets found in this file\""
],
"top_level_nodes": 1,
"total_nodes": 541,
"type_counts": {
"angle_bracketed": 6,
"args": 13,
"arguments": 6,
"attrs": 1,
"base": 2,
"body": 1,
"closure": 1,
"colon2_token": 1,
"delimiter": 49,
"elems": 2,
"expr": 1,
"field": 2,
"fn": 1,
"group": 50,
"ident": 151,
"init": 1,
"inputs": 2,
"items": 1,
"let": 1,
"lit": 20,
"macro": 1,
"meta": 1,
"method": 6,
"method_call": 6,
"op": 84,
"output": 2,
"pat": 6,
"path": 25,
"punct": 84,
"receiver": 6,
"segments": 18,
"spacing": 84,
"stmts": 1,
"stream": 48,
"style": 1,
"tokens": 1,
"tree": 9,
"tuple": 2,
"turbofish": 1,
"ty": 5,
"type": 8,
"typed": 4,
"use": 2,
"vis": 1
},
"word_counts": {
"_": 2,
"_download": 1,
"all": 2,
"all_snippets": 3,
"btn": 3,
"button": 1,
"code": 2,
"copied": 2,
"copy": 3,
"download": 2,
"file": 4,
"found": 2,
"group": 1,
"idx": 1,
"in": 2,
"join": 1,
"language": 2,
"languages": 1,
"len": 1,
"lines": 1,
"n": 2,
"name": 1,
"no": 1,
"snippets": 4,
"stats": 1,
"summary": 1,
"this": 1,
"to_uppercase": 1,
"total_lines": 1,
"unique_languages": 1,
"ℹ": 1
},
"word_emoji_counts": {
"⬜": 2,
"👥": 1,
"📏": 1
}
},
"timestamp": 1751588207
}