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):
return '''<?php
// WARNING! This file is autogenerated.
?>
'''
-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):
results = []
php_credits = open(argv[2], "w")
php_credits.write(php_credits_data)
- php_blanket_data = unicode(as_php_blanket(contributers, argv[3])).encode("utf-8")
+ php_blanket_data = unicode(as_php_blanket(contributers, argv[3])).encode("utf-8")
php_blanket = open(argv[3], "w")
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.
contributers = [