#!/usr/bin/env python # -*- mode: python; coding: iso-8859-1 -*- # Copyright © 1998, 1999, 2000 Progiciels Bourbeau-Pinard inc. # François Pinard , 1998. """\ Output a PO file after having made it canonical. """ import os, sys sys.path.insert(0, os.path.expanduser('~/po/web/lib')) import po def _(text): return text if len(sys.argv) == 1: entries = po.read('-') elif len(sys.argv) == 2: entries = po.read(sys.argv[1]) else: raise _('Usage: %s [PO-FILE]') % sys.argv[0] po.set_header(entries, po.header(entries)) po.write('-', entries)