diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-04-02 22:05:16 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-04-02 22:05:16 +0100 |
commit | 260d720e3f8905b0b7f0e33e135d67a30d413f2b (patch) | |
tree | dfed9d79ed99d0d5cd17ce03d59b67925985d120 /office.py | |
parent | bde1b948a66e3fa72faeea63b084974863276b7c (diff) |
add filters for office category
Diffstat (limited to 'office.py')
-rwxr-xr-x | office.py | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -37,7 +37,21 @@ class Office(QtWidgets.QMainWindow): def load_packages(self): with sqlite3.connect('/var/lib/epkg/db/epkg.db') as db: cursor=db.cursor() - cursor.execute('''SELECT * from remote_packages''') + cursor.execute(''' + SELECT + a.category AS cat, + a.name AS pn, + a.version AS av, + i.version AS iv, + a.description AS descr + FROM remote_packages AS a + LEFT JOIN local_packages AS i + ON a.category = i.category + AND a.name = i.name + AND a.slot = i.slot + WHERE a.name IN + ('fet', 'libreoffice', 'wps-office', 'cantarell', 'corefonts', 'dejavu', 'liberation-fonts', 'libertine', 'noto', 'open-sans', 'roboto', 'ttf-bitstream-vera', 'qpdfview', 'cups', 'cups-filters', 'cups-pdf', 'simple-scan', 'cnijfilter', 'cnijfilter-drivers', 'hplip') + ''') rows = cursor.fetchall() for row in rows: |