Part of twisted.python._release View Source View In Hierarchy
Generate the new section of a NEWS file.
The_FEATURE
, _BUGFIX
, _REMOVAL
,
and _MISC
attributes of this class are symbolic names for the
news entry types which are supported. Conveniently, they each also take on
the value of the file name extension which indicates a news entry of that
type.
Class Variables | _headings | A dict mapping one of the news entry types to the heading
to write out for that type of news entry.
|
_TICKET_HINT | A str giving the text which appears at the top of each news
file and which should be kept at the top, not shifted down with all the
other content. Put another way, this is the text after which the new news
text is inserted.
|
Method | build | Load all of the change information from the given directory and write |
Method | buildAll | Find all of the Twisted subprojects beneath baseDirectory
and update
|
Method | main | Build all news files. |
Method | _today | Return today's date as a string in YYYY-MM-DD format. |
Method | _findChanges | Load all the feature ticket summaries. |
Method | _writeHeader | Write a version header to the given file. |
Method | _writeSection | Write out one section (features, bug fixes, etc) to the given file. |
Method | _writeMisc | Write out a miscellaneous-changes section to the given file. |
Parameters | path | A FilePath the
direct children of which to search for news entries.
|
ticketType | The type of news entries to search for. One of
NewsBuilder._FEATURE , NewsBuilder._BUGFIX ,
NewsBuilder._REMOVAL , or NewsBuilder._MISC .
| |
Returns | A list of two-tuples. The first element is the ticket
number as an int . The second element of each tuple is the
description of the feature.
|
Parameters | fileObj | A file-like object to which to write the header. |
header | The header to write to the file.
(type: str
) |
Parameters | fileObj | A file-like object to which to write the news section. |
header | The header for the section to write.
(type: str
) | |
tickets | A list of ticket information of the sort returned by NewsBuilder._findChanges .
|
Parameters | fileObj | A file-like object to which to write the news section. |
header | The header for the section to write.
(type: str
) | |
tickets | A list of ticket information of the sort returned by NewsBuilder._findChanges .
|
Parameters | path | A directory (probably a topfiles directory) containing change
information in the form of <ticket>.<change type> files.
(type: FilePath
) |
output | The NEWS file to which the results will be prepended.
(type: FilePath
) | |
header | The top-level header to use when writing the news.
(type: str
) |
baseDirectory
and update their news files from the ticket change description files in
their topfiles directories and update the news file in
baseDirectory
with all of the news.
Parameters | baseDirectory | A FilePath
representing the root directory beneath which to find Twisted projects for
which to generate news (see findTwistedProjects ).
|
Parameters | args | The command line arguments to process. This must contain one string,
the path to the base of the Twisted checkout for which to build the
news.
(type: list of str
) |