mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Ouput warning of missing info
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9790 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d0bee1117d
commit
f7d7a58f78
@ -97,6 +97,42 @@ def usage(prog_name):
|
|||||||
return "Usage: %s <CREDITS> <credits.php> <blanket-permission.php" % prog_name
|
return "Usage: %s <CREDITS> <credits.php> <blanket-permission.php" % prog_name
|
||||||
|
|
||||||
|
|
||||||
|
def collate_incomplete(contributers):
|
||||||
|
|
||||||
|
missing_credit = []
|
||||||
|
missing_licence = []
|
||||||
|
for contributer in contributers:
|
||||||
|
if len(contributer.credit) == 0:
|
||||||
|
missing_credit.append(contributer.name)
|
||||||
|
if len(contributer.licence) == 0:
|
||||||
|
missing_licence.append(contributer.name)
|
||||||
|
|
||||||
|
return '''WARNING!
|
||||||
|
The following contributers to not have a CREDITS entry:
|
||||||
|
%s
|
||||||
|
|
||||||
|
These ones have no explicit licence statement:
|
||||||
|
%s
|
||||||
|
''' % ( ",\n ".join(missing_credit), ",\n ".join(missing_licence))
|
||||||
|
|
||||||
|
|
||||||
|
def as_txt_credits(contributers):
|
||||||
|
results = []
|
||||||
|
|
||||||
|
for contributer in contributers:
|
||||||
|
if len(contributer.credit) != 0:
|
||||||
|
results.append(contributer.as_txt_credits())
|
||||||
|
|
||||||
|
results.append('''
|
||||||
|
|
||||||
|
If your name doesn't appear here although you've done
|
||||||
|
something for LyX, or your entry is wrong or incomplete,
|
||||||
|
just drop some e-mail to lyx@lyx.org. Thanks.
|
||||||
|
''')
|
||||||
|
|
||||||
|
return "".join(results)
|
||||||
|
|
||||||
|
|
||||||
def header(title, file):
|
def header(title, file):
|
||||||
return '''<?php
|
return '''<?php
|
||||||
// WARNING! This file is autogenerated.
|
// WARNING! This file is autogenerated.
|
||||||
@ -122,23 +158,6 @@ include("end.php3");
|
|||||||
?>
|
?>
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def as_txt_credits(contributers):
|
|
||||||
results = []
|
|
||||||
|
|
||||||
for contributer in contributers:
|
|
||||||
if len(contributer.credit) != 0:
|
|
||||||
results.append(contributer.as_txt_credits())
|
|
||||||
|
|
||||||
results.append('''
|
|
||||||
|
|
||||||
If your name doesn't appear here although you've done
|
|
||||||
something for LyX, or your entry is wrong or incomplete,
|
|
||||||
just drop some e-mail to lyx@lyx.org. Thanks.
|
|
||||||
''')
|
|
||||||
|
|
||||||
return "".join(results)
|
|
||||||
|
|
||||||
|
|
||||||
def as_php_credits(contributers, file):
|
def as_php_credits(contributers, file):
|
||||||
results = []
|
results = []
|
||||||
|
|
||||||
@ -278,6 +297,9 @@ def main(argv, contributers):
|
|||||||
php_blanket = open(argv[3], "w")
|
php_blanket = open(argv[3], "w")
|
||||||
php_blanket.write(php_blanket_data)
|
php_blanket.write(php_blanket_data)
|
||||||
|
|
||||||
|
warning_data = unicode(collate_incomplete(contributers) + '\n').encode("utf-8")
|
||||||
|
sys.stderr.write(warning_data)
|
||||||
|
|
||||||
|
|
||||||
# Store the raw data.
|
# Store the raw data.
|
||||||
contributers = [
|
contributers = [
|
||||||
|
Loading…
Reference in New Issue
Block a user