Include categories in main update
This commit is contained in:
@@ -5,7 +5,7 @@ import lib_html as HTML
|
||||
import index_categories # enum_all_categories
|
||||
|
||||
|
||||
def process(per_page=60):
|
||||
def process(affected=None, per_page=60):
|
||||
print('generating html: category-index ...')
|
||||
base = mylib.path_out('category')
|
||||
parent = 'All Categories'
|
||||
@@ -13,11 +13,14 @@ def process(per_page=60):
|
||||
for cid, cat, apps in sorted(index_categories.enum_all_categories(),
|
||||
key=lambda x: x[1].lower()):
|
||||
arr.append((cid, cat))
|
||||
if affected and cid not in affected:
|
||||
continue
|
||||
pre = HTML.h2(HTML.a_path([(parent, '../')], cat))
|
||||
_, a = HTML.write_app_pages(mylib.path_add(base, cid), apps, cat,
|
||||
per_page, pre=pre)
|
||||
print(' {} ({})'.format(cat, a))
|
||||
|
||||
print(' .. {} categories'.format(len(arr)))
|
||||
src = ''.join([HTML.a(n, '{}/'.format(cid)) for cid, n in arr])
|
||||
HTML.write(base, '''
|
||||
<h2>{}</h2>
|
||||
|
||||
Reference in New Issue
Block a user