diff --git a/src/README.md b/src/README.md index 0e8eb93..9e5fbcc 100644 --- a/src/README.md +++ b/src/README.md @@ -51,6 +51,7 @@ digraph Dependency { 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 diff --git a/src/html_categories.py b/src/html_categories.py index 6f2cb65..e48b6dc 100755 --- a/src/html_categories.py +++ b/src/html_categories.py @@ -11,18 +11,19 @@ def process(affected=None, per_page=60): arr = [] for fname, json in mylib.enum_categories(): cid, cname = json['meta'] - arr.append((cid, cname)) + arr.append([cid, cname]) if affected and cid not in affected: continue out_dir = mylib.path_add(base, cid) # full url since categories can have page 2, 3, etc. - A = '
Or go ahead to the Ranking directly.
'''.format(title, c_apps, c_domains, c_recordings, c_logs), title=title) mylib.symlink(index_rank.fname_app_rank(), mylib.path_out('results', 'rank.json')) # after HTML.write diff --git a/src/html_ranking.py b/src/html_ranking.py index da8f230..06ecdbe 100755 --- a/src/html_ranking.py +++ b/src/html_ranking.py @@ -33,7 +33,7 @@ def write_ranking_category(cid, category_name): src = html_base(('All Categories', '/category/'), (category_name, '/category/{}/'.format(cid))) src += HTML.p_download_json('data.json', - 'results-category-{}.json'.format(cid)) + 'raw-category-{}.json'.format(cid)) src += html_script_chunk('data.json') HTML.write(base, src, title='Category Ranking: ' + category_name) mylib.symlink(index_rank.fname_ranking_category(cid), @@ -41,8 +41,10 @@ def write_ranking_category(cid, category_name): def write_ranking_all(title, base_dir): - src = html_base(('Results', '/results/')) - src += HTML.p_download_json('data.json', 'results-all.json') + # full urls since app index can have page 2, 3, etc. + src = html_base(('Results', '/results/'), + ('Apps (A–Z)', '/index/apps/')) + src += HTML.p_download_json('data.json', 'raw-apps.json') src += html_script_chunk('data.json') HTML.write(base_dir, src, title=title) mylib.symlink(index_rank.fname_ranking_all(), @@ -51,7 +53,7 @@ def write_ranking_all(title, base_dir): def process(): print('generating html: ranking ...') - write_ranking_all('Ranking', mylib.path_out('ranking')) + write_ranking_all('Ranking', mylib.path_out('index', 'apps', 'ranking')) for _, json in mylib.enum_categories(): cid, name = json['meta'] write_ranking_category(cid, name) diff --git a/src/lib_html.py b/src/lib_html.py index 50bbe0d..d035c8b 100755 --- a/src/lib_html.py +++ b/src/lib_html.py @@ -23,6 +23,11 @@ def a_subdomain(x, inner=None, attr_str=''): return '{}'.format(attr_str, x, inner or x) +def h2_path_n_rank(title, path_parts, rank_href): + return 'Download: json
'.format( href, download_name) diff --git a/src/main.py b/src/main.py index 9641fac..9d74aea 100755 --- a/src/main.py +++ b/src/main.py @@ -36,12 +36,12 @@ 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_ranking.process() # after html_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() diff --git a/src/z_dependency.svg b/src/z_dependency.svg index 57131a4..4ae51db 100644 --- a/src/z_dependency.svg +++ b/src/z_dependency.svg @@ -38,12 +38,12 @@