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