| Crates.io | base1000 |
| lib.rs | base1000 |
| version | 0.1.1 |
| created_at | 2025-03-26 21:54:07.171184+00 |
| updated_at | 2025-03-26 22:44:49.029535+00 |
| description | A a text encoder based on the "Thousand Character Classic" |
| homepage | |
| repository | https://github.com/real-LiHua/Base1000QianZiWenCodec |
| max_upload_size | |
| id | 1607199 |
| size | 48,682 |
Base1000 is a text encoder based on the "Thousand Character Classic", supporting encoding any text into a sequence of "Thousand Character Classic" characters and decoding it back to the original text.
Default enabled features (clap, encode, decode)
cargo build --release
clap: Enables command-line tool functionality. Enable it with the following command:
cargo build --release --features clap
pyo3: Enables building the Python extension module. Enable it with the following command:
cargo build --release --features pyo3
encode: Enables text encoding functionality. Enable it with the following command:
cargo build --release --features encode
decode: Enables text decoding functionality. Enable it with the following command:
cargo build --release --features decode
Enable multiple features simultaneously:
cargo build --release --features "clap pyo3 encode decode"
maturin build --release
base1000 -e "114514"
base1000 -d "夜裳移柰梧"
pip install .
from base1000 import base1000
# Encoding
encoded = base1000.encode("114514")
print(encoded)
# Decoding
decoded = base1000.decode(encoded)
print(decoded)
Run unit tests:
cargo test
src/lib.rs: Core library implementation.src/main.rs: Command-line tool entry point.base1000/__main__.py: Python CLI implementation.base1000/base1000.pyi: Python type hint file.