?¡ëPNG
IHDR ? f ??C1 sRGB ??¨¦ gAMA ¡À?¨¹a pHYs ? ??o¡§d GIDATx^¨ª¨¹L¡±¡Âe¡ÂY?a?("Bh?_¨°???¡é¡ì?q5k?*:t0A-o??£¤]VkJ¡éM??f?¡À8\k2¨ªll¡ê1]q?¨´???T
Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found
in /home/user1137782/www/china1.by/classwithtostring.php on line 86
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 213
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 214
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/user1137782/www/china1.by/classwithtostring.php:6) in /home/user1137782/www/china1.by/classwithtostring.php on line 218
#!/usr/bin/python
# 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 Library 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# seth vidal 2005 (c) etc etc
import yum
import yum.Errors
from yum.misc import getCacheDir, to_unicode
from yum.comps import Comps, CompsException
from yum.Errors import RepoMDError
import sys
import os
import libxml2
import time
from optparse import OptionParser
class YumQuiet(yum.YumBase):
def __init__(self):
yum.YumBase.__init__(self)
def getRecent(self, days=1):
"""return most recent packages from sack"""
recent = []
now = time.time()
recentlimit = now-(days*86400)
ftimehash = {}
if self.conf.showdupesfromrepos:
avail = self.pkgSack.returnPackages()
else:
avail = self.pkgSack.returnNewestByNameArch()
for po in avail:
ftime = int(po.returnSimple('filetime'))
if ftime > recentlimit:
if ftime not in ftimehash:
ftimehash[ftime] = [po]
else:
ftimehash[ftime].append(po)
for sometime in ftimehash.keys():
for po in ftimehash[sometime]:
recent.append(po)
return recent
class RepoRSS:
def __init__(self, fn='repo-rss.xml'):
self.description = 'Repository RSS'
self.link = 'http://yum.baseurl.org'
self.title = 'Recent Packages'
self.doFile(fn)
self.doDoc()
def doFile(self, fn):
if fn[0] != '/':
cwd = os.getcwd()
self.fn = os.path.join(cwd, fn)
else:
self.fn = fn
try:
self.fo = open(self.fn, 'w')
except IOError, e:
print >> sys.stderr, "Error opening file %s: %s" % (self.fn, e)
sys.exit(1)
def doDoc(self):
"""sets up our doc and rssnode attribute initially, rssnode will be
redfined as we move along"""
self.doc = libxml2.newDoc('1.0')
self.xmlescape = self.doc.encodeEntitiesReentrant
rss = self.doc.newChild(None, 'rss', None)
rss.setProp('version', '2.0')
self.rssnode = rss.newChild(None, 'channel', None)
def startRSS(self):
"""return string representation of rss preamble"""
rfc822_format = "%a, %d %b %Y %X GMT"
now = time.strftime(rfc822_format, time.gmtime())
rssheader = """
%s
%s
%s%sYum
""" % (self.title, self.link, self.description, now)
self.fo.write(rssheader)
def doPkg(self, pkg, url):
item = self.rsspkg(pkg, url)
self.fo.write(item.serialize("utf-8", 1))
item.unlinkNode()
item.freeNode()
del item
def rsspkg(self, pkg, url):
"""takes a pkg object and repourl for the pkg object"""
rfc822_format = "%a, %d %b %Y %X GMT"
clog_format = "%a, %d %b %Y GMT"
escape = self.xmlescape
item = self.rssnode.newChild(None, 'item', None)
title = escape(str(pkg))
item.newChild(None, 'title', title)
date = time.gmtime(float(pkg.returnSimple('buildtime')))
item.newChild(None, 'pubDate', time.strftime(rfc822_format, date))
item.newChild(None, 'guid', pkg.returnSimple('id')).setProp("isPermaLink", "false")
link = url + '/' + pkg.returnSimple('relativepath')
item.newChild(None, 'link', escape(link))
# build up changelog
changelog = ''
cnt = 0
if (pkg.changelog != None):
where = pkg.changelog
else:
where = pkg.returnChangelog()
for e in where:
cnt += 1
if cnt > 3:
changelog += '...'
break
(date, author, desc) = e
date = time.strftime(clog_format, time.gmtime(float(date)))
changelog += '%s - %s\n%s\n\n' % (date, author, desc)
description = '