# Python
AM_PATH_PYTHON([3.13])
+AX_PYTHON_MODULE([babel], [fatal])
AX_PYTHON_MODULE([httpx], [fatal])
AX_PYTHON_MODULE([rich], [fatal])
AX_PYTHON_MODULE([sqlmodel], [fatal])
###############################################################################
import argparse
+import babel.numbers
import dnsbl
import dnsbl.exporters
import logging
table.add_column(_("Slug"))
table.add_column(_("License"))
table.add_column(_("Last Updated"))
- table.add_column(_("Listed Unique Domains"))
+ table.add_column(_("Listed Unique Domains"), justify="right")
# Show all lists
for list in backend.lists:
list.slug,
list.license,
list.updated_at.isoformat() if list.updated_at else _("N/A"),
- "%s" % len(list),
+ babel.numbers.format_decimal(len(list)),
)
# Print the table
table.add_row(_("License"), list.license)
table.add_row(_("Created At"), list.created_at.isoformat())
table.add_row(_("Created By"), list.created_by)
- table.add_row(_("Listed Unique Domains"), "%s" % len(list))
+ table.add_row(_("Listed Unique Domains"), babel.numbers.format_decimal(len(list)))
# Print list properties
self.console.print(table)
table.add_column(_("URL"))
table.add_column(_("Created At"))
table.add_column(_("Created_By"))
- table.add_column(_("Listed Domains"))
+ table.add_column(_("Listed Domains"), justify="right")
for source in list.sources:
table.add_row(
source.url,
source.created_at.isoformat(),
source.created_by,
- "%s" % len(source),
+ babel.numbers.format_decimal(len(source)),
)
# Print the sources