Back to index

plone3  3.1.7
list.py
Go to the documentation of this file.
00001 """
00002    Usage: list.py
00003 """
00004 
00005 import os, sys
00006 from utils import getProduct, getPotFiles, getLongProductName
00007 from utils import PRODUCTS
00008 
00009 __I18NDUDE = os.environ.get('I18NDUDE', 'i18ndude')
00010 
00011 def main():
00012     option = 'all'
00013     if len(sys.argv) > 1:
00014         option = sys.argv[1]
00015 
00016     os.chdir('..')
00017     os.chdir('i18n')
00018 
00019     products = None
00020     if option == 'all':
00021         products = [getProduct(p) for p in getPotFiles()]
00022     elif option in PRODUCTS.keys():
00023         products = (getLongProductName(option), )
00024 
00025     if products:
00026         os.system(__I18NDUDE + (' list --products %s') % (' '.join(products)))
00027 
00028 if __name__ == '__main__':
00029     main()