Changeset 109


Ignore:
Timestamp:
09/29/06 09:27:12 (15 years ago)
Author:
bas
Message:

EmailtoTracScript?:

email2trac.py.in:

  • Changed some layout statements

configure, Makefile.in, configure.in:

  • Can set DEBUG value on command line; eg: DEBUG=1 ./configure default is: 0
Location:
emailtotracscript/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • emailtotracscript/trunk/Makefile.in

    r95 r109  
    1616TRAC_USER=@trac_user@
    1717MTA_USER=@mta_user@
     18DEBUG=@DEBUG@
    1819
    1920TRAC_SCRIPT_NAME=email2trac
     
    2122CC=@CC@
    2223INSTALL=./install-sh
    23 DEBUG=0
    2424CFLAGS=-DMTA_USER=\"$(MTA_USER)\" -DTRAC_USER=\"$(TRAC_USER)\" -DTRAC_SCRIPT_NAME=\"$(TRAC_SCRIPT_NAME)\" -DTRAC_SCRIPT_PATH=\"$(EXEC_PREFIX)\" -DDEBUG=$(DEBUG)
    2525
  • emailtotracscript/trunk/configure

    r24 r109  
    273273
    274274ac_unique_file="email2trac.py.in"
    275 ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS pyexecdir trac_user mta_user email2trac_conf PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pkgpyexecdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP SYSTEM_EMAIL2TRAC_CONF LIBOBJS LTLIBOBJS'
     275ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS pyexecdir trac_user mta_user PYTHON PYTHON_VERSION PYTHON_PREFIX PYTHON_EXEC_PREFIX PYTHON_PLATFORM pythondir pkgpythondir pkgpyexecdir CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT CPP EGREP DEBUG email2trac_conf SYSTEM_EMAIL2TRAC_CONF LIBOBJS LTLIBOBJS'
    276276ac_subst_files=''
    277277
     
    12651265
    12661266
    1267 
     1267#DEBUG=0
    12681268
    12691269
     
    26132613
    26142614
     2615if test "x$DEBUG" = "x";then
     2616  DEBUG=0
     2617fi
     2618
     2619
    26152620# Now a user can specify the TRAC user
    26162621#
     
    26522657#define SYSTEM_EMAIL2TRAC_CONF "$email2trac_conf"
    26532658_ACEOF
     2659
    26542660
    26552661
     
    32973303s,@trac_user@,$trac_user,;t t
    32983304s,@mta_user@,$mta_user,;t t
    3299 s,@email2trac_conf@,$email2trac_conf,;t t
    33003305s,@PYTHON@,$PYTHON,;t t
    33013306s,@PYTHON_VERSION@,$PYTHON_VERSION,;t t
     
    33153320s,@CPP@,$CPP,;t t
    33163321s,@EGREP@,$EGREP,;t t
     3322s,@DEBUG@,$DEBUG,;t t
     3323s,@email2trac_conf@,$email2trac_conf,;t t
    33173324s,@SYSTEM_EMAIL2TRAC_CONF@,$SYSTEM_EMAIL2TRAC_CONF,;t t
    33183325s,@LIBOBJS@,$LIBOBJS,;t t
  • emailtotracscript/trunk/configure.in

    r24 r109  
    1414AC_SUBST(sysconfdir)
    1515
     16#DEBUG=0
     17
    1618AM_PATH_PYTHON
    1719AC_PROG_GCC_TRADITIONAL
     20
     21if test "x$DEBUG" = "x";then
     22  DEBUG=0
     23fi
     24AC_SUBST(DEBUG)
    1825
    1926# Now a user can specify the TRAC user
  • emailtotracscript/trunk/email2trac.py.in

    r108 r109  
    353353
    354354                body_text = self.get_body_text(m)
    355                 body_text = '{{{\n%s\n}}}' %body_text
    356355
    357356                # Strip '#' and ':' from ticket_id
     
    425424                body_text = self.get_body_text(msg)
    426425
    427                 tkt['description'] = 'email2trac:%s\r\n{{{\r\n%s\r\n}}}' \
     426                tkt['description'] = 'email2trac:%s\r\n%s' \
    428427                        %(head, body_text)
    429428
     
    444443                        comment = '\nadded mailto line\n'
    445444                        mailto = self.html_mailto_link(self.to_unicode(msg['subject']), ticket_id, body_text)
    446                         tkt['description'] = 'email2trac:%s%s\r\n{{{\r\n%s\r\n}}}' %(head, mailto, body_text)
     445                        #tkt['description'] = 'email2trac:%s%s\r\n{{{\r\n%s\r\n}}}' %(head, mailto, body_text)
     446                        tkt['description'] = 'email2trac:%s%s\r\n%s' %(head, mailto, body_text)
    447447
    448448                n =  self.attachments(msg, tkt)
     
    497497                has_description = 0
    498498                encoding = True
    499                 ubody_text = u'\r\n{{{\nNo plain text message\n}}}\r\n'
     499                ubody_text = u'No plain text message'
    500500                for part in msg.walk():
    501501
     
    529529
    530530                        elif part.get_content_type() == 'text/html':
    531                                 ubody_text = '\r\n(see attachment for HTML mail message)\r\n'
     531                                ubody_text = '(see attachment for HTML mail message)'
    532532
    533533                        else:
    534                                 ubody_text = '\r\n(see attachment for message)\r\n'
     534                                ubody_text = '(see attachment for message)'
    535535
    536536                        has_description = 1
     
    538538
    539539                if not has_description:
    540                         ubody_text = '\r\n(see attachment for message)\r\n'
     540                        ubody_text = '(see attachment for message)'
    541541
    542542                # A patch so that the web-interface will not update the description
     
    551551                        ubody_text = ubody_text.encode('utf-8')
    552552
     553                ubody_text = '{{{\r\n%s\r\n}}}' %ubody_text
    553554                return ubody_text
    554555
Note: See TracChangeset for help on using the changeset viewer.