Skip to main content

splitpo

A Python utility for splitting gettext .po files into smaller chunks by entry count and later merging them back together.

Features

  • Split large .po files into manageable chunks of a specified number of entries
  • Merge previously split .po files back into the original format
  • Maintain .po file structure and metadata during split/merge operations
  • Preserve comments, flags, references, and other po file attributes
  • Support for both command-line interface and module execution

Installation

pip install -e .

Usage

Command Line Interface

# Split a .po file into chunks
python main.py split-po input.po --output-dir=./splitted --entries 100

# Join split .po files back together
python main.py join-po splitted/input_part_*.po --output=input.po

Module Execution

# Run split command directly
splitpo input.po --output-dir=./splitted --entries 100

# Run join command directly
joinpo splitted/input_part_*.po --output=input.po

Options

split-po command

  • input_file: Input .po file to split (required)
  • --output-dir: Output directory for split files (default: ./splitted)
  • --entries: Number of entries per split file (default: 100)

join-po command

  • input_files: Input .po files to join, supports wildcards (required)
  • --output: Output .po file (required)

Requirements

  • Python 3.13+
  • No external dependencies

File Structure

Split files are named with the pattern {original_name}_part_{number}.po:

  • input.po → input_part_000.po, input_part_001.po, etc.
  • Number of digits adjusts to file count (minimum 3 digits)
  • Numbering starts from 0

License

MIT License - see LICENSE file for details.

Metadata

Release files for splitpo 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for splitpo 0.1.0
File Size Uploaded
splitpo-0.1.0.tar.gz 156.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for splitpo 0.1.0
File Interpreter ABI Platform
splitpo-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 162.3 kB

Release files / splitpo-0.1.0.tar.gz

Download URL splitpo-0.1.0.tar.gz
Size 156.3 kB
Tags Source
SHA-256 checksum
How to use checksums
5e4334af321ad33235ef7bca17d7fe0811bbf380a0a89253999d7830033982ac
BLAKE2b-256 checksum
How to use checksums
b3202ca17d9617bd88ca4a0d3147d93baf07bc6ece3ba53cdd61f1e552a3e33e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Release files / splitpo-0.1.0-py3-none-any.whl

Download URL splitpo-0.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
64229c080fa09a487524a206cbc51fa75c590f355075b0c81c736a36b37a5bce
BLAKE2b-256 checksum
How to use checksums
965db8c8a25714377d60004aab71b40eae4b68420630c9b9bd2a8b38e5ff4fd5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page