ffmerge
Jun 17, 2025
A tool to merge multiple files into one and convert between CSV, Parquet, JSONL, and JSON.
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = [
# "duckdb",
# "typer",
# ]
# ///
# SPDX-FileCopyrightText: 2025 kurt.town
# SPDX-License-Identifier: MIT
=
=
=
=
=
=
=
=
=
=
=
=
return
return None
"""
Merge multiple files into one file.\n
Formats supported: CSV, Parquet, JSONL, JSON.\n
Formats are determined by the file extension (.csv, .parquet, .jsonl, .json).\n
Args:\n
- GLOB_PATTERN: The glob pattern to match files to merge.\n
- OUTPUT_PATH: The path to the output file.\n
- remove: Whether to remove the files matched by the glob pattern after merging.\n
- log_level: The logging level to use.\n
"""
=
=
=
=
=
=