X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=lib%2Fgenerate_contributions.py;h=b4fc91533ad1f8a055b9d9ed34c5a23a34303ef1;hb=ad3a07c4f2925512611215dc653042855b2cae80;hp=c802d64f727b09d40d941822b9c2636ad0d24b3d;hpb=f7d7a58f78878749f05d5ddedd0e03b054d9b983;p=lyx.git diff --git a/lib/generate_contributions.py b/lib/generate_contributions.py index c802d64f72..b4fc91533a 100755 --- a/lib/generate_contributions.py +++ b/lib/generate_contributions.py @@ -1,4 +1,4 @@ -#! /usr/bin/env python +#! /usr/bin/env python # -*- coding: utf-8 -*- ''' @@ -21,7 +21,7 @@ $ python generate_contributions.py \ where the arguments are the names of the generated files. ''' -import codecs, sys +import codecs, sys, textwrap def xml_escape(s): s = s.replace("&", "&") @@ -59,18 +59,18 @@ class contributer: address = address.replace(" ! ", ".") contact = "%s@%s" % (ename, address) result.append('@iE-mail: %s\n' % contact) - result.append(' %s\n' % self.credit) + result.append(' %s\n' % self.credit.replace('\n', '\n ')) return "".join(result) - def as_php_credits(self): + def as_php_credits(self, wrapper): return ''' contrib("%s", "%s", "%s"); ''' % ( xml_escape(self.name), xml_escape(self.contact), - xml_escape(self.credit) ) + "\n".join(wrapper.wrap(xml_escape(self.credit))) ) def as_php_blanket(self): @@ -94,7 +94,7 @@ def error(message): def usage(prog_name): - return "Usage: %s " % prog_name def collate_incomplete(contributers): @@ -108,7 +108,7 @@ def collate_incomplete(contributers): missing_licence.append(contributer.name) return '''WARNING! -The following contributers to not have a CREDITS entry: +The following contributers do not have a CREDITS entry: %s These ones have no explicit licence statement: @@ -146,7 +146,7 @@ $author="lyx-devel@lists.lyx.org"; // Full name of this file (relative path from LyX home page) $file_full="about/%s"; -include("start.php3"); +include("start.php"); ?> ''' % ( title, file ) @@ -154,7 +154,7 @@ include("start.php3"); def footer(): return ''' ''' @@ -170,12 +170,16 @@ function contrib($name, $email, $msg) { echo "
- ${name}"; + ${name} +"; if (isset($email) && $email != "") echo " <${email}>"; -echo "
+$msg = ereg_replace("\\n *", "\\n ", ltrim($msg)); + +echo " +
${msg}
"; @@ -191,12 +195,13 @@ echo " mailing list. Thanks.

-
- @@ -246,8 +251,7 @@ echo "" Gnu General Public Licence, version 2 or later.

-
-