Greg647465374's picture
shorten the files
41c095f
{
"ast": {
"items": [
{
"use": {
"tree": {
"path": {
"ident": "crate",
"tree": {
"path": {
"ident": "extractor",
"tree": {
"group": [
{
"path": {
"ident": "components",
"tree": {
"group": [
{
"path": {
"ident": "appheader",
"tree": {
"ident": "ExtractorAppHeader"
}
}
},
{
"path": {
"ident": "clearbutton",
"tree": {
"ident": "ClearButton"
}
}
},
{
"path": {
"ident": "dropzone",
"tree": {
"ident": "DropZone"
}
}
},
{
"path": {
"ident": "filedisplay",
"tree": {
"ident": "FileDisplay"
}
}
},
{
"path": {
"ident": "fileinput",
"tree": {
"ident": "FileInput"
}
}
},
{
"path": {
"ident": "progress",
"tree": {
"ident": "ProcessingIndicator"
}
}
},
{
"path": {
"ident": "welcome",
"tree": {
"ident": "WelcomeMessage"
}
}
}
]
}
}
},
{
"path": {
"ident": "model",
"tree": {
"path": {
"ident": "extract",
"tree": {
"ident": "process_file_engine"
}
}
}
}
},
{
"path": {
"ident": "styles",
"tree": {
"ident": "STYLE"
}
}
},
{
"path": {
"ident": "system",
"tree": {
"path": {
"ident": "clipboard",
"tree": {
"group": [
{
"ident": "copy_all_snippets_combined"
},
{
"ident": "copy_to_clipboard"
}
]
}
}
}
}
},
{
"path": {
"ident": "types",
"tree": {
"group": [
{
"ident": "CodeSnippet"
},
{
"ident": "ExtractedFile"
},
{
"ident": "ProcessingFile"
}
]
}
}
}
]
}
}
}
}
}
}
},
{
"use": {
"tree": {
"path": {
"ident": "dioxus",
"tree": {
"path": {
"ident": "prelude",
"tree": "*"
}
}
}
}
}
},
{
"use": {
"tree": {
"path": {
"ident": "dioxus",
"tree": {
"path": {
"ident": "html",
"tree": {
"ident": "FileEngine"
}
}
}
}
}
}
},
{
"use": {
"tree": {
"path": {
"ident": "dioxus_html",
"tree": {
"ident": "HasFileData"
}
}
}
}
},
{
"use": {
"tree": {
"path": {
"ident": "std",
"tree": {
"path": {
"ident": "sync",
"tree": {
"ident": "Arc"
}
}
}
}
}
}
},
{
"fn": {
"attrs": [
{
"meta": {
"path": {
"segments": [
{
"ident": "component"
}
]
}
},
"style": "outer"
}
],
"ident": "MarkdownCodeExtractor",
"inputs": [],
"output": {
"path": {
"segments": [
{
"ident": "Element"
}
]
}
},
"stmts": [
{
"let": {
"init": {
"expr": {
"call": {
"args": [
{
"closure": {
"body": {
"cast": {
"expr": {
"call": {
"args": [],
"func": {
"path": {
"segments": [
{
"ident": "Vec"
},
{
"ident": "new"
}
]
}
}
}
},
"ty": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"ident": "ExtractedFile"
}
]
}
}
}
]
}
},
"ident": "Vec"
}
]
}
}
}
},
"inputs": [],
"output": null
}
}
],
"func": {
"path": {
"segments": [
{
"ident": "use_signal"
}
]
}
}
}
}
},
"pat": {
"ident": {
"ident": "files"
}
}
}
},
{
"let": {
"init": {
"expr": {
"call": {
"args": [
{
"closure": {
"body": {
"path": {
"segments": [
{
"ident": "None"
}
]
}
},
"inputs": [],
"output": null
}
}
],
"func": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"ident": "ProcessingFile"
}
]
}
}
}
]
}
},
"ident": "Option"
}
]
}
}
}
],
"colon2_token": true
}
},
"ident": "use_signal"
}
]
}
}
}
}
},
"pat": {
"ident": {
"ident": "processing_file"
}
}
}
},
{
"let": {
"init": {
"expr": {
"call": {
"args": [
{
"closure": {
"body": {
"lit": {
"bool": false
}
},
"inputs": [],
"output": null
}
}
],
"func": {
"path": {
"segments": [
{
"ident": "use_signal"
}
]
}
}
}
}
},
"pat": {
"ident": {
"ident": "hovered"
}
}
}
},
{
"let": {
"init": {
"expr": {
"call": {
"args": [
{
"closure": {
"body": {
"cast": {
"expr": {
"call": {
"args": [],
"func": {
"path": {
"segments": [
{
"ident": "std"
},
{
"ident": "collections"
},
{
"ident": "HashSet"
},
{
"ident": "new"
}
]
}
}
}
},
"ty": {
"path": {
"segments": [
{
"ident": "std"
},
{
"ident": "collections"
},
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"ident": "String"
}
]
}
}
}
]
}
},
"ident": "HashSet"
}
]
}
}
}
},
"inputs": [],
"output": null
}
}
],
"func": {
"path": {
"segments": [
{
"ident": "use_signal"
}
]
}
}
}
}
},
"pat": {
"ident": {
"ident": "copied_snippets"
}
}
}
},
{
"let": {
"init": {
"expr": {
"closure": {
"body": {
"block": {
"stmts": [
{
"expr": [
{
"call": {
"args": [
{
"path": {
"segments": [
{
"ident": "text"
}
]
}
},
{
"path": {
"segments": [
{
"ident": "snippet_id"
}
]
}
},
{
"path": {
"segments": [
{
"ident": "copied_snippets"
}
]
}
}
],
"func": {
"path": {
"segments": [
{
"ident": "copy_to_clipboard"
}
]
}
}
}
},
true
]
}
]
}
},
"inputs": [
{
"type": {
"pat": {
"tuple": {
"elems": [
{
"ident": {
"ident": "text"
}
},
{
"ident": {
"ident": "snippet_id"
}
}
]
}
},
"ty": {
"tuple": {
"elems": [
{
"path": {
"segments": [
{
"ident": "String"
}
]
}
},
{
"path": {
"segments": [
{
"ident": "String"
}
]
}
}
]
}
}
}
}
],
"move": true,
"output": null
}
}
},
"pat": {
"ident": {
"ident": "copy_to_clipboard"
}
}
}
},
{
"let": {
"init": {
"expr": {
"closure": {
"body": {
"block": {
"stmts": [
{
"expr": [
{
"call": {
"args": [
{
"path": {
"segments": [
{
"ident": "snippets"
}
]
}
},
{
"path": {
"segments": [
{
"ident": "copied_snippets"
}
]
}
}
],
"func": {
"path": {
"segments": [
{
"ident": "copy_all_snippets_combined"
}
]
}
}
}
},
true
]
}
]
}
},
"inputs": [
{
"type": {
"pat": {
"ident": {
"ident": "snippets"
}
},
"ty": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"path": {
"segments": [
{
"ident": "CodeSnippet"
}
]
}
}
}
]
}
},
"ident": "Vec"
}
]
}
}
}
}
],
"move": true,
"output": null
}
}
},
"pat": {
"ident": {
"ident": "copy_all_snippets"
}
}
}
},
{
"let": {
"init": {
"expr": {
"closure": {
"body": {
"async": {
"move": true,
"stmts": [
{
"expr": [
{
"await": {
"base": {
"call": {
"args": [
{
"path": {
"segments": [
{
"ident": "file_engine"
}
]
}
},
{
"path": {
"segments": [
{
"ident": "files"
}
]
}
},
{
"path": {
"segments": [
{
"ident": "processing_file"
}
]
}
}
],
"func": {
"path": {
"segments": [
{
"ident": "process_file_engine"
}
]
}
}
}
}
}
},
true
]
}
]
}
},
"inputs": [
{
"type": {
"pat": {
"ident": {
"ident": "file_engine"
}
},
"ty": {
"path": {
"segments": [
{
"arguments": {
"angle_bracketed": {
"args": [
{
"type": {
"trait_object": {
"bounds": [
{
"trait": {
"path": {
"segments": [
{
"ident": "FileEngine"
}
]
}
}
}
],
"dyn": true
}
}
}
]
}
},
"ident": "Arc"
}
]
}
}
}
}
],
"move": true,
"output": null
}
}
},
"pat": {
"ident": {
"ident": "read_files"
}
}
}
},
{
"let": {
"init": {
"expr": {
"closure": {
"body": {
"async": {
"move": true,
"stmts": [
{
"expr": [
{
"if": {
"cond": {
"let": {
"expr": {
"method_call": {
"args": [],
"method": "files",
"receiver": {
"path": {
"segments": [
{
"ident": "evt"
}
]
}
}
}
},
"pat": {
"tuple_struct": {
"elems": [
{
"ident": {
"ident": "file_engine"
}
}
],
"path": {
"segments": [
{
"ident": "Some"
}
]
}
}
}
}
},
"then_branch": [
{
"expr": [
{
"await": {
"base": {
"call": {
"args": [
{
"path": {
"segments": [
{
"ident": "file_engine"
}
]
}
}
],
"func": {
"path": {
"segments": [
{
"ident": "read_files"
}
]
}
}
}
}
}
},
true
]
}
]
}
},
false
]
}
]
}
},
"inputs": [
{
"type": {
"pat": {
"ident": {
"ident": "evt"
}
},
"ty": {
"path": {
"segments": [
{
"ident": "FormEvent"
}
]
}
}
}
}
],
"move": true,
"output": null
}
}
},
"pat": {
"ident": {
"ident": "upload_files"
}
}
}
},
{
"let": {
"init": {
"expr": {
"closure": {
"body": {
"block": {
"stmts": [
{
"let": {
"init": {
"expr": {
"method_call": {
"args": [],
"method": "clone",
"receiver": {
"path": {
"segments": [
{
"ident": "read_files"
}
]
}
}
}
}
},
"pat": {
"ident": {
"ident": "read_files_clone"
}
}
}
},
{
"expr": [
{
"call": {
"args": [
{
"async": {
"move": true,
"stmts": [
{
"expr": [
{
"if": {
"cond": {
"let": {
"expr": {
"method_call": {
"args": [],
"method": "files",
"receiver": {
"path": {
"segments": [
{
"ident": "evt"
}
]
}
}
}
},
"pat": {
"tuple_struct": {
"elems": [
{
"ident": {
"ident": "file_engine"
}
}
],
"path": {
"segments": [
{
"ident": "Some"
}
]
}
}
}
}
},
"then_branch": [
{
"expr": [
{
"await": {
"base": {
"call": {
"args": [
{
"path": {
"segments": [
{
"ident": "file_engine"
}
]
}
}
],
"func": {
"path": {
"segments": [
{
"ident": "read_files_clone"
}
]
}
}
}
}
}
},
true
]
}
]
}
},
false
]
}
]
}
}
],
"func": {
"path": {
"segments": [
{
"ident": "spawn"
}
]
}
}
}
},
true
]
}
]
}
},
"inputs": [
{
"type": {
"pat": {
"ident": {
"ident": "evt"
}
},
"ty": {
"path": {
"segments": [
{
"ident": "DragEvent"
}
]
}
}
}
}
],
"move": true,
"output": null
}
}
},
"pat": {
"ident": {
"ident": "on_drop"
}
}
}
},
{
"expr": [
{
"method_call": {
"args": [
{
"closure": {
"body": {
"block": {
"stmts": [
{
"macro": {
"delimiter": "brace",
"path": {
"segments": [
{
"ident": "rsx"
}
]
},
"tokens": [
{
"ident": "style"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"lit": "\"{STYLE}\""
}
]
}
},
{
"ident": "div"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "class"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"lit": "\"code-extractor\""
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "ExtractorAppHeader"
},
{
"group": {
"delimiter": "brace",
"stream": []
}
},
{
"ident": "ClearButton"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "files"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "files"
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "copied_snippets"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "copied_snippets"
}
]
}
},
{
"ident": "FileInput"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "upload_files"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "upload_files"
}
]
}
},
{
"ident": "DropZone"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "hovered"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "hovered"
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "read_files"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "read_files"
}
]
}
},
{
"ident": "ProcessingIndicator"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "processing_file"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "processing_file"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
}
]
}
},
{
"ident": "for"
},
{
"ident": "file"
},
{
"ident": "in"
},
{
"ident": "files_vec"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "iter"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "FileDisplay"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "file"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "file"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "clone"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "copied_snippets"
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "copy_all_snippets"
},
{
"punct": {
"op": ",",
"spacing": "alone"
}
},
{
"ident": "copy_to_clipboard"
}
]
}
}
]
}
},
{
"ident": "if"
},
{
"ident": "files_vec"
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "is_empty"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": "&",
"spacing": "joint"
}
},
{
"punct": {
"op": "&",
"spacing": "alone"
}
},
{
"ident": "processing_file"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"punct": {
"op": ".",
"spacing": "alone"
}
},
{
"ident": "is_none"
},
{
"group": {
"delimiter": "parenthesis",
"stream": []
}
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "WelcomeMessage"
},
{
"group": {
"delimiter": "brace",
"stream": [
{
"ident": "show"
},
{
"punct": {
"op": ":",
"spacing": "alone"
}
},
{
"ident": "true"
}
]
}
}
]
}
}
]
}
}
]
}
}
]
}
},
"inputs": [
{
"ident": {
"ident": "files_vec"
}
}
],
"output": null
}
}
],
"method": "with",
"receiver": {
"path": {
"segments": [
{
"ident": "files"
}
]
}
}
}
},
false
]
}
],
"vis": "pub"
}
}
]
},
"file_path": "src\\extractor\\components\\extractor.rs",
"summary": {
"emoji_counts_in_strings": {},
"string_literals": [
"\"{STYLE}\"",
"\"code-extractor\""
],
"top_level_nodes": 1,
"total_nodes": 544,
"type_counts": {
"angle_bracketed": 6,
"args": 22,
"arguments": 6,
"async": 3,
"attrs": 1,
"await": 3,
"base": 3,
"block": 4,
"body": 10,
"bool": 1,
"bounds": 1,
"call": 12,
"cast": 2,
"closure": 10,
"colon2_token": 1,
"cond": 2,
"delimiter": 18,
"dyn": 1,
"elems": 4,
"expr": 23,
"fn": 1,
"func": 12,
"group": 21,
"ident": 171,
"if": 2,
"init": 10,
"inputs": 11,
"items": 1,
"let": 12,
"lit": 3,
"macro": 1,
"meta": 1,
"method": 4,
"method_call": 4,
"move": 8,
"op": 21,
"output": 11,
"pat": 17,
"path": 69,
"punct": 21,
"receiver": 4,
"segments": 46,
"spacing": 21,
"stmts": 8,
"stream": 17,
"style": 1,
"then_branch": 2,
"tokens": 1,
"trait": 1,
"trait_object": 1,
"tree": 28,
"tuple": 2,
"tuple_struct": 2,
"ty": 7,
"type": 11,
"use": 5,
"vis": 1
},
"word_counts": {
"code": 1,
"extractor": 1,
"style": 1
},
"word_emoji_counts": {
"🎨": 1
}
},
"timestamp": 1751588244
}