{"id":27953440,"url":"https://github.com/zjzmisaka/datatransformer","last_synced_at":"2026-05-12T07:38:47.297Z","repository":{"id":185592463,"uuid":"673772774","full_name":"ZjzMisaka/DataTransformer","owner":"ZjzMisaka","description":"Perform batch reading, analysis, and output operations of CSV by executing pre-written c# scripts.","archived":false,"fork":false,"pushed_at":"2024-03-04T14:53:01.000Z","size":403,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-07T17:11:23.437Z","etag":null,"topics":["csharp","csv","dotnet","mvvm","wpf"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ZjzMisaka.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-08-02T11:43:57.000Z","updated_at":"2023-08-03T12:58:52.000Z","dependencies_parsed_at":"2023-11-11T17:23:52.898Z","dependency_job_id":"8923c647-ecdc-4680-850e-6ff7abe3cb31","html_url":"https://github.com/ZjzMisaka/DataTransformer","commit_stats":null,"previous_names":["zjzmisaka/datatransformer"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/ZjzMisaka/DataTransformer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZjzMisaka%2FDataTransformer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZjzMisaka%2FDataTransformer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZjzMisaka%2FDataTransformer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZjzMisaka%2FDataTransformer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ZjzMisaka","download_url":"https://codeload.github.com/ZjzMisaka/DataTransformer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ZjzMisaka%2FDataTransformer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32929255,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-11T17:09:15.040Z","status":"online","status_checked_at":"2026-05-12T02:00:06.338Z","response_time":102,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["csharp","csv","dotnet","mvvm","wpf"],"created_at":"2025-05-07T17:11:18.972Z","updated_at":"2026-05-12T07:38:47.282Z","avatar_url":"https://github.com/ZjzMisaka.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DataTransformer\n![ICON](https://raw.githubusercontent.com/ZjzMisaka/DataTransformer/main/DataTransformer/DataTransformer.ico)  \nPerform batch reading, analysis, and output operations of CSV by executing pre-written c# scripts.  \n[中文ReadMe](README_zh-CN.md) | [日本語ReadMe](README_ja-JP.md)  \n\n### Multi-language\n- [x] 简体中文\n- [x] 日本語\n- [x] English\n\n### Main interface\n- Select retrieval information and processing logic (plug-in) through the drop-down box, make sure they are correspond one by one. \n- Can set incoming parameters, set search root directory and default output directory, output file name. \n- There are two execution modes: sequential execution and simultaneous execution. \n- The above content can be automatically filled in by selecting a saved rule from the rule drop-down box. \n    - After selecting a rule, you can set monitoring to monitor some folders and files, and automatically execute this rule when there is a change. \n\n### Search information setting interface\n**Used to find the specified CSV file in the specified path**\n- The search method can be selected all, complete match, partial contain and regular expression. \n- Set the format of the input CSV\n    - Header list\n        - If it is blank or the quantity does not match the actual number of columns, use the index as the key for the script input parameters\n        - If the quantity matches the actual number of columns, use the actual column name as the key for the script input parameters. However, if the header list contains blanks, use the index as the key for the corresponding column's script input parameters\n    - Column separator\n    - Whether to use double quotes\n    - Whether to display the header row\n    - Encoding of input file\n\n### Processing logic (plug-in coding) interface\n**Used to set the processing logic for a certain type of CSV file and the output logic after processing**\n- Write code in the editor, and it will be executed in sequence during operation.\n- Parameters can be set, plug-in users can edit the parameters in the main interface, and pass them to the code to use at runtime.  \n- Parameter description and running log output can be multilingualized. \n- Set the format of the output CSV\n    - Header list\n    - Column separator\n    - Whether to use double quotes\n    - Whether to display the header row\n    - Encoding of output file\n\n#### Coding related\n- Automatic completion and coloring throughout the process, you can add dll files to the Dlls folder by yourself, and you can directly reference them after adding. \n- Can use additional provided functions and properties to perform on-the-fly. \n    - Real-time output of Log in the Log area of the main interface. \n    - Hang and wait, read user input. \n- When a compilation error or a running error occurs, the relevant debugging information will appear in the log area at the bottom of the main interface. \n\n##### GlobalDic (static class)\n```c#\n// ---- Save data function ----\n// Save data.\nvoid SetObj(string key, object value);\n// Check if key is exist.\nbool ContainsKey(string key)\n// Get data.\nobject GetObj(string key)\n// Reset all data.\nvoid Reset()\n```\n\n##### Logger (static class)\n```c#\n// ---- Output Log function ----\n// Depending on the output log type, there will be different coloring distinctions.\nvoid Info(string info);\nvoid Warn(string warn);\nvoid Error(string error);\nvoid Print(string str);\n\n// ---- Whether to warn when a function is not found ----\nbool IsOutputMethodNotFoundWarning { get =\u003e isOutputMethodNotFoundWarning; set =\u003e isOutputMethodNotFoundWarning = value; }\n```\n\n##### Scanner (static class)\n```c#\n// ---- Get the input function ----\n// The parameter is the prompt to get the input, and after execution, it will wait until the user enters it.  \n// If there are other threads waiting for input, it will first wait for the thread in front to get it, and then execute the content of this statement.  \nstring GetInput();\nstring GetInput(string value);\n\n// ---- Waiting for input function ----\n// Possibly a useless function. Can wait until user input is obtained while other threads are performing input. \n// Returns the most recent user input. \nstring WaitInput();\n\n// ---- Recently entered content ----\nstring LastInputValue { get =\u003e lastInputValue; set =\u003e lastInputValue = value; }\n```\n\n##### Outputter (class)\n```c#\n// ---- CSV file operations ----\n// Output settings\nCsvOption csvOption;\n// Data to be output\nIEnumerable\u003cIEnumerable\u003cstring\u003e\u003e CsvDatas\n// Add a row of data\nvoid SetData(IEnumerable\u003cstring\u003e data)\n// Add a row of data based on a dictionary of headers-data\nvoid SetData(Dictionary\u003cstring, string\u003e dataWithHeader)\n// Convert a list of row data to a dictionary of headers-data [Needs to correctly set header list in output settings]\nDictionary\u003cstring, string\u003e ToDataWithHeaderDictionary(IEnumerable\u003cstring\u003e rowData)\n// Convert a dictionary of headers-data to a list of row data [Needs to correctly set header list in output settings]\nIEnumerable\u003cstring\u003e ToRowDataList(Dictionary\u003cstring, string\u003e dataWithHeader)\n```\n\n##### Param (class)\n```c#\n// Get parameters\nList\u003cstring\u003e Get(string key);\nstring GetOne(string key);\n// Get a collection of parameter keys\nIEnumerable\u003cString\u003e GetKeys();\n// Check whether parameter is included\nbool ContainsKey(string key);\n```\n\n##### Running (static class)\n```c#\n// ---- operating status ----\n// When executing time-consuming logic, it can be judged whether the user has stopped running, so as to exit the logic in time.\nbool UserStop { get =\u003e userStop; set =\u003e userStop = value; }\n// Determine whether the current logic is being executed. \nbool NowRunning { get =\u003e nowRunning; set =\u003e nowRunning = value; }\n```\n\n##### RunBeforeAnalyzeCsv Function\n|Parameter|Type|Description|Remarks|\n|----|----|----|----|\n|param|Param|The parameter passed in||\n|globalObjects|Object|Globally existing, can save data that needs to be used in other calls, such as the current line number, etc.||\n|allFilePathList|List\\\u003cstring\u003e|The list of all file paths that will be processed||\n|globalizationSetter|GlobalizationSetter|Get internationalized strings|globalizationSetter.Find(\"Code\");|\n|isExecuteInSequence|bool|Whether to execute in sequence||\n|outputter|Outputter|Used to output CSV data||\n\n##### AnalyzePerRecord Function\n|Parameter|Type|Description|Remarks|\n|----|----|----|----|\n|param|Param|The parameter passed in||\n|record|Dictionary\\\u003cstring, string\u003e|The sheet currently being processed||\n|filePath|string|File path||\n|globalObjects|Object|Globally existing, can save data that needs to be used in other calls, such as the current line number, etc.||\n|globalizationSetter|GlobalizationSetter|Get internationalized strings|globalizationSetter.Find(\"Code\");|\n|isExecuteInSequence|bool|Whether to execute in sequence||\n|invokeCount|int|The number of times this processing function has been called|Value is 1 when called for the first time|\n|outputter|Outputter|Used to output CSV data||\n\n##### AnalyzeRecords Function\n|Parameter|Type|Description|Remarks|\n|----|----|----|----|\n|param|Param|The parameter passed in||\n|records|IEnumerable\\\u003cIEnumerable\\\u003cstring\u003e\u003e|The sheet currently being processed||\n|filePath|string|File path||\n|globalObjects|Object|Globally existing, can save data that needs to be used in other calls, such as the current line number, etc.||\n|globalizationSetter|GlobalizationSetter|Get internationalized strings|globalizationSetter.Find(\"Code\");|\n|isExecuteInSequence|bool|Whether to execute in sequence||\n|invokeCount|int|The number of times this processing function has been called|Value is 1 when called for the first time|\n|outputter|Outputter|Used to output CSV data||\n\n##### RunEnd Function\n|Parameter|Type|Description|Remarks|\n|----|----|----|----|\n|param|Param|The parameter passed in||\n|globalObjects|Object|Globally existing, can save data that needs to be used in other calls, such as the current line number, etc.||\n|allFilePathList|List\\\u003cstring\u003e|The list of all file paths processed||\n|globalizationSetter|GlobalizationSetter|Get internationalized strings|globalizationSetter.Find(\"Code\");|\n|isExecuteInSequence|bool|Whether to execute in sequence||\n|outputter|Outputter|Used to output CSV data||\n\n# Open Source Libraries Used\n|Open source library|Open source protocol|\n|----|----|\n|[roslynpad/roslynpad](https://github.com/roslynpad/roslynpad)|MIT|\n|[icsharpcode/AvalonEdit](https://github.com/icsharpcode/AvalonEdit)|MIT|\n|[JamesNK/Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json)|MIT|\n|[~~rickyah/ini-parser~~ rickyah/ini-parser-netstandard](https://github.com/rickyah/ini-parser)|MIT|\n|[amibar/SmartThreadPool](https://github.com/amibar/SmartThreadPool)|MS-PL|\n|[punker76/gong-wpf-dragdrop](https://github.com/punker76/gong-wpf-dragdrop)|BSD-3-Clause|\n|[Kinnara/ModernWpf](https://github.com/Kinnara/ModernWpf)|MIT|\n|[~~Microsoft.Toolkit.Mvvm~~ CommunityToolkit.Mvvm](https://github.com/CommunityToolkit/dotnet)|MIT|\n|[microsoft/XamlBehaviorsWpf](https://github.com/microsoft/XamlBehaviorsWpf)|MIT|\n|[ZjzMisaka/CustomizableMessageBox](https://github.com/ZjzMisaka/CustomizableMessageBox)|WTFPL|\n|[ZjzMisaka/DynamicScriptExecutor](https://github.com/ZjzMisaka/DynamicScriptExecutor)|[OMSPL](https://github.com/ZjzMisaka/OMSPL/blob/main/LICENSE)|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjzmisaka%2Fdatatransformer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzjzmisaka%2Fdatatransformer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzjzmisaka%2Fdatatransformer/lists"}