Back to index

plone3  3.1.7
Functions | Variables
filter Namespace Reference

Functions

def main

Variables

tuple __I18NDUDE = os.environ.get('I18NDUDE', 'i18ndude')

Detailed Description

   Usage: filter.py <target-product> <source-product>

   Filter out all msgid's in target product that are already in source product.

Function Documentation

def filter.main ( )

Definition at line 11 of file filter.py.

00011 
00012 def main():
00013     if len(sys.argv) < 3:
00014         print 'You have to specify the target and source product.'
00015         sys.exit(1)
00016 
00017     target = sys.argv[1]+'.pot'
00018     source = sys.argv[2]+'.pot'
00019 
00020     os.chdir('..')
00021     os.chdir('i18n')
00022 
00023     if not os.path.isfile(source):
00024         print 'Source pot was not found for the given product.'
00025         sys.exit(2)
00026 
00027     if not os.path.isfile(target):
00028         print 'Target pot was not found for the given product.'
00029         sys.exit(3)
00030 
00031     os.system(__I18NDUDE + (' filter %s %s > %s-new') % (target, source, target))


Variable Documentation

tuple filter.__I18NDUDE = os.environ.get('I18NDUDE', 'i18ndude')

Definition at line 9 of file filter.py.