Rename index_meta -> index_rank
This commit is contained in:
@@ -49,10 +49,10 @@ digraph Dependency {
|
||||
index_app_names -> html_index_apps
|
||||
index_app_names -> html_index_domains
|
||||
index_app_names -> html_categories
|
||||
index_meta -> html_index_domains
|
||||
index_rank -> html_index_domains
|
||||
"." -> bundle_combine
|
||||
bundle_combine -> index_meta
|
||||
index_meta -> html_bundle
|
||||
bundle_combine -> index_rank
|
||||
index_rank -> html_bundle
|
||||
bundle_combine -> index_domains
|
||||
index_domains -> html_index_domains
|
||||
"." -> download_tracker
|
||||
|
||||
@@ -5,7 +5,7 @@ import lib_graphs as Graph
|
||||
import lib_html as HTML
|
||||
import index_app_names # get_name
|
||||
import index_domains
|
||||
import index_meta # get_total_counts
|
||||
import index_rank # get_total_counts, fname_app_rank
|
||||
|
||||
|
||||
def dropdown_choose(button):
|
||||
@@ -108,7 +108,7 @@ def gen_lookup(html_dir, doms_dict, names_dict, title):
|
||||
|
||||
|
||||
def gen_results(c_apps, c_domains, title):
|
||||
[c_recordings, c_logs] = index_meta.get_total_counts()
|
||||
[c_recordings, c_logs] = index_rank.get_total_counts()
|
||||
print(' {} apps'.format(c_apps))
|
||||
print(' {} domains'.format(c_domains))
|
||||
print(' {} recordings'.format(c_recordings))
|
||||
@@ -123,7 +123,7 @@ def gen_results(c_apps, c_domains, title):
|
||||
<li>List of <a href="/index/domains/all/">Requested Domains</a></li>
|
||||
<li>List of <a href="/index/domains/tracker/">Trackers</a></li>
|
||||
</ul>'''.format(title, c_apps, c_domains, c_recordings, c_logs), title=title)
|
||||
mylib.symlink(index_meta.fname_app_rank(),
|
||||
mylib.symlink(index_rank.fname_app_rank(),
|
||||
mylib.path_out('results', 'rank.json')) # after HTML.write
|
||||
|
||||
|
||||
|
||||
10
src/main.py
10
src/main.py
@@ -14,7 +14,7 @@ import html_root
|
||||
import index_app_names
|
||||
import index_categories
|
||||
import index_domains
|
||||
import index_meta
|
||||
import index_rank
|
||||
|
||||
|
||||
def print_usage_and_exit():
|
||||
@@ -33,7 +33,7 @@ def print_usage_and_exit():
|
||||
def rebuild_html(bundle_ids=None, cat_ids=None, inclIApp=True, inclRoot=False):
|
||||
# all of these must happen after index_app_names
|
||||
if bundle_ids:
|
||||
html_bundle.process(bundle_ids) # after index_meta
|
||||
html_bundle.process(bundle_ids) # after index_rank
|
||||
html_categories.process(affected=cat_ids) # after index_categories
|
||||
html_index_domains.process() # after index_domains
|
||||
if inclIApp:
|
||||
@@ -46,7 +46,7 @@ def rebuild_html(bundle_ids=None, cat_ids=None, inclIApp=True, inclRoot=False):
|
||||
|
||||
def del_id(bundle_ids):
|
||||
def delete_from_all_indices(bundle_ids):
|
||||
index_meta.process(bundle_ids, deleteOnly=True)
|
||||
index_rank.process(bundle_ids, deleteOnly=True)
|
||||
index_domains.process(bundle_ids, deleteOnly=True)
|
||||
index_app_names.process(bundle_ids, deleteOnly=True)
|
||||
|
||||
@@ -73,7 +73,7 @@ def combine_and_update(bundle_ids):
|
||||
# 3. re-calculate combined.json
|
||||
bundle_combine.process(bundle_ids)
|
||||
# 4. re-build indices
|
||||
index_meta.process(bundle_ids) # after bundle_combine
|
||||
index_rank.process(bundle_ids) # after bundle_combine
|
||||
index_domains.process(bundle_ids) # after bundle_combine
|
||||
# 5. make all html files
|
||||
rebuild_html(bundle_ids, inclIApp=len(new_ids) > 0)
|
||||
@@ -130,7 +130,7 @@ try:
|
||||
if bundle_ids:
|
||||
rebuild_html(bundle_ids)
|
||||
elif cmd == 'index':
|
||||
index_meta.process(['*'])
|
||||
index_rank.process(['*'])
|
||||
index_domains.process(['*'])
|
||||
rebuild_html(inclRoot=True)
|
||||
elif cmd == 'run':
|
||||
|
||||
Reference in New Issue
Block a user