Skip to content

Commit

Permalink
update rss plugin: remove comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nazunalika committed Aug 19, 2024
1 parent 65c531c commit 951558d
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions mangle/generators/rss.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -19,8 +35,6 @@
from xml.dom import minidom
import dnf
import dnf.exceptions
#from dnf.comps import Comps
#import libxml2

def to_unicode(string: str) -> str:
"""
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 951558d

Please sign in to comment.