SlackLog formatter takes an in-memory representation of a Slackware ChangeLog.txt and produces a different representation of it.
Bases: object
Base class for SlackLog formatters.
This class is ment for subclassing.
If not None, must be an int representing how many entries are formatted from the beginning of the log. Rest of the entries are ignored.
If not None, must be an int representing how many packages are formatted from the beginning of each entry. Rest of the packages are ignored.
Return unicode representation of the in-memory representation of the log.
Default implementation calls format_log_preamble(), followed by a call to format_entry() for each log entry, and finally calls format_log_postamble().
The return value is the concatenation of the return values of the mentioned functions.
Parameters: | log – in-memory representation of the log. |
---|---|
Type : | slacklog.models.SlackLog |
Returns: | Unicode representation of the log. |
Type : | unicode |
Return unicode representation of the log preamble, the part before entries.
Default implementation returns empty string.
Parameters: | log – in-memory representation of the log. |
---|---|
Type : | slacklog.models.SlackLog |
Returns: | Unicode representation of log preamble. |
Type : | unicode |
Return unicode representation of the log postamble, the part after all entries.
Default implementation returns empty string.
Parameters: | log – in-memory representation of the log. |
---|---|
Type : | slacklog.models.SlackLog |
Returns: | Unicode representation of log postamble. |
Type : | unicode |
Return unicode representation of a single log entry.
Default implementation calls format_entry_separator() with arguments is_first and is_last, followed by a call to format_entry_preamble(), followed by a call to format_pkg() for each package in this log entry, finally followed by a call to format_entry_postamble().
The return value is the concatenation of the return values of the mentioned functions.
Parameters: |
|
---|---|
Type : | |
Returns: | Unicode representation of log entry. |
Type : | unicode |
Return unicode representation of the log entry separator.
Default implementation returns an empty string.
Parameters: |
|
---|---|
Returns: | Unicode representation of log entry separator. |
Type : | unicode |
Return unicode representation of the log entry preamble, the part before packages.
Default implementation returns an empty string.
Parameters: | entry – in-memory representation of the log entry. |
---|---|
Type : | slacklog.models.SlackLogEntry |
Returns: | Unicode representation of log entry preamble. |
Type : | unicode |
Return unicode representation of the log entry postamble, the part after packages.
Default implementation returns an empty string.
Parameters: | entry – in-memory representation of the log entry. |
---|---|
Type : | slacklog.models.SlackLogEntry |
Returns: | Unicode representation of log entry postamble. |
Type : | unicode |
Return unicode representation of a single log entry package.
Default implementation calls format_pkg_separator(), followed by a call to format_pkg_preamble(), and finally calls format_pkg_postamble().
The return value is the concatenation of the return values of the mentioned functions.
Parameters: |
|
---|---|
Type : | |
Returns: | Unicode representation of log entry package. |
Type : | unicode |
Return unicode representation of the log entry package separator.
Default implementation returns an empty string.
Parameters: |
|
---|---|
Returns: | Unicode representation of log entry package separator. |
Type : | unicode |
Return unicode representation of the log entry package preamble.
Default implementation returns an empty string.
Parameters: | pkg – in-memory representation of the log entry package |
---|---|
Type : | slacklog.models.SlackLogPkg |
Returns: | Unicode representation of log entry package preamble. |
Type : | unicode |
Return unicode representation of the log entry package postamble.
Default implementation returns an empty string.
Parameters: | pkg – in-memory representation of the log entry package |
---|---|
Type : | slacklog.models.SlackLogPkg |
Returns: | Unicode representation of log entry package postamble. |
Type : | unicode |
Return unicode representation of a list of objects.
This method is not ment for subclassing.
Parameters: |
|
---|---|
Type : | list |
Type : | A callable that takes one item as the first positional argument, two booleans is_first and is_last as second and third positional arguments, and returns a unicode string. |
Returns: | Formatted data. |
Return type: | unicode |
Bases: slacklog.formatters.SlackLogFormatter
Concrete SlackLog formatter that tries to regenerate the original ChangeLog.txt.
Overrides SlackLogFormatter.format_entry_separator().
Parameters: |
|
---|---|
Returns: | Unicode representation of log entry separator. |
Type : | unicode |
Overrides SlackLogFormatter.format_entry_preamble().
Parameters: | entry – in-memory representation of the log entry. |
---|---|
Type : | slacklog.models.SlackLogEntry |
Returns: | Unicode representation of log entry preamble. |
Type : | unicode |
Overrides SlackLogFormatter.format_pkg_preamble().
Parameters: | pkg – in-memory representation of the log entry package |
---|---|
Type : | slacklog.models.SlackLogPkg |
Returns: | Unicode representation of log entry package preamble. |
Type : | unicode |
Bases: slacklog.formatters.SlackLogFormatter
Concrete SlackLog formatter that generates an RSS feed.
unicode description of the distro version. E.g. ‘Slackware 13.37’ or ‘Slackware64 current’.
unicode. Full URL of the RSS feed.
unicode. Full URL of the WWW version of the feed.
unicode description of the feed.
unicode language identifier. E.g. ‘en’.
unicode. Email, and possibly name, of the feed manager. E.g. 'jane@doe.net (Jane Doe)’.
unicode. Email, and possibly name, of the webmaster. E.g. 'john@doe.net (John Doe)’.
Overrides SlackLogFormatter.format_log_preamble().
Parameters: | log – in-memory representation of the log. |
---|---|
Type : | slacklog.models.SlackLog |
Returns: | Unicode representation of log preamble. |
Type : | unicode |
Overrides SlackLogFormatter.format_log_postamble().
Parameters: | log – in-memory representation of the log. |
---|---|
Type : | slacklog.models.SlackLog |
Returns: | Unicode representation of log postamble. |
Type : | unicode |
Overrides SlackLogFormatter.format_entry_preamble().
Parameters: | entry – in-memory representation of the log entry. |
---|---|
Type : | slacklog.models.SlackLogEntry |
Returns: | Unicode representation of log entry preamble. |
Type : | unicode |
Overrides SlackLogFormatter.format_entry_postamble().
Parameters: | entry – in-memory representation of the log entry. |
---|---|
Type : | slacklog.models.SlackLogEntry |
Returns: | Unicode representation of log entry postamble. |
Type : | unicode |
Overrides SlackLogFormatter.format_pkg_preamble().
Parameters: | pkg – in-memory representation of the log entry package |
---|---|
Type : | slacklog.models.SlackLogPkg |
Returns: | Unicode representation of log entry package preamble. |
Type : | unicode |
Bases: slacklog.formatters.SlackLogFormatter
Concrete SlackLog formatter that generates Pyblosxom blog entries.
If True,
unicode description of the distro version. E.g. ‘Slackware 13.37’ or ‘Slackware64 current’.
Blog entry directory.
Blog entry filename extension.
Blog entry file encoding.
Separator for tags.
Separator for packages.
If True, a pyfilemtime compatible filenames are generated.
If True, already existing blog entries are overwritten.
If True, already existing blog entries are copied to backups before overwriting.
unicode. HTML to insert before the entry.
unicode. HTML to insert after the entry.
unicode. HTML to insert before the entry description.
unicode. HTML to insert after the entry description.
unicode. HTML to insert before the list of packages.
unicode. HTML to insert after the list of packages.
unicode. HTML to insert before a package.
unicode. HTML to insert after a package.
unicode. HTML to insert before package name.
unicode. HTML to insert after package name.
unicode. HTML to insert before package description.
unicode. HTML to insert after package description.
Overrides SlackLogFormatter.format_entry().
Parameters: |
|
---|---|
Type : | |
Returns: | Unicode representation of log entry. |
Type : | unicode |
Overrides SlackLogFormatter.format_entry_preamble().
Parameters: | entry – in-memory representation of the log entry. |
---|---|
Type : | slacklog.models.SlackLogEntry |
Returns: | Unicode representation of log entry preamble. |
Type : | unicode |
Overrides SlackLogFormatter.format_entry_postamble().
Parameters: | entry – in-memory representation of the log entry. |
---|---|
Type : | slacklog.models.SlackLogEntry |
Returns: | Unicode representation of log entry postamble. |
Type : | unicode |
Overrides SlackLogFormatter.format_pkg_preamble().
Parameters: | pkg – in-memory representation of the log entry package |
---|---|
Type : | slacklog.models.SlackLogPkg |
Returns: | Unicode representation of log entry package preamble. |
Type : | unicode |
Return basename for the log entry.
Parameters: | entry – in-memory representation of the log entry. |
---|---|
Type : | slacklog.models.SlackLogEntry |
Returns: | Unicode representation of log entry name |
Type : | unicode |
Return log entry title.
Parameters: | entry – in-memory representation of the log entry. |
---|---|
Type : | slacklog.models.SlackLogEntry |
Returns: | Unicode representation of log entry title |
Type : | unicode |
Return log entry tags.
Parameters: | entry – in-memory representation of the log entry. |
---|---|
Type : | slacklog.models.SlackLogEntry |
Returns: | Unicode representation of log entry tags |
Type : | unicode |