diff --git a/src/README.md b/src/README.md index 9e5fbcc..d7c706c 100644 --- a/src/README.md +++ b/src/README.md @@ -40,21 +40,21 @@ Given A → B, B depends on A ``` digraph Dependency { - "." -> html_root "." -> download_itunes "." -> bundle_combine download_itunes -> index_app_names + index_app_names -> index_categories + index_app_names -> index_rank + index_app_names -> html_index_domains + index_categories -> html_categories + index_categories -> html_index_apps bundle_combine -> index_rank bundle_combine -> index_domains - index_categories -> html_index_apps - index_app_names -> index_rank - index_app_names -> index_categories - index_categories -> html_categories - html_categories -> html_ranking - html_index_apps -> html_ranking index_rank -> html_bundle - index_rank -> html_index_domains index_domains -> html_index_domains + html_index_apps -> html_ranking + html_categories -> html_ranking + html_index_domains -> html_root "." -> download_tracker } ``` diff --git a/src/html_index_domains.py b/src/html_index_domains.py index a026d2d..1b7f37a 100755 --- a/src/html_index_domains.py +++ b/src/html_index_domains.py @@ -5,7 +5,6 @@ import lib_graphs as Graph import lib_html as HTML import index_app_names # get_name import index_domains -import index_rank # get_total_counts, fname_app_rank def dropdown_choose(button): @@ -111,27 +110,6 @@ def gen_lookup(html_dir, doms_dict, names_dict, title): mylib.json_write(mylib.path_add(html_dir, 'doms.json'), doms_dict) -def gen_results(c_apps, c_domains, title): - [c_recordings, c_logs] = index_rank.get_total_counts() - print(' {} apps'.format(c_apps)) - print(' {} domains'.format(c_domains)) - print(' {} recordings'.format(c_recordings)) - print(' {} logs'.format(c_logs)) - HTML.write(mylib.path_out('results'), ''' -
The AppCheck database currently contains {:,} apps with a total of {:,} unique domains.
-Collected through {:,} recordings with {:,} individual requests.
-Go back to start page
''', fname='404.html') + + def gen_help(): many = 7 txt = '''The AppCheck database currently contains {:,} apps with a total of {:,} unique domains.
+Collected through {:,} recordings with {:,} individual requests.
+Go back to start page
''', fname='404.html') - - -def process(): +def process(app_count, dom_count, inclStatic=False): print('generating root html ...') - print(' index.html') - gen_root() # root index.thml - print(' redirect.html') - gen_search() # root redirect.html?id=my.bundle.id - print(' 404.html') - gen_404() - print(' /help/') + if inclStatic: + print(' index.html') + gen_root() # root index.thml + print(' redirect.html') + gen_redirect() # root redirect.html?id=my.bundle.id + print(' 404.html') + gen_404() + print(' /help/') # dynamic content gen_help() + print(' /results/') # dynamic content + gen_results(mylib.path_out('results'), app_count, dom_count, + title='Results') print('') diff --git a/src/main.py b/src/main.py index d02c48d..9f35fad 100755 --- a/src/main.py +++ b/src/main.py @@ -36,14 +36,13 @@ def rebuild_html(bundle_ids=None, cat_ids=None, inclIApp=True, inclRoot=False): if bundle_ids: html_bundle.process(bundle_ids) # after index_rank html_categories.process(affected=cat_ids) # after index_categories - html_index_domains.process() # after index_domains & index_rank if inclIApp: html_index_apps.process() # after index_categories else: print('no new bundle, not rebuilding index') html_ranking.process() # after html_categories & html_index_apps - if inclRoot: # TODO: remove check if root contains dynamic content - html_root.process() + app_count, dom_count = html_index_domains.process() # after index_domains + html_root.process(app_count, dom_count, inclStatic=inclRoot) def del_id(bundle_ids): @@ -98,7 +97,6 @@ def import_update(): print('') if len(needs_update) > 0: combine_and_update(needs_update) - html_root.gen_help() if len(then_delete) > 0: print('cleanup _in folder ...') for x in then_delete: diff --git a/src/z_dependency.svg b/src/z_dependency.svg index 4ae51db..5a58206 100644 --- a/src/z_dependency.svg +++ b/src/z_dependency.svg @@ -1,156 +1,156 @@ -