[Zope3-checkins] CVS: Zope3/utilities - i18nextract.py:1.4
Sidnei da Silva
sidnei at awkly.org
Thu Apr 1 13:09:35 EST 2004
Update of /cvs-repository/Zope3/utilities
In directory cvs.zope.org:/tmp/cvs-serv19987/utilities
Modified Files:
i18nextract.py
Log Message:
Add option for reading only python files
=== Zope3/utilities/i18nextract.py 1.3 => 1.4 ===
--- Zope3/utilities/i18nextract.py:1.3 Tue Mar 23 04:11:16 2004
+++ Zope3/utilities/i18nextract.py Thu Apr 1 13:09:35 2004
@@ -75,7 +75,7 @@
opts, args = getopt.getopt(
sys.argv[1:],
'hd:p:o:',
- ['help', 'domain=', 'path='])
+ ['help', 'domain=', 'path=', 'python-only'])
except getopt.error, msg:
usage(1, msg)
@@ -83,6 +83,7 @@
path = app_dir()
include_default_domain = True
output_dir = None
+ python_only = None
for opt, arg in opts:
if opt in ('-h', '--help'):
usage(0)
@@ -91,6 +92,8 @@
include_default_domain = False
elif opt in ('-o', ):
output_dir = arg
+ elif opt in ('--python-only',):
+ python_only = True
elif opt in ('-p', '--path'):
if not os.path.exists(arg):
usage(1, 'The specified path does not exist.')
@@ -121,8 +124,9 @@
py_strings, tal_strings, zcml_strings
maker = POTMaker(output_file, path)
maker.add(py_strings(path, domain), base_dir)
- maker.add(zcml_strings(path, domain), base_dir)
- maker.add(tal_strings(path, domain, include_default_domain), base_dir)
+ if not python_only:
+ maker.add(zcml_strings(path, domain), base_dir)
+ maker.add(tal_strings(path, domain, include_default_domain), base_dir)
maker.write()
if __name__ == '__main__':
More information about the Zope3-Checkins
mailing list