Commit 03f75bb1c5c8fc1a48186d3ccf76e183f40d3c38
1 parent
15667ffb
Exists in
master
and in
1 other branch
New script to get pkgs names from axi.
Showing
2 changed files
with
45 additions
and
1 deletions
Show diff stats
... | ... | @@ -0,0 +1,42 @@ |
1 | +#!/usr/bin/env python | |
2 | +""" | |
3 | + AppRecommender - A GNU/Linux application recommender | |
4 | +""" | |
5 | +__author__ = "Tassia Camoes Araujo <tassia@gmail.com>" | |
6 | +__copyright__ = "Copyright (C) 2011 Tassia Camoes Araujo" | |
7 | +__license__ = """ | |
8 | + This program is free software: you can redistribute it and/or modify | |
9 | + it under the terms of the GNU General Public License as published by | |
10 | + the Free Software Foundation, either version 3 of the License, or | |
11 | + (at your option) any later version. | |
12 | + | |
13 | + This program is distributed in the hope that it will be useful, | |
14 | + but WITHOUT ANY WARRANTY; without even the implied warranty of | |
15 | + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
16 | + GNU General Public License for more details. | |
17 | + | |
18 | + You should have received a copy of the GNU General Public License | |
19 | + along with this program. If not, see <http://www.gnu.org/licenses/>. | |
20 | +""" | |
21 | + | |
22 | +import os | |
23 | +import sys | |
24 | +sys.path.insert(0,'../') | |
25 | +import xapian | |
26 | + | |
27 | +if __name__ == '__main__': | |
28 | + if len(sys.argv)<2: | |
29 | + print "Usage: get_axipkgs index_path" | |
30 | + exit(1) | |
31 | + | |
32 | + axi_path = sys.argv[1] | |
33 | + axi = xapian.Database(axi_path) | |
34 | + for n in range(1,axi.get_lastdocid()): | |
35 | + doc = 0 | |
36 | + try: | |
37 | + doc = axi.get_document(n) | |
38 | + except: | |
39 | + pass | |
40 | + if doc: | |
41 | + xp_terms = [t.term for t in doc.termlist() if t.term.startswith("XP")] | |
42 | + print xp_terms[0].lstrip('XP') | ... | ... |
src/bin/get_desktop.sh
1 | 1 | #!/usr/bin/env bash |
2 | 2 | # |
3 | -# get_desktop.sh - get packages which have desktop files | |
3 | +# get_desktop.sh - get packages which have desktop files | |
4 | +# | |
5 | +# DEPRECATED: use get_axipkgs.py to get this info from axi | |
4 | 6 | |
5 | 7 | cd /usr/share/app-install/desktop |
6 | 8 | sed -ne 's/X-AppInstall-Package=//p' * | sort -u | grep -v kdelibs | grep -v libfm-gtk0 | ... | ... |