| 1 | #!/usr/bin/env python3 |
| 2 | # -*- coding: utf-8 -*- |
| 3 | import glob |
| 4 | import sys |
| 5 | |
| 6 | from common import sort_items |
| 7 | |
| 8 | if len(sys.argv) < 2: |
| 9 | print("Sort the dictionary") |
| 10 | print(("Usage: ", sys.argv[0], "[directory]")) |
| 11 | exit(1) |
| 12 | |
| 13 | directory = sys.argv[1] |
| 14 | files = glob.glob(directory + "/*.txt") |
| 15 | for filename in files: |
| 16 | print(filename) |
| 17 | sort_items(filename, filename) |