|
| 1 | +# JSON to CSV Converter (Multi-File) |
| 2 | + |
| 3 | +A powerful native macOS application for converting JSON files to CSV format with advanced schema analysis and field merging capabilities. |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- 🚀 **Batch Processing**: Convert multiple JSON files at once |
| 10 | +- 🧠 **Smart Schema Analysis**: Automatically analyzes and compares schemas across files |
| 11 | +- 🔀 **Multiple Merge Strategies**: |
| 12 | + - Smart Auto: Fields present in 70%+ of files |
| 13 | + - All Available: Union of all fields across files |
| 14 | + - Common Only: Fields present in ALL files |
| 15 | + - Most Complete File: Use the file with most fields as template |
| 16 | + - Keep Separate: Individual CSV files with their own schemas |
| 17 | +- 📊 **Nested Field Support**: Handles complex nested JSON structures |
| 18 | +- 🖥️ **Native macOS Interface**: Built with PyQt6 for a smooth, native experience |
| 19 | +- 📝 **Real-time Status Logging**: Track conversion progress with detailed logs |
| 20 | + |
| 21 | +## Download |
| 22 | + |
| 23 | +Download the latest release for your Mac type from the [Releases](https://github.com/simplifi/json-converter/releases) page: |
| 24 | + |
| 25 | +- **Intel Macs**: `JSON-to-CSV-Converter-intel.dmg` |
| 26 | +- **Apple Silicon Macs** (M1/M2/M3): `JSON-to-CSV-Converter-apple-silicon.dmg` |
| 27 | + |
| 28 | +### How to check your Mac type |
| 29 | +1. Click the Apple menu > About This Mac |
| 30 | +2. Look for "Chip" or "Processor" |
| 31 | + - Intel processor = Download Intel version |
| 32 | + - Apple M1/M2/M3 = Download Apple Silicon version |
| 33 | + |
| 34 | +## Installation |
| 35 | + |
| 36 | +1. Download the appropriate DMG file for your Mac |
| 37 | +2. Double-click the DMG to mount it |
| 38 | +3. Drag "JSON to CSV Converter" to your Applications folder |
| 39 | +4. First time running: Right-click the app and select "Open" to bypass Gatekeeper |
| 40 | + |
| 41 | +## Usage |
| 42 | + |
| 43 | +1. **Select JSON Files**: Click "Browse for JSON Files" to select one or more JSON files |
| 44 | +2. **Schema Analysis**: The app automatically analyzes the structure of your files |
| 45 | +3. **Choose Strategy**: Select how you want to handle different schemas across files |
| 46 | +4. **Convert**: Click "Convert All Files" and choose an output directory |
| 47 | + |
| 48 | +### Field Selection Strategies |
| 49 | + |
| 50 | +- **Smart Auto**: Includes fields that appear in at least 70% of your files |
| 51 | +- **All Available**: Includes every field found across all files (union) |
| 52 | +- **Common Only**: Only includes fields that exist in every single file |
| 53 | +- **Most Complete File**: Uses the schema from the file with the most fields |
| 54 | +- **Keep Files Separate**: Creates individual CSV files, each with its own schema |
| 55 | + |
| 56 | +## Building from Source |
| 57 | + |
| 58 | +### Requirements |
| 59 | + |
| 60 | +- macOS 10.13 or later |
| 61 | +- Python 3.8 or later |
| 62 | +- PyQt6 |
| 63 | + |
| 64 | +### Quick Build |
| 65 | + |
| 66 | +```bash |
| 67 | +# Clone the repository |
| 68 | +git clone https://github.com/simplifi/json-converter.git |
| 69 | +cd json-converter |
| 70 | + |
| 71 | +# Run the build script |
| 72 | +./build_app.sh |
| 73 | +``` |
| 74 | + |
| 75 | +The built application will be in `dist/JSON to CSV Converter.app` |
| 76 | + |
| 77 | +### Building for Different Architectures |
| 78 | + |
| 79 | +See [README_BUILD.md](README_BUILD.md) for detailed instructions on building for both Intel and Apple Silicon Macs. |
| 80 | + |
| 81 | +## Development |
| 82 | + |
| 83 | +### Setting up the development environment |
| 84 | + |
| 85 | +```bash |
| 86 | +# Create virtual environment |
| 87 | +python3 -m venv .venv |
| 88 | +source .venv/bin/activate |
| 89 | + |
| 90 | +# Install dependencies |
| 91 | +pip install -r requirements.txt |
| 92 | + |
| 93 | +# Run the application |
| 94 | +python json_to_csv_multifile_pyqt.py |
| 95 | +``` |
| 96 | + |
| 97 | +### Project Structure |
| 98 | + |
| 99 | +``` |
| 100 | +json-converter/ |
| 101 | +├── json_to_csv_multifile_pyqt.py # Main application |
| 102 | +├── generate_sample_data.py # Generate test data |
| 103 | +├── build_app.sh # Build script |
| 104 | +├── requirements.txt # Python dependencies |
| 105 | +└── samples/ # Sample JSON files |
| 106 | +``` |
| 107 | + |
| 108 | +## Sample Data |
| 109 | + |
| 110 | +Generate sample data for testing: |
| 111 | + |
| 112 | +```bash |
| 113 | +python generate_sample_data.py |
| 114 | +``` |
| 115 | + |
| 116 | +This creates various JSON files with different schemas and sizes in the `samples/` directory. |
| 117 | + |
| 118 | +## Contributing |
| 119 | + |
| 120 | +1. Fork the repository |
| 121 | +2. Create your feature branch (`git checkout -b feature/amazing-feature`) |
| 122 | +3. Commit your changes (`git commit -m 'Add amazing feature'`) |
| 123 | +4. Push to the branch (`git push origin feature/amazing-feature`) |
| 124 | +5. Open a Pull Request |
| 125 | + |
| 126 | +## License |
| 127 | + |
| 128 | +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details. |
| 129 | + |
| 130 | +## Acknowledgments |
| 131 | + |
| 132 | +- Built with [PyQt6](https://www.riverbankcomputing.com/software/pyqt/) |
| 133 | +- Packaged with [PyInstaller](https://www.pyinstaller.org/) |
| 134 | + |
| 135 | +## Support |
| 136 | + |
| 137 | +For issues, questions, or contributions, please visit the [GitHub repository](https://github.com/simplifi/json-converter). |
0 commit comments