Commit 13f6743dc5c5eda0697cb87b68864509a29363d2
1 parent
bd7e4d67
Exists in
master
and in
1 other branch
Added DDE url to config.
Showing
2 changed files
with
10 additions
and
5 deletions
Show diff stats
src/config.py
... | ... | @@ -40,7 +40,7 @@ class Config(): |
40 | 40 | self.output = "/dev/null" |
41 | 41 | self.survey_mode = 1 |
42 | 42 | self.axi = "/var/lib/apt-xapian-index/index" |
43 | - self.dde_url = "http://dde.debian.net/dde/q/udd/packages/all/%s?t=json" | |
43 | + self.dde_url = "http://dde.debian.net/dde/q/udd/packs/all/%s?t=json" | |
44 | 44 | self.popcon_index = os.path.expanduser("~/.app-recommender/popcon_index") |
45 | 45 | self.popcon_dir = os.path.expanduser("~/.app-recommender/popcon_dir") |
46 | 46 | self.clusters_dir = os.path.expanduser("~/.app-recommender/clusters_dir") |
... | ... | @@ -64,11 +64,12 @@ class Config(): |
64 | 64 | print "" |
65 | 65 | print " [ data sources ]" |
66 | 66 | print " -a, --axi=PATH Path to apt-xapian-index" |
67 | + print " -e, --dde=URL DDE url" | |
67 | 68 | print " -p, --popconindex=PATH Path to popcon index" |
68 | 69 | print " -m, --popcondir=PATH Path to popcon submissions dir" |
69 | 70 | print " -u, --indexmode= 'old'|'reindex'|'cluster'|'recluster'" |
70 | 71 | print " -l, --clustersdir=PATH Path to popcon clusters dir" |
71 | - print " -e, --medoids=k Number of medoids for clustering" | |
72 | + print " -c, --medoids=k Number of medoids for clustering" | |
72 | 73 | print "" |
73 | 74 | print " [ recommender ]" |
74 | 75 | print " -w, --weight=OPTION Search weighting scheme" |
... | ... | @@ -127,9 +128,9 @@ class Config(): |
127 | 128 | self.strategy = self.read_option('recommender', 'strategy') |
128 | 129 | self.profile_size = self.read_option('recommender', 'profile_size') |
129 | 130 | |
130 | - short_options = "hdvo:a:p:m:ul:e:w:s:z:" | |
131 | + short_options = "hdvo:a:p:m:ul:c:w:s:z:" | |
131 | 132 | long_options = ["help", "debug", "verbose", "output=", |
132 | - "axi=", "popconindex=", "popcondir=", "indexmode=", | |
133 | + "axi=", "dde=", "popconindex=", "popcondir=", "indexmode=", | |
133 | 134 | "clustersdir=", "kmedoids=", "weight=", "strategy=", |
134 | 135 | "profile_size="] |
135 | 136 | try: |
... | ... | @@ -153,6 +154,8 @@ class Config(): |
153 | 154 | self.output = p |
154 | 155 | elif o in ("-a", "--axi"): |
155 | 156 | self.axi = p + "/index" |
157 | + elif o in ("-e", "--dde"): | |
158 | + self.dde_url = p | |
156 | 159 | elif o in ("-p", "--popconindex"): |
157 | 160 | self.popcon_index = p |
158 | 161 | elif o in ("-m", "--popcondir"): |
... | ... | @@ -161,7 +164,7 @@ class Config(): |
161 | 164 | self.index_mode = p |
162 | 165 | elif o in ("-l", "--clustersdir"): |
163 | 166 | self.clusters_dir = p |
164 | - elif o in ("-e", "--kmedoids"): | |
167 | + elif o in ("-c", "--kmedoids"): | |
165 | 168 | self.k_medoids = p |
166 | 169 | elif o in ("-w", "--weight"): |
167 | 170 | self.weight = p | ... | ... |
src/examples/app_recommender.cfg
... | ... | @@ -10,6 +10,8 @@ output = /dev/null |
10 | 10 | [data_sources] |
11 | 11 | # path to apt-xapian-index |
12 | 12 | axi = /var/lib/apt-xapian-index/index |
13 | +# DDE url | |
14 | +dde_url = http://dde.debian.net/dde/q/udd/packages/all/%s?t=json | |
13 | 15 | # old, reindex, cluster, recluster |
14 | 16 | index_mode = old |
15 | 17 | # path to popcon index | ... | ... |