fix find packages

pull/1/head
serkus01 3 years ago
parent dbada433e8
commit 1aa048916e

1
.gitignore vendored

@ -1 +0,0 @@
./pkg.json

@ -1,7 +0,0 @@
00.0.002 - Добавлено выдача overlays
00.0.003 - Добавлены: светлая тема, исправлены некоторые недочёты в интефейсе, реализована выдача параметров пакета по принту(выхлоп в терминале), добавлен пункт меня где по задумке будет находится рекомендации и другая инфоормация(информация проектахб возможно видео или летна активновсти вики).
00.0.004 - Наконец-то выводится информация о паекте.
00.0.005 - Добавалены В выдачу информаци о пакете USE флаги, сделан каркас настройки portage конфигов исправлены некоторые мелкие недочеты в коде, исправлена светлая тема.
00.0.006 - Исравлены некоторые, но не все недочёты. Добалена боковая панель, не помню зачем, вспомню допишу. вынесен обработчик запросов к каталог ./src/
00.0.007 - Исправлены пороки UI,
00.0.008 - Добавлен шрифт, поправлен код, Исправлен UI, намётона главная станичка.

@ -1,7 +1,8 @@
# -*- coding: UTF-8 -*-
#-*- coding: UTF-8 -*-
#!/usr/bin/env python
import os, sys
import os, sys
from package import search
from getUses import get_local_USE
def ScanRecoverFile():
ScanResult =[]
@ -16,6 +17,7 @@ def ScanRecoverFile():
def GenRecoversFun(Reclist):
result ={}
cat= ""
useDis = get_local_USE()
for r in Reclist:
if r.startswith("["):
cat = r.replace("[", "") and r.replace("]", "")
@ -23,6 +25,9 @@ def GenRecoversFun(Reclist):
else:
try:
result[cat].append(search(r))
for u in search(r)['USE']:
if u in useDis:
print("u " + u +"\t"+ useDis[u])
except Exception as e:
print(e)
return result

@ -0,0 +1,46 @@
const { app, BrowserWindow } = require('electron');
const path = require('path');
// Handle creating/removing shortcuts on Windows when installing/uninstalling.
if (require('electron-squirrel-startup')) { // eslint-disable-line global-require
app.quit();
}
const createWindow = () => {
// Create the browser window.
const mainWindow = new BrowserWindow({
width: 800,
height: 600,
});
// and load the index.html of the app.
mainWindow.loadFile(path.join(__dirname, 'localhost:3000'));
// Open the DevTools.
mainWindow.webContents.openDevTools();
};
// This method will be called when Electron has finished
// initialization and is ready to create browser windows.
// Some APIs can only be used after this event occurs.
app.on('ready', createWindow);
// Quit when all windows are closed, except on macOS. There, it's common
// for applications and their menu bar to stay active until the user quits
// explicitly with Cmd + Q.
app.on('window-all-closed', () => {
if (process.platform !== 'darwin') {
app.quit();
}
});
app.on('activate', () => {
// On OS X it's common to re-create a window in the app when the
// dock icon is clicked and there are no other windows open.
if (BrowserWindow.getAllWindows().length === 0) {
createWindow();
}
});
// In this file you can include the rest of your app's specific main process
// code. You can also put them in separate files and import them here.

File diff suppressed because it is too large Load Diff

