Browse Source

add racovers

master
serkus 1 year ago
parent
commit
2594eca6fb
  1. 8
      recovers.txt
  2. 10
      utils/utils.py

8
recovers.txt

@ -21,9 +21,15 @@ smplayer
[Web-сервер]
nginx
apache
tornado
[Dev-util]
pycharm-community
[графика]
dev-python/django
dev-python/flask
net-libs/nodejs
dev-lang/erlang
app-containers/docker
[Графика]
gimp
blender
inkscape

10
utils/utils.py

@ -147,6 +147,7 @@ def sort_install_pkg():
#pkg =scan_config_portage()
INSTALL = {}
pkg_name =""
TrePortage = ScanTreePortage()
path = '/var/db/pkg/'
for d, dirs, files in os.walk(path):
for f in files:
@ -163,6 +164,7 @@ def sort_install_pkg():
#print(pkg_name)
if pkg_name not in INSTALL:
INSTALL[d.replace(path, "").split('/')[0]] = []
if
INSTALL[d.replace(path,"").split('/')[0]].append(dict(name = pkg_name[:-1], ver = f.replace(pkg_name, "")))
else:
@ -179,8 +181,10 @@ def sort_install_pkg():
#print(str(len(INSTALL)))
#return json.dumps({'install_pkgs':INSTALL})
return INSTALL
def scan TreePortage():
def ScanTreePortage():
DirsRoot = ["/var/db/repos", "/usr/portage"]
d, ListTree, f for in os.walk('/usr/portage') and d, ListTree, f for in os.walk("/var/db/repos")
return ListTree
def scan_config_portage():
Dirs_root = ["/var/db/repos", "/usr/portage"]
@ -190,8 +194,8 @@ def scan_config_portage():
Data = {}
Pf = {}
for Dir_root in Dirs_root:
for d, dirs, files in os.walk(dir_root):
print(str(d))
for d, dirs, files in os.walk(Dir_root):
#print(str(d))
I += 1
for fl in files:
with open(d + "/" + fl) as f:

Loading…
Cancel
Save