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