@ -12,15 +12,15 @@
"name": "webport",
"description": null,
"version": "0.0.1372",
"main": "src/index.js",
"main": "main.js",
"devDependencies": {
"@electron-forge/cli": "^6.0.0-beta.61",
"@electron-forge/maker-deb": "^6.0.0-beta.61",
"@electron-forge/maker-rpm": "^6.0.0-beta.61",
"@electron-forge/maker-squirrel": "^6.0.0-beta.61",
"@electron-forge/maker-zip": "^6.0.0-beta.61",
"electron": "15.0.0",
"react-scripts": "1.0.0"
"electron": "^15.0.0",
"react-scripts": "^4.0.3"
},
"scripts": {
"start": "electron-forge start",

@ -3,7 +3,7 @@
import os, sys
import json
from io import StringIO
from utils.utils import get_list_overlays, sort_inatll_pkg
from utils.utils import get_list_overlays, sort_install_pkg
from GenRecovers import ScanRecoverFile
from getUses import get_global_USE, get_local_USE
from package import search
@ -16,7 +16,7 @@ AliaseCategory ={
"app-crypt":"Шифрование",
"app-dicts":"Словари",
"app-editors":"Текстовые редакторы",
"www-client": "Браузеры",
"www-client":"Браузеры",
"www-servers": "Сервера",
'app-etitor':"Текстовые редакторы",
"game":"Игры",
@ -61,7 +61,8 @@ def create_db():
recovers = ScanRecoverFile()
pkg_list ={}
listUses= dict(LocalUSE=get_local_USE(), GlobalUSE=get_global_USE())
InstallPkgs= sort_inatll_pkg()
InstallPkgs=sort_install_pkg()
portage_list ={}
port_dir =["/var/db/repos", "/usr/portage"]
if not os.path.exists('./pkgs.json'):
print("Create ramdb")
@ -85,27 +86,34 @@ def create_db():
print(e)
if not pkg_name[:-1] in all_pkgs:
portage_list[pkg_name] = search(pkg_name)
print
#print(str(d.split("/")[-2] +"/" + d.split("/")[-1] +"\n"))
if str(d.split("/")[-2] +"/" + d.split("/")[-1]) in AliaseCategory:
all_pkgs.append(AliaseCategory[d])
else:
all_pkgs[str(d.split("/")[-2] +"/" + d.split("/")[-1])] = str(d.split("/")[-2] +"/" + d.split("/")[-1])
#portage_list[str(d.split("/")[-2] +"/" + d.split("/")[-1])] = search(str(d.split("/")[-2] +"/" + d.split("/")[-1]))
if d.split("/")[-2] not in pkg_list.keys():
pkg_list[str(d.split("/")[-2])] = []
pkg_list[d.split("/")[-2]].append(d.split('/')[-1])
#print([d.split("/")[-2]])
if search(str(d.split("/")[-2]))['Name'] != 'Package is not Found':
#portage_list[str(d.split("/")[-2] +"/" + d.split("/")[-1])] = search(str(d.split("/")[-2]))
print([d.split("/")[-2]])
else:
if d.split('/')[-1] not in pkg_list[d.split('/')[-2]]:
pkg_list[d.split("/")[-2]].append(d.split('/')[-1])
#print([d.split('/')[-1]])
#"all_pkgs": all_pkgs, [0]
fn.write(json.dumps({"all_pkgs": all_pkgs,"Catalog": pkg_list, "aliases": AliaseCategory, "overlays": overlays, "recovers": recovers, "usesDecription":listUses, "InstallPkgs":InstallPkgs }))
fn.write(json.dumps({"all_pkgs": all_pkgs, "Catalog": pkg_list, "aliases": AliaseCategory, "overlays": overlays, "recovers": recovers, "usesDecription":listUses, "InstallPkgs":InstallPkgs }))
print(len(pkg_list))
"""
with open('./portage.json', 'w') as p:
p.write(json.dumps({'portage': portage_list}))
#print("Found:\t"+ str(len(pkg_list.keys())) + " category\n" + str(len(all_pkgs)) +"packages\n")
"""
def on_find(p_v):
if not os.path.exists('./pkgs.json'):
create_db()
@ -113,8 +121,8 @@ def on_find(p_v):
ret_p =""
ret = {}
with open('./pkgs.json', 'r') as fn:
#data = fn.read()
pkg_list= fn.read()
data = fn.read()
#pkg_list= fn.read()
pkg_list = data.split("\n")
for i in pkg_list:
@ -126,7 +134,7 @@ def on_find(p_v):
#ret = {"Name": ret_p.split("\t")}
#print(ret_p)
print(p)
#print(p)
return pkg_list #json.dumps(ret)
if __name__ == '__main__':
@ -135,5 +143,5 @@ if __name__ == '__main__':
if len(sys.argv) >=2:
on_find(sys.argv[1])
else:
print("No element to find")
print("No element to find")

@ -12,7 +12,7 @@ def get_global_USE():
pass
else:
try:
ListUSE[line.split('-')[0]] = str(line)
ListUSE[line.split(' -')[0]] = str(line)
except Exception (e):
print(str(e))
return ListUSE
@ -28,7 +28,8 @@ def get_local_USE():
pass
else:
try:
ListUSE[line.split('-')[0]] = str(line.replace(line.split('-')[0], ""))
ListUSE[line.split(' -')[0]] = str(line.replace(line.split('-')[0], ""))
except Exception (e):
print(str(e))
print(ListUSE)
return ListUSE

File diff suppressed because one or more lines are too long

@ -0,0 +1 @@
{"Package_result": [{"Category": "[]", "Name": "app-editors/vim", "version": ["8.2.0814-r100[U]", "8.2.3428-r1[M]", "9999[M]"], "USE": ["X", "acl", "cscope", "debug", "gpm", "lua", "ipv6", "minimal", "nls", "perl", "python", "racket", "ruby", "selinux", "sound", "tcl", "terminal", "vim-pager", "lua_single_target_luajit", "lua_single_target_lua5-1", "python_single_target_python3_8", "python_single_target_python3_9", "python_single_target_python3_10"], "Description": "Vim, an improved vi-style text editor", "Home_page": "https://vim.sourceforge.io/ https://github.com/vim/vim", "repo": "gentoo"}]}

@ -0,0 +1 @@
{"portage": {}}

@ -1,7 +1,8 @@
[net-im]
[Мессенджеры]
element-desktop-bin
telegram-desktop-bin
net-im/zoom
discord-bin
pidgin
teams
slack
@ -11,7 +12,9 @@ clementine
mixxx
lmms
mpd
rhythmbox
[Видео]
media-video/vlc
obs-studio
kdenlive
mplayer
@ -24,14 +27,15 @@ pycharm-community
[графика]
gimp
blender
inkcscape
inkscape
okular
krita
[Игры]
steam-launcher
app-xemacs/games
[Офис]
app-office/wps-office
app-office/libreoffice
wps-office
libreoffice
[Браузеры]
firefox-bin
chromium

@ -4,7 +4,7 @@ import json
#from BaseHTTPServer import BaseHTTPRequestHandler,HTTPServer
from http.server import BaseHTTPRequestHandler
import os
from utils.utils import get_list_overlays, load_config, write_config, sort_inatll_pkg, scan_config_portage
from utils.utils import get_list_overlays, load_config, write_config, sort_install_pkg
from package import search
from findfsdb import on_find
from src.route import Router
@ -110,8 +110,8 @@ class Handler(BaseHTTPRequestHandler):
print(config)
print(param)
elif self.path == '/find':
param = request['params']['name']
elif self.path.startswith("/find/pkg="):
param = self.path.replace("/find/pkg=", "") #request['params']['name']
pk_list = []
search_result = {}
if len(param.split('/')) == 2:

@ -0,0 +1,397 @@
3dfx Enable support for Voodoo chipsets, also called as 3DFX and TDFX 22
3dnow Adds support for 3dnow multimedia processor instructions 129
a52 Enables support for decoding ATSC A/52 streams used in DVD 39
aac Enables support for MPEG-4 AAC Audio 166
aalib Adds support for media-libs/aalib (ASCII-Graphics Library) 108
accessibility Adds support for accessibility (eg 'at-spi' library) 86
acl Adds support for Access Control Lists 247
acpi Adds support for Advanced Configuration and Power Interface 145
adabas Adds support for the Adabas database engine 15
adns Adds support for the adns DNS client library 35
afs Adds OpenAFS support (distributed file system) 47
aim Enable AIM IM protocol support 1
alsa Adds support for media-libs/alsa-lib (Advanced Linux Sound Architecture) 1287
altivec Adds support for optimizations for G4 and G5/ppc970 processors 441
ao Use libao audio output library for sound playback 75
apache2 Add Apache2 support 106
apm Adds APM (Advanced Power Management) support 45
aqua Include support for the Aqua / Carbon GUI 4451
atm Enable Asynchronous Transfer Mode protocol support 43
audiofile Adds support for libaudiofile where applicable 42
avahi Add avahi/Zeroconf support 278
bash-completion Enable bash-completion support 606
bcmath Adds support for libbcmath 15
berkdb Adds support for sys-libs/db (Berkeley DB for MySQL) 387
bidi Enables bidirectional language support 71
bindist Flag to enable or disable options for prebuilt (GRP) packages (eg. due to licensing issues) 206
birdstep Adds support for the Birdstep Database Server 15
blas Adds support for the virtual/blas numerical library 29
bluetooth Enables Bluetooth Support 265
bootstrap !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used during original system bootstrapping [make stage2] 220
boundschecking Adds the bounds checking patch by Haj Ten Brugge, this will DISABLE the hardened PIE+SSP patches 7
branding Enable Gentoo specific branding 54
bsf Enable support for Apache Bean Scripting Framework (dev-java/bsf) 10
build !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used for creating build images and the first half of bootstrapping [make stage1] 1025
bzip2 Use the bzlib compression library 273
cairo Enable support for the cairo graphics library 212
calendar Adds support for calendars (not using mcal!) 35
canna Adds support for the Canna kana to kanji conversion engine 25
caps Use Linux capabilities library to control privilege 203
cdb Adds support for the CDB database engine from the author of qmail 42
cdda Adds Compact Disk Digital Audio (Standard Audio CD) support 75
cddb Access cddb servers to retrieve and submit information about compact disks 60
cdinstall Copies files from the CD rather than asking the user to copy them, mostly used with games 64
cdparanoia Enables cdparanoia (audio CD ripper) support 41
cdr Adds support for CD writer hardware 45
cgi Add CGI script support 66
chasen Enable chasen (Japanese Morphological Analysis System) support 9
cjk Adds support for Multi-byte character languages (Chinese, Japanese, Korean) 138
clamav Adds support for Clam AntiVirus software (usually with a plugin) 38
coreaudio Build the CoreAudio driver on Mac OS X systems 29
cracklib Support for cracklib strong password checking 44
crypt Add support for encryption -- using mcrypt or gpg where applicable 499
cscope Enables cscope interface -- in vim for example 28
css Enables reading of encrypted DVDs 23
ctype Enables ctype functions 9
cups Add support for CUPS (Common Unix Printing System) 456
curl Adds support for client-side URL transfer library 287
curlwrappers Adds support for using curl in streams 13
custom-cflags Build with user-specified CFLAGS (unsupported) 350
cvs Enable CVS (Concurrent Versions System) integration 67
cxx Builds support for C++ (bindings, extra libraries, code generation, ...) 77
db2 Enables support for IBM DB2 database server 18
dbase Adds support for dbase file format 13
dbi Enable dev-db/libdbi (database-independent abstraction layer) support 41
dbm Adds support for generic DBM databases 16
dbmaker Adds support for dbmaker database server 15
dbus Enable dbus support for anything that needs it (gpsd, gnomemeeting, etc) 871
dbx Adds database abstraction layer 13
debug Enable extra debug codepaths, like asserts and extra output. If you want to get meaningful backtraces see http://www.gentoo.org/proj/en/qa/backtraces.xml 13768
dedicated Adds support for dedicated game servers (some packages do not provide clients and servers at the same time) 354
dga Adds DGA (Direct Graphic Access) support for X 88
directfb Adds support for DirectFB layer (library for FB devices) 161
djvu support DjVu, a PDF-like document format esp. suited for scanned documents 46
doc Adds extra documentation (API, Javadoc, etc) 12028
dri Enable direct rendering: used for accelerated 3D and some 2D, like DMA 53
dts Enables DTS Coherent Acoustics decoder support 25
dv Enables support for a codec used by many camcorders 54
dvb Adds support for DVB (Digital Video Broadcasting) 68
dvd Adds support for DVDs 64
dvdr Adds support for DVD writer hardware (e.g. in xcdroast) 31
eds Enables support for Evolution-Data-Server (EDS) 141
emacs Adds support for GNU Emacs 559
emboss Adds support for the European Molecular Biology Open Software Suite 24
empress Adds support for the Empress database server 15
empress-bcs Adds local access support for the Empress database server 15
encode Adds support for encoding of audio or video files 69
enscript Add enscript support to colourize code stored in the repository 16
esd Adds support for media-sound/esound (Enlightened Sound Daemon) 488
esoob Adds support for Easysoft OOD database 15
evo Adds support for mail-client/evolution 32
examples Install examples, usually source code 2686
exif Adds support for reading EXIF headers from JPEG and TIFF images 186
expat Enable the use of dev-libs/expat for XML parsing 92
fam Enable FAM (File Alteration Monitor) support 173
fastcgi Add support for the FastCGI interface 77
fbcon Adds framebuffer support for the console, via the kernel 184
ffmpeg Enable ffmpeg-based audio/video codec support 320
fftw Use FFTW library for computing Fourier transforms 163
firebird Adds support for the Firebird relational database 115
firefox Build against Firefox instead of Seamonkey/Mozilla 22
flac Adds support for FLAC: Free Lossless Audio Codec 343
flatfile Adds dbm support for flat files 17
fltk Adds support for the Fast Light Toolkit gui interface 59
fontconfig Support for configuring and customizing font access via media-libs/fontconfig 102
foomaticdb Adds support for the foomatic printing driver database 19
fortran Adds support for fortran (formerly f77) 287
freetds Adds support for the TDS protocol to connect to MSSQL/Sybase databases 47
freewnn Adds support for FreeWnn kana to kanji conversion engine 15
frontbase Adds support for the frontbase sql server 15
ftp Adds FTP (File Transfer Protocol) support 70
gcj Enable building with gcj (The GNU Compiler for the Javatm Programming Language) 215
gd Adds support for media-libs/gd (to generate graphics on the fly) 119
gd-external Use the external version of gd rather than the bundled one (possibly dangerous) 15
gdbm Adds support for sys-libs/gdbm (GNU database libraries) 267
geoip Add geoip support for country and city lookup based on IPs 75
ggi Adds support for media-libs/libggi (non-X video api/drivers) 79
gif Adds GIF image support 215
gimp Build a plugin for the GIMP 50
ginac Adds sci-mathematics/ginac (symbolic math) support 4
glut Build an OpenGL plugin using the GLUT library 29
gmp Adds support for dev-libs/gmp (GNU MP library) 135
gnome Adds GNOME support 1085
gnome-keyring Enable support for storing passwords via gnome-keyring 171
gnuplot Enable support for gnuplot (data and function plotting) 44
gnustep Adds integration with GNUstep environment 8
gnutls Adds support for net-libs/gnutls (TLS 1.0 and SSL 3.0 support) 559
gphoto2 Adds digital camera support 112
gpm Adds support for sys-libs/gpm (Console-based mouse driver) 185
gps Adds support for Global Positioning System 49
graphviz Adds support for the Graphviz library 129
gsl Use the GNU scientific library for calculations 55
gsm Adds support for the gsm lossy speech compression codec 153
gstreamer Adds support for media-libs/gstreamer (Streaming media) 295
gtk Adds support for x11-libs/gtk+ (The GIMP Toolkit) 1414
gtkhtml Adds support for gnome-extra/gtkhtml 33
guile Adds support for the guile Scheme interpreter 82
gzip Compress files with Lempel-Ziv coding (LZ77) 279
hal Enable Hardware Abstraction Layer (HAL) support 438
handbook Enable handbooks generation for KDE4. 13
hardened activate default security enhancements for toolchain (gcc, glibc, binutils) 420
hddtemp Enable monitoring of hdd temperature (app-admin/hddtemp) 25
hdf5 Adds support for the Hierarchical Data Format v5 38
ibm Add support for IBM ppc64 specific systems 41
iconv Enable support for the iconv character set conversion library 212
icq Enable ICQ IM protocol support 8
icu Enable ICU (Internationalization Components for Unicode) support, using dev-libs/icu 104
idn Enable support for Internationalized Domain Names 142
ieee1394 Enable FireWire/iLink IEEE1394 support (dv, camera, ...) 111
imagemagick Enables support for Imagemagick (image converter) 135
imap Adds support for IMAP (Internet Mail Application Protocol) 62
imlib Adds support for imlib, an image loading and rendering library 80
inifile Adds dbm support for .ini files 15
innodb Adds innodb support for mySQL (transaction support) 3
interbase Adds support for Interbase database 17
iodbc Adds support for iODBC library 58
ipod Enable support for iPod device access 76
ipv6 Adds support for IP version 6 1553
jabber Enable jabber IM protocol support 89
jack Adds support for the JACK Audio Connection Kit 649
java Adds support for Java 743
java6 Use Java 1.6 to build package with || ( reduced deps, 1.6 features, source/target 1.6 ) 14
javascript Enables javascript support 50
jbig enables jbig-kit support for tiff, Hylafax, ImageMagick, etc 38
jingle Enables voice calls for jabber 36
joystick Add support for joysticks in all packages 112
jpeg Adds JPEG image support 807
jpeg2k Support for JPEG 2000, a wavelet-based image compression format 179
kde Adds support for kde-base/kde (K Desktop Enviroment) 465
kdeenablefinal EXPERIMENTAL: KDE ebuilds will use the enable-final flag, yielding compilation speedups at the cost of heavy mem usage and potentially causing problems. We strongly discourage setting this 3110
kdeprefix Makes a KDE prefixed install into /usr/kde/$ if enabled or into /usr (FHS compatible) otherwise 1965
kerberos Adds kerberos support 590
kolab Adds support for the Kolab groupware server 24
kontact Enable support for the KDE personal information manager (kde-base/kdepim*) 9
ladspa Enables the ability to support ladspa plugins 103
lame Prefer using LAME libraries for MP3 encoding support 76
lapack Adds support for the virtual/lapack numerical library 57
lash Adds LASH Audio Session Handler support 68
latex Adds support for LaTeX (typesetting package) 234
lcms Adds lcms support (color management engine) 245
ldap Adds LDAP support (Lightweight Directory Access Protocol) 1088
libcaca Add support for colored ASCII-art graphics 66
libedit Use the libedit library (replacement for readline) 76
libgda Adds GNOME Data Access support 19
libnotify Enable desktop notification support 416
libsamplerate Build with support for converting sample rates using libsamplerate 120
libwww Adds libwww support (General purpose WEB API) 37
lirc Adds support for lirc (Linux's Infra-Red Remote Control) 209
livecd !!internal use only!! DO NOT SET THIS FLAG YOURSELF!, used during livecd building 41
lm_sensors Adds linux lm_sensors (hardware sensors) support 48
lua Enable Lua scripting support 221
lzo Enables support for lzo compression 98
m17n-lib Enable m17n-lib support 32
mad Adds support for mad (high-quality mp3 decoder library and cli frontend) 172
maildir Adds support for maildir (~/.maildir) style mail spools 41
mailwrapper Adds mailwrapper support to allow multiple MTAs to be installed 67
matroska Adds support for the matroska container format (extensions .mkv, .mka and .mks) 51
matrox Adds Matrox MGA support to mplayer 4
mbox Adds support for mbox (/var/spool/mail) style mail spools 82
mcve Support for the MCVE credit card payment system 12
memlimit Adds memory usage limiting in supporting programs 4
mhash Adds support for the mhash library 22
migemo Enables migemo support for Japanese 26
mikmod Adds libmikmod support to allow playing of SoundTracker-style music files 46
milter Adds sendmail mail filter (milter) support 23
mime Adds MIME support 8
minimal Install a very minimal build (disables, for example, plugins, fonts, most drivers, non-critical features) 769
mmap Adds mmap (memory map) support 23
mmx Adds support for optimizations for Pentium MMX and Athlon class processors 474
mng Adds support for libmng (MNG images) 105
modplug Adds libmodplug support 64
modules Build the kernel modules 42
mono Build Mono bindings to support dotnet type stuff 97
motif Adds support for the Motif toolkit 108
mozilla Adds support for the Mozilla web-browser 26
mp3 Add support for reading mp3 files 357
mp4 Support for MP4 container format 36
mpeg Adds libmpeg3 support to various packages 67
mpi Adds MPI (Message Passing Interface) layer to the apps that support it 186
mplayer Enable mplayer support for playback or encoding 77
msn Enable MSN Messenger IM protocol support 56
msql Adds support for the MSQL database server 14
mssql Adds support for Microsoft SQL Server database 65
mtp Enable support for Media Transfer Protocol 63
mule Adds multi-language support to XEmacs 9
multilib On 64bit systems, if you want to be able to compile 32bit and 64bit binaries 368
musepack Enable support for the musepack audio codec 111
musicbrainz Lookup audio metadata using MusicBrainz community service (musicbrainz.org) 54
mysql Adds mySQL Database support 1154
mysqli Adds support for the improved mySQL libraries 18
nas Adds support for network audio sound 333
ncurses Adds ncurses support (console display library) 655
netboot Enables network booting 27
netcdf Enable NetCDF data format support 19
networkmanager Enable net-misc/networkmanager support 170
neXt Enable neXt toolkit 14
nis Support for NIS/YP services 116
nls Adds Native Language Support (using gettext - GNU locale utilities) 4047
nntp Add support for newsgroups (Network News Transfer Protocol) 80
nocd Install all files required to run the application without a CD mounted 9
nocxx Disable support for C++ (DON'T USE THIS UNLESS YOU KNOW WHAT YOU'RE DOING) 320
nptl Enable support for Native POSIX Threads Library, the new threading module (requires linux-2.6 or better usually) 293
nsplugin Build plugin for browsers supporting the Netscape plugin architecture (that is almost any modern browser) 187
ocaml Adds support/bindings for the Ocaml language 22
ocamlopt Enables ocamlopt support (ocaml native code compiler) -- Produces faster programs (Warning: you have to disable/enable it at a global scale) 0
oci8 Adds Oracle 8 Database Support 42
oci8-instant-client Use dev-db/oracle-instantclient-basic as Oracle provider instead of requiring a full Oracle server install 23
odbc Adds ODBC Support (Open DataBase Connectivity) 366
offensive Enables potentially offensive items in packages 48
ofx Enable support for importing (and exporting) OFX (Open Financial eXchange) data files 43
ogg Adds support for the Ogg container format (commonly used by Vorbis, Theora and flac) 208
old-linux Add support for linux-2.4 and older 19
openal Adds support for the Open Audio Library 221
openexr Support for the OpenEXR graphics file format 115
opengl Adds support for OpenGL (3D graphics) 1142
openmp Build support for the OpenMP (support parallel computing), requires >=sys-devel/gcc-4.2 built with USE="openmp" 283
oracle Enable Oracle Database support 62
osc Enables support for Open Sound Control 26
oscar Enable Oscar (AIM/ICQ) IM protocol support 19
oss Adds support for OSS (Open Sound System) 661
pam Adds support for PAM (Pluggable Authentication Modules) - DANGEROUS to arbitrarily flip 747
pch Enable precompiled header support for faster compilation at the expense of disk space and memory (>=sys-devel/gcc-3.4 only) 308
pcmcia Adds support for PCMCIA slots/devices found on laptop computers 39
pcntl Adds support for process creation functions 15
pcre Adds support for Perl Compatible Regular Expressions 219
pda Adds support for portable devices 47
pdf Adds general support for PDF (Portable Document Format), this replaces the pdflib and cpdflib flags 174
perl Adds support/bindings for the Perl language 654
php Include support for the PHP language 80
plasma Build optional plasma widgets that require kde-base/libplasma 45
plotutils Add support for plotutils (library for 2-D vector graphics) 26
png Adds support for libpng (PNG images) 724
policykit Use sys-auth/policykit to gain privileges 150
portaudio Adds support for the crossplatform portaudio audio API 124
posix Adds support for POSIX-compatible functions 12
postgres Adds support for the postgresql database 1021
ppds Adds support for automatically generated ppd (printing driver) files 24
prefix Defines if a Gentoo Prefix offset installation is used 0
prelude Adds support/bindings for the Prelude Intrusion Detection System 32
profile Adds support for software performance analysis (will likely vary from ebuild to ebuild) 1151
pulseaudio Adds support for PulseAudio sound server 515
python Adds support/bindings for the Python language 1286
qdbm Adds support for the qdbm (Quick Database Manager) library 32
qmail-spp Adds support for qmail SMTP plugins 11
qt4 Adds support for the Qt GUI/Application Toolkit version 4.x 358
quicktime Adds support for OpenQuickTime 56
radius Adds support for RADIUS authentication 78
raw Add support for raw image formats 53
rdesktop Adds support for the remote desktop protocol, usually used to connect to Windows servers 16
readline Enables support for libreadline, a GNU line-editing library that almost everyone wants 596
recode Enables support for the GNU recode library 17
rss Enables support for RSS feeds 78
ruby Adds support/bindings for the Ruby language 253
samba Adds support for SAMBA (Windows File and Printer sharing) 356
sapdb Adds support for SAP DB 16
sasl Adds support for the Simple Authentication and Security Layer 304
savedconfig Use this to restore your config from /etc/portage/savedconfig $/$. Make sure your USE flags allow for appropriate dependencies 83
scanner Adds support for scanner hardware (e.g. build the sane frontend in kdegraphics) 212
sdl Adds support for Simple Direct Layer (media library) 519
seamonkey Adds support for the Seamonkey web-browser 18
selinux !!internal use only!! Security Enhanced Linux support, this must be set by the selinux profile or breakage will occur 1049
semantic-desktop Cross-KDE support for semantic search and information retrieval 128
session Adds persistent session support 50
sharedext Adds support for building shared extensions in PHP 15
sharedmem Adds support for shared memory use 17
shorten Adds support for the shorten audio compressor 6
simplexml support for SimpleXML 7
skey Enable S/Key (Single use password) authentication support 42
slang Adds support for the slang text display library (it's like ncurses, but different) 89
slp Adds Service Locator Protocol support 50
smartcard Enables smartcard support 44
smp Enable support for multiprocessors or multicore systems 36
sndfile Adds support for libsndfile 115
snmp Adds support for the Simple Network Management Protocol if available 221
soap Adds support for SOAP (Simple Object Access Protocol) 34
sockets Adds support for tcp/ip sockets 30
socks5 Adds support for the socks5 proxy 74
solid Adds support for the Solid database engine 16
source Zip the sources and install them 2135
sox Adds support for Sound eXchange (SoX) 27
speex Adds support for the speex audio codec (used for speech) 206
spell Adds dictionary support 466
sqlite Adds support for sqlite - embedded sql database 667
sqlite3 Adds support for sqlite3 - embedded sql database 90
sse fast floating point optimization for PentiumIII+ class chips 282
sse2 faster floating point optimization for SSE2 capable chips 257
ssl Adds support for Secure Socket Layer connections 2196
startup-notification Enable application startup event feedback mechanism 135
static !!do not set this during bootstrap!! Causes binaries to be statically linked instead of dynamically 1169
static-libs Build static libraries 730
subversion Enable subversion (version control system) support 124
suid Enable setuid root program, with potential security risks 61
svg Adds support for SVG (Scalable Vector Graphics) 251
svga Adds support for SVGAlib (graphics library) 168
sybase Adds support for the Sybase SQL Database Server 17
sybase-ct Adds support for Sybase-CT 15
symlink Force kernel ebuilds to automatically update the /usr/src/linux symlink 699
syslog Enables support for syslog 119
sysvipc Support for System V-compatible inter-process communication 15
szip Use the szip compression library 17
taglib Enable tagging support with taglib 74
tcl Adds support the Tcl language 302
tcpd Adds support for TCP wrappers 330
test Workaround to pull in packages needed to run with FEATURES=test. Portage-2.1.2 handles this internally, so don't set it in make.conf/package.use anymore 6229
theora Adds support for the Theora Video Compression Codec 174
threads Adds threads support for various packages. Usually pthreads 773
tidy Adds support for HTML Tidy 32
tiff Adds support for the TIFF image format 373
timidity Build with Timidity++ (MIDI sequencer) support 18
tk Adds support for Tk GUI toolkit 376
tokenizer Adds support for the PHP file parser 9
truetype Adds support for FreeType and/or FreeType2 fonts 359
uclibc Enable uclibc specific patches and build or link uclibc 27
unicode Adds support for Unicode 502
usb Adds USB support to applications that have optional USB support (e.g. cups) 267
v4l Enables video4linux support 206
v4l2 Enable video4linux2 support 135
vanilla Do not add extra patches which change default behaviour; DO NOT USE THIS ON A GLOBAL SCALE as the severity of the meaning changes drastically 469
vcd Video CD support 35
vhosts Adds support for installing web-based applications into a virtual-hosting environment 743
videos Install optional video files (used in some games) 29
vim-syntax Pulls in related vim syntax scripts 267
vnc Enable VNC (remote desktop viewer) support 49
voodoo3 Adds support for 3Dfx's Voodoo3 video chipset, else defaults to Voodoo4/5 support if not in USE 2
vorbis Adds support for the OggVorbis audio codec 496
wavpack Add support for wavpack audio compression tools 94
wddx Adds support for Web Distributed Data eXchange 15
wifi Enable wireless network functions 88
win32codecs use win32codecs package for dll avi decoding support (wmv and what not) 65
wmf Adds support for the Windows Metafile vector image format 53
wxwidgets Adds support for wxWidgets/wxGTK GUI toolkit 121
X Adds support for X11 2268
x264 Enable h264 encoding using x264 87
xattr Adds support for extended attributes (filesystem-stored metadata) 135
Xaw3d Adds support for the 3d athena widget set 74
xcb Support the X C-language Binding, a replacement for Xlib 61
xcomposite Enable support for the Xorg composite extension 147
xemacs Add support for XEmacs 51
xface Adds xface support used to allow a small image of xface format to be included in an email via the header 'X-Face' 36
xft Build with support for XFT font renderer (x11-libs/libXft) 81
xine Add support for the XINE movie libraries 82
xinerama Add support for the xinerama X11 extension, which allows you to stretch your display across multiple monitors 783
xinetd Add support for the xinetd super-server 128
xml Add support for XML files 565
xmlrpc Support for xml-rpc library 57
xmp Enable support for Extensible Metadata Platform (Adobe XMP) 53
xosd Sends display using the X On Screen Display library 39
xpm Adds support for XPM graphics format 61
xscreensaver Adds support for XScreenSaver extension 51
xsl Check/Support flag for XSL library (version 1) 17
xulrunner Build native browser integration against xulrunner instead of firefox or seamonkey 53
xv Adds in optional support for the Xvideo extension (an X API for video playback) 91
xvid Adds support for xvid.org's open-source mpeg-4 codec 57
yahoo Enable Yahoo Messenger IM protocol support 28
yaz Adds in optional support for the Z39.50 Protocol for Information Retrieval (YAZ) 18
zeroconf Support for DNS Service Discovery (DNS-SD) 106
zlib Adds support for zlib (de)compression 681
zsh-completion Enable zsh completion support 86

@ -3,6 +3,7 @@
'__autor__'== 'serkus'
import os, sys, json
from urllib import request
from package import search
#import xml
import xml.etree.ElementTree as ET
#Проверяем пользователь ROOT или нет
@ -20,6 +21,9 @@ def read_configs(filename):
print("Path is not Found")
#получаем список оверлеев
def enable_overlays():
path='/etc/portage/repos.conf/'
def get_list_overlays():
overlays =[]
@ -33,6 +37,7 @@ def get_list_overlays():
name = ""
description = ""
homepage = ""
feed =""
for child in root.findall('repo'):
name = child.find('name').text
try:
@ -43,7 +48,14 @@ def get_list_overlays():
homepage = child.find('homepage').text
except AttributeError:
homepage = "У overlay нет домашней странички"
overlay = dict(name=name, description=description, homepage=homepage)
try:
feed = child.find('feed').text
except AttributeError:
feed = "У overlay нет ссылки и на дерево"
overlay = dict(name=name, description=description, homepage=homepage, feed=feed)
overlays.append(overlay)
#print(str(overlays))
@ -93,16 +105,22 @@ def load_config():
#SORT IN INTALL PAKAGES
#'/var/db/pkg/'
def sort_inatll_pkg():
INSTALL = []
path = '/var/db/pkg'
def sort_install_pkg():
INSTALL = {}
path = '/var/db/pkg/'
for d, dirs, files in os.walk(path):
for f in files:
if f.endswith('.ebuild'):
INSTALL.append(f.replace('.ebuild', ""))
if d.replace(path, "").split('/')[0]not in INSTALL:
INSTALL[d.replace(path, "").split('/')[0]] =[]
INSTALL[d.replace(path, "").split('/')[0]].append( f.replace('.ebuild', ""))
else:
INSTALL[d.replace(path, "").split('/')[0]].append( f.replace('.ebuild', ""))
#INSTALL[d.replace(path, "").split('/')[0]] =[]
#print(str(len(INSTALL)))
#return json.dumps({'install_pkgs':INSTALL})
return INSTALL
return INSTALL
def scan_config_portage():
dir_root ="/etc/portage"
@ -115,11 +133,10 @@ def scan_config_portage():
print(str(d))
i=i+1
for fl in files:
with open(d + "/" +fl) as f:
pf[str(d.split('/')[-1]) + "/"+ fl]= f.read().split('\n')
str(d.split('/')[-1])
print(dr)
config = {'portage': pf}
print("config:\t" + str(config))
return config
return config

@ -1,43 +0,0 @@
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import sys
import argparse
parser = argparse.ArgumentParser(description='Convert an XML file to JSON.')
parser.add_argument('--unsafe', action='store_true',
help='do not use defusedxml: only for known-safe XML!')
parser.add_argument('infile', nargs='?', type=argparse.FileType('rt'),
default=sys.stdin)
def xml_element_to_dict(elem):
"Convert XML Element to a simple dict"
inner = dict(elem.attrib)
children = list(map(xml_element_to_dict, list(elem)))
text = elem.text and elem.text.strip()
if text:
inner['@text'] = text
if children:
inner['@children'] = children
return {elem.tag: inner}
def main(args):
"Dump JSON-from-parsed-XML to stdout"
if args.unsafe:
import xml.etree.ElementTree as ElementTree
# import defusedxml.ElementTree as ElementTree
xml_parser = ElementTree.parse(args.infile)
root = xml_parser.getroot()
json.dump(xml_element_to_dict(root), sys.stdout, indent=2)
print()
if __name__ == '__main__':
args = parser.parse_args()
main(args)
Loading…
Cancel
Save