From 951558deb485a27ac67866ca4cad59686260d132 Mon Sep 17 00:00:00 2001 From: Louis Abel Date: Mon, 19 Aug 2024 08:26:52 -0700 Subject: [PATCH] update rss plugin: remove comments --- mangle/generators/rss.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/mangle/generators/rss.py b/mangle/generators/rss.py index 5650e09..45a9271 100644 --- a/mangle/generators/rss.py +++ b/mangle/generators/rss.py @@ -4,6 +4,22 @@ # modified version of repo-rss from yum utils # changelog # -> 20230912: do not xmlescape entire description variable +# -> 20240819: remove commented commands and imports +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +# seth vidal 2005 (c) etc etc import sys import os @@ -19,8 +35,6 @@ from xml.etree.ElementTree import ElementTree, TreeBuilder, tostring from xml.dom import minidom import dnf import dnf.exceptions -#from dnf.comps import Comps -#import libxml2 def to_unicode(string: str) -> str: """ @@ -277,9 +291,7 @@ def main(options): modobj.disable(['*']) sack_query = dnfobj.sack.query().available() - #recent = sack_query.filter(latest_per_arch=1) recent = dnfobj.get_recent(days=days) - #sorted_recents = sorted(set(recent.run()), key=lambda pkg: pkg.buildtime) sorted_recents = sorted(set(recent), key=lambda pkg: pkg.buildtime) sorted_recents.reverse() make_rss_feed(options.filename, options.title, options.link,