# DataTool **Repository Path**: zsj2359/data-tool ## Basic Information - **Project Name**: DataTool - **Description**: 一款开箱即用的桌面端数据处理工具,无需代码基础,一键完成JSON、Excel、文本、地理数据的标准化处理,覆盖办公、开发、数据分析全场景。 - **Primary Language**: Python - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-04-27 - **Last Updated**: 2026-04-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Data Toolbox 数据工具箱 一个简洁实用的数据处理工具集,提供 JSON、Excel、文本和 GeoJSON 等常见数据格式的处理功能,同时支持图形界面操作。 ## 功能特点 ### JSON 工具 - **JSON 格式化** - 美化/压缩 JSON 数据 - **JSON 转 Excel** - 将 JSON 数据导出为 Excel 文件 - **提取所有键** - 从 JSON 中提取所有键名 ### Excel 工具 - **合并 Excel** - 批量合并多个 Excel 文件 - **Excel 去重** - 去除 Excel 中的重复数据 ### 文本工具 - **批量替换** - 批量替换文本内容 - **删除空行** - 移除文本中的空行 ### GeoJSON 工具 - **GeoJSON 格式化** - 美化 GeoJSON 数据 - **提取坐标** - 从 GeoJSON 中提取所有坐标点 - **获取坐标系统** - 获取 GeoJSON 的 CRS 信息 ## 目录结构 ``` data-tool/ ├── excel_tool.py # Excel 处理模块 ├── geojson_tool.py # GeoJSON 处理模块 ├── json_tool.py # JSON 处理模块 ├── json_tool_gui.py # GUI 图形界面 ├── text_tool.py # 文本处理模块 └── README.md # 项目说明文档 ``` ## 环境要求 - Python 3.7+ - 依赖包: - `pandas` - 数据处理 - `openpyxl` - Excel 操作 - `tkinter` - GUI 界面(Python 内置) ## 安装 ```bash # 克隆项目 git clone https://gitee.com/zsj2359/data-tool.git # 安装依赖 pip install pandas openpyxl ``` ## 使用方法 ### 图形界面(推荐) 直接运行 GUI 程序: ```bash python json_tool_gui.py ``` 启动后将看到图形界面,可选择所需的数据处理功能。 ### 命令行工具 #### JSON 格式化 ```python from json_tool import json_format_content result = json_format_content('{"name":"test"}') ``` #### JSON 转 Excel ```python from json_tool import json_to_excel json_to_excel('data.json', 'output.xlsx') ``` #### 合并 Excel 文件 ```python from excel_tool import merge_all_excel merge_all_excel('input_folder/', 'merged.xlsx') ``` #### Excel 去重 ```python from excel_tool import excel_del_duplicate excel_del_duplicate('input.xlsx', 'output.xlsx') ``` #### 文本批量替换 ```python from text_tool import text_batch_replace result = text_batch_replace('hello world', 'world', 'python') ``` #### 文本删除空行 ```python from text_tool import text_del_empty_line result = text_del_empty_line('line1\n\nline2\n') ``` #### GeoJSON 格式化 ```python from geojson_tool import geojson_format result = geojson_format('{"type":"Feature"}') ``` #### 提取 GeoJSON 坐标 ```python from geojson_tool import extract_geometry_coords coords = extract_geometry_coords(geojson_string) ``` #### 获取 GeoJSON 坐标系统 ```python from geojson_tool import get_crs_info crs = get_crs_info(geojson_string) ``` ## 许可证 MIT License