daklib.textutils¶
Text utility functions
@contact: Debian FTP Master <ftpmaster@debian.org> @copyright: 2000, 2001, 2002, 2003, 2004, 2005, 2006 James Troup <james@nocrew.org> @license: GNU General Public License version 2 or later
Functions
|
Parses a Maintainer or Changed-By field and returns: |
Encodes a (header) string per RFC2047 if necessary. |
|
|
- daklib.textutils.fix_maintainer(maintainer: str) tuple[str, str, str, str] [source]¶
- Parses a Maintainer or Changed-By field and returns:
an RFC822 compatible version,
an RFC2047 compatible version,
the name
the email
The name is forced to UTF-8 for both 1. and 3.. If the name field contains ‘.’ or ‘,’ (as allowed by Debian policy), 1. and 2. are switched to ‘email (name)’ format.