casio_doc/fontcharacter/tools/listsets.py

27 lines
578 B
Python
Executable File

#!/usr/bin/env python3
""" Utility to list the available sets.
Mainly there for the Makefile to use it. """
import os
from argparse import ArgumentParser
from fontcharacter import Reference
# ---
# Main function.
# ---
if __name__ == '__main__':
# Parse the arguments.
ap = ArgumentParser(description="FONTCHARACTER reference sets lister")
ap.add_argument('--refpath', help='The reference path.', default=os.getcwd())
args = ap.parse_args()
# Obtain the reference.
ref = Reference(args.refpath, True)
# List the sets.
print('\n'.join(ref.list()))
# End of file.