Package: slacklog
slacklog – Convert Slackware Changelog to various formatsslacklog provides programs and a library to convert a Slackware
ChangeLogs into other formats.  Currently, RSS, Atom, JSON, and PyBlosxom
formats are supported.Download:https://pypi.python.org/pypi/slacklogSource code:https://github.com/vmj/slacklogBuilds status:https://travis-ci.org/vmj/slacklogDocumentation:https://slacklog.readthedocs.orgContentsslacklog – Convert Slackware Changelog to various formatsBasic usageRequirementsInstallationTrying it in DockerAuthorsLicenseRelease historyVersion 0.9.6 (2019-03-14)Version 0.9.5 (2018-10-02)Version 0.9.4 (2017-09-03)Version 0.9.3 (2017-08-23)Version 0.9.2 (2017-05-25)Version 0.9.1 (2017-05-24)Verions 0.9.0 (2017-04-05)Version 0.0.9 (2017-04-04)Version 0.0.8 (2014-09-28)Version 0.0.7 (2011-06-16)Version 0.0.6 (2011-03-18)Version 0.0.5 (2011-03-17)Version 0.0.4 (2011-03-17)Version 0.0.3 (2011-02-21)Version 0.0.2 (2011-01-29)Version 0.0.1 (2011-01-28)Basic usageTypical usage of the program looks like this:$ slacklog2rss --changelog slackware-current/ChangeLog.txt \
               --encoding iso8859-1 \
               --out ~/public_html/slackware-current.rss \
               --slackware "Slackware current" \
               --rssLink "http://linuxbox.fi/~vmj/slackware-current.rss" \
               --description "Slackware current activity" \
               --managingEditor "vmj@linuxbox.fi (Mikko Värri)" \
               --webMaster "vmj@linuxbox.fi (Mikko Värri)"The included Python library provides the ability to make custom
formats easily:#!/usr/bin/env python
from __future__ import print_function
import codecs
import locale
from slacklog.parsers import SlackLogParser

def read(file):
    '''Return file contents as Unicode.'''
    return codecs.open(file, 'r', 'iso8859-1').read()

def write(str):
    '''Print out in preferred encoding.'''
    print(str.encode(locale.getpreferredencoding()))

# Parse the ChangeLog
log = SlackLogParser().parse(read('ChangeLog.txt'))

# Just an example of walking the log tree and print it out
for entry in log.entries:
    write(u'[%s] %s\n' % (entry.timestamp.isoformat(), entry.description))
    for pkg in entry.pkgs:
        write(u'%s:%s' % (pkg.pkg, pkg.description))Note that slacklog package deals solely in Unicode; parser expects to
be given Unicode input and formatters generate Unicode data.RequirementsIn addition to Python,python-dateutilis required.Python versions 2.7 and 3.4 - 3.7 are tested, together with python-dateutil versions 2.1 - 2.8.InstallationUse eitherpip install slacklogor download the source archive and
usepython setup.py install.The source code is available atPython Package Index (PyPI)or, if you want the
unreleased version, fromGithubgit repository.Trying it in DockerHere’s one way to hack on this inside a container:$ docker run --rm -it -v $(pwd):/slacklog -w /slacklog python:3.7-alpine3.8 sh
# apk add --no-cache curl
# pip install python-dateutil==2.7.3
# python setup.py install
# sh examples/fetch-changelogs.sh
# sh examples/update-slacklog-rss.shObviously, you need Docker installed and working,
and I’m assuming you run those commands in the git clone.AuthorsOriginal author and current maintainer is Mikko Värri
(vmj@linuxbox.fi).Licenseslacklog is Free Software, licensed under GNU General Public License
(GPL), version 3 or later.  See LICENSE.txt file for details.Release historyVersion 0.9.6 (2019-03-14)Fixed a bug in text formatter when the original timestamp is in 12-hour format.Added Python 3.7 and dateutil 2.8 into test matrix.Deprecated PyBlosxom formatter.Version 0.9.5 (2018-10-02)This release adds the JSON formatter.As for dependencies, support for Python 3.3 was dropped since it had it’s end-of-life a year ago. Also, dateutil 2.7 is
tested to be good.Version 0.9.4 (2017-09-03)The parser subclass can now overwrite the generation of entry identifier and/or checksum.Other than that, tests were updated to use python-dateutil 2.6.1, and documentation was fixed.Version 0.9.3 (2017-08-23)This release is mainly bug fixing.  RSS and atom formatters learnt to take
the feed build time (optionally) as an argument, which makes them more testable.Version 0.9.2 (2017-05-25)This release is backwards incompatible with the previous releases:
SlackLogParser and SlackLogFormatter (and subclasses) have to be instantiated,
and instead of using class methods, instance methods and properties have to be used.Version 0.9.1 (2017-05-24)This release adds checksum, identifier, and parent fields to SlackLogEntry.
Also, a couple of bugs with recognizing package names was resolved.Verions 0.9.0 (2017-04-05)After almost six years with only maintenance releases, it’s time to move to beta.This release switches from distutils to setuptools, and contains some refactoring to scripts (pure refactoring, no
changes in the CLI).Version 0.0.9 (2017-04-04)This release does not add any new functionality.The dependencies were updated: Python 2.7, 3.3 - 3.6, and python-dateutil 2.1 - 2.6.
Support for Python 2.6 was dropped, not because it doesn’t work but because Python core team doesn’t support it.The code was formatted according to PEP-8, and the example script was updated to include Slackware versions 14.0 and
14.2.Version 0.0.8 (2014-09-28)This release does not add any new functionality, but includes support
for Python 3.In addition, Slackware{,64} 14.1 was added to the example script, and
Travis CI and ReadTheDocs were integrated (see the links at the top of
the README).Version 0.0.7 (2011-06-16)This release adds Atom feed formatter, and fixes compatibility issue
with recent ChangeLog.txt format change which caused empty entries to
be generated.  Also, Slackware{,64} 13.37 was added to the example
script.Version 0.0.6 (2011-03-18)This release adds documentation.Version 0.0.5 (2011-03-17)This release adds the example script in source distribution, too.Version 0.0.4 (2011-03-17)This release contains better error handling, better compatibility with
more feed readers, better support for timezones other that UTC, and an
example script suitable for a cron job to update RSS feeds.Version 0.0.3 (2011-02-21)Added PyBlosxom formatter and fixed a couple of issues.Version 0.0.2 (2011-01-29)Packaging cleanups.Version 0.0.1 (2011-01-28)Initial release.