Releases: kxtools/kx-converter
Releases · kxtools/kx-converter
v0.1.0
Release v1.0.0
This is the first official open-source release of kx-converter, a robust command-line utility for converting KX-Maps .txt files into a structured JSON format.
After a comprehensive refactoring effort, the tool has been transformed from a basic script into a professional, cross-platform CLI application focused on reliability, ease of use, and fault tolerance.
✨ Key Features
- Professional CLI Interface: The application now features a standard command-line interface, powered by
CLI11. - Robust, Fault-Tolerant Parsing: The core parsing logic has been completely re-engineered. It no longer relies on string splitting. The new parser intelligently identifies coordinates and can handle a massive variety of formatting inconsistencies found in real-world files, including:
- Mixed whitespace (tabs and spaces).
- Comma-separated coordinates.
- Inconsistent or missing quotes around names.
- Names containing special characters (
',_,-,[],&). - Scientific e-notation for coordinates.
- Safe Error Handling: The tool will no longer crash on malformed lines or files. Invalid lines are now safely skipped and reported in the log, allowing the conversion process to continue for all other valid data.
- Full Recursive Processing: With the
--recursiveflag,kx-convertercan process entire directory trees, perfectly mirroring the input folder structure in the output directory. - File Safety: By default, the tool will not overwrite existing JSON files, preventing accidental data loss. Use the
--overwriteflag to enable this behavior. - Author Attribution: A new
--author <name>flag allows you to embed an author's name directly into the output JSON files. - Informative Output: A clean progress bar shows the status of large batch conversions, and
spdlogprovides detailed, color-coded output for both successful operations and errors. - Modern C++ & Build System: The entire codebase has been modernized to C++17. The build system now uses CMake with
FetchContentto automatically manage all dependencies, making it easy to compile on Windows, Linux, and macOS. - Comprehensive Test Suite: A full suite of unit tests built with GoogleTest has been established to validate the parser's logic against all known edge cases, ensuring future changes do not cause regressions.
🚀 Getting Started
You can download the pre-compiled executable for your operating system from the assets below.
Alternatively, you can build from source using CMake:
# Clone the repository
git clone https://github.com/kxtools/kx-converter.git
cd kx-converter
# Configure and build
cmake -B build
cmake --build buildExample Usage
# Convert all .txt files in 'source_maps' to 'converted_json'
# while processing subdirectories and adding an author name.
./kx-converter -i ./source_maps -o ./converted_json --recursive --author "YourName"