Download packages/simplecc-wasm/OpenCC/data/scripts/sort.py from echodict/readest: direct link, hf CLI and curl.
- Browser
- Download file 336 Bytes
-
https://huggingface.co/datasets/echodict/readest/resolve/main/packages/simplecc-wasm/OpenCC/data/scripts/sort.py
- Command line
-
hf download hf://datasets/echodict/readest/packages/simplecc-wasm/OpenCC/data/scripts/sort.py
-
curl -L -o sort.py https://huggingface.co/datasets/echodict/readest/resolve/main/packages/simplecc-wasm/OpenCC/data/scripts/sort.py
336 Bytes
| #!/usr/bin/env python3 | |
| # -*- coding: utf-8 -*- | |
| import sys | |
| from common import sort_items | |
| if len(sys.argv) < 2: | |
| print("Sort the dictionary") | |
| print(("Usage: ", sys.argv[0], "[input] ([output])")) | |
| exit(1) | |
| input = sys.argv[1] | |
| if len(sys.argv) < 3: | |
| output = input | |
| else: | |
| output = sys.argv[2] | |
| sort_items(input, output) | |