Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2009-05

Help extending a python script

9 messages · 6 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Luca Olivetti
to Vincent Snijders: I wondered if there are some python users on this list that can help us to fix issue…

En/na Vincent Snijders ha escrit:

Show quoted text 11 lines
Hi, I wondered if there are some python users on this list that can help us to fix issue 13838: http://bugs.freepascal.org/view.php?id=13838 Basically the svn2feed.py script from http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/svn2feed.py needs to be extended, so that is limits the length of a line in the log messageand wraps the rest to next line(s). Patches are welcome. :-)

Try this (untested):

--- svn2feed.py.orig 2009-05-27 10:28:41.658689058 +0200 +++ svn2feed.py 2009-05-27 10:29:27.851320075 +0200 @@ -71,6 +71,7 @@
# $LastChangedRevision$

import sys
+import textwrap

# Python 2.4 is required for subprocess
if sys.version_info < (2, 4):
@@ -146,7 +147,7 @@
changed_data = proc.stdout.readlines()

desc = ("\nRevision: %s\nLog: %sModified: \n%s"
- % (revision, info_lines[3], changed_data))
+ % (revision, textwrap.fill(info_lines[3],60), changed_data))

item_dict = {
'author': info_lines[0].strip('\n'),

Bye

Luca Olivetti Wetron Automatizaci?n S.A. http://www.wetron.es/ Tel. +34 93 5883004 (Ext.133) Fax +34 93 5883007

Reply by email

JoshyFun
to Vincent Snijders: I wondered if there are some python users on this list that can help us to fix issue…

Hello Lazarus,

Wednesday, May 27, 2009, 10:04:28 AM, you wrote:

VS> I wondered if there are some python users on this list that can help us to fix issue VS> 13838: http://bugs.freepascal.org/view.php?id=13838 VS> Basically the svn2feed.py script from
VS> http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/svn2feed.py needs to be VS> extended, so that is limits the length of a line in the log messageand wraps the VS> rest to next line(s).

One trick could be to change the CSS associated to change the "pre" tag behavior using this style:

<style type="text/css">
pre {
white-space: pre-wrap; /* css-3 */
white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
word-wrap: break-word; /* Internet Explorer 5.5+ */ }
</style>

Best regards, JoshyFun

Reply by email

Vincent Snijders
to JoshyFun
JoshyFun wrote 24 lines
Hello Lazarus, Wednesday, May 27, 2009, 10:04:28 AM, you wrote: VS> I wondered if there are some python users on this list that can help us to fix issue VS> 13838: http://bugs.freepascal.org/view.php?id=13838 VS> Basically the svn2feed.py script from VS> http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/svn2feed.py needs to be VS> extended, so that is limits the length of a line in the log messageand wraps the VS> rest to next line(s). One trick could be to change the CSS associated to change the "pre" tag behavior using this style: <style type="text/css"> pre { white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ word-wrap: break-word; /* Internet Explorer 5.5+ */ } </style>

Graeme suggested something similar.

Paul do you know if this is possible?

Vincent

Reply by email

Vincent Snijders
to Luca Olivetti: En/na Vincent Snijders ha escrit: Try this (untested): --- svn2feed.py.orig 2009-05-27…
Luca Olivetti wrote 15 lines
En/na Vincent Snijders ha escrit: > Hi, > > I wondered if there are some python users on this list that can help > us to fix issue 13838: http://bugs.freepascal.org/view.php?id=13838 > > Basically the svn2feed.py script from > http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/svn2feed.py > needs to be extended, so that is limits the length of a line in the > log messageand wraps the rest to next line(s). > > Patches are welcome. :-) Try this (untested):

This looks rather easy. If a style sheet fix doesn't work, we will try this.

The hard part is getting a good limit, because it is fixed for all browser windows screens.

Vincent

Reply by email

Marc Weustink
to Vincent Snijders: Graeme suggested something similar. Paul do you know if this is possible? Vincent
Vincent Snijders wrote 33 lines
JoshyFun schreef: > Hello Lazarus, > > Wednesday, May 27, 2009, 10:04:28 AM, you wrote: > > VS> I wondered if there are some python users on this list that can > help us to fix issue > VS> 13838: http://bugs.freepascal.org/view.php?id=13838 > VS> Basically the svn2feed.py script from > VS> > http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/svn2feed.py > needs to be > VS> extended, so that is limits the length of a line in the log > messageand wraps the > VS> rest to next line(s). > > One trick could be to change the CSS associated to change the "pre" > tag behavior using this style: > > <style type="text/css"> > pre { > white-space: pre-wrap; /* css-3 */ > white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ > white-space: -pre-wrap; /* Opera 4-6 */ > white-space: -o-pre-wrap; /* Opera 7 */ > word-wrap: break-word; /* Internet Explorer 5.5+ */ > } > </style> > Graeme suggested something similar. Paul do you know if this is possible?

Is this already checked ?

Marc

Reply by email