INNER CODE UNIT · Python
fng_pct
rfc-st/humble · humble.py:414
fng_pct = round(term_cnt / len(fng_incl) * 100, 2)
print(f"{get_detail('[fng_add]', replace=True)} '{fng_term}': {fng_pct}%\
({term_cnt}{get_detail('[pdf_footer2]', replace=True)} {len(fng_incl)})")
fng_statistics_term_sorted(fng_incl, fng_term.lower(), fng_groups)
def fng_statistics_term_sorted(fng_incl, fng_term, fng_groups):
"""Print the service associated with the term provided.
In alphabetical order and terminate execution; related to `-f` option.
"""
for content in fng_groups:
print(f"\n [{STYLE[0]}{content}]")
content_lower = content.lower()
for line in fng_incl:
line_lower = line.lower()
if content_lower in line_lower and fng_term in line_lower:
print(f" {line[:line.find('(')].strip()}")