Skip to main content

Ngôn ngữ: Tiếng Việt | English

Lệnh Việt (vietlen)

Bộ công cụ dòng lệnh mà đọc tên là hiểu nó làm gì — viết bằng Python, chỉ dùng thư viện chuẩn, không cần cài gì cả.

Dự án sinh ra từ một lời hứa trong issue #1 của glm-bot: làm công cụ cho người mới tập dùng máy tính, không bắt ai phải học tiếng Anh mới biết phím này để làm gì.

CI PyPI

Các lệnh

Lệnh Nó làm gì Ví dụ
dem Đếm dòng, từ, ký tự của file python vietlen.py dem ghi-chu.txt
tim Tìm file/thư mục theo tên python vietlen.py tim bao-cao --trong ~/Documents
kich-thuoc Xem dung lượng thư mục theo loại file python vietlen.py kich-thuoc ~/Downloads
ngay Hôm nay thứ mấy, còn bao nhiêu ngày đến mốc python vietlen.py ngay --den 2027-02-06
dem-ngay Đếm số ngày giữa hai mốc (mặc định mốc sau là hôm nay) python vietlen.py dem-ngay 2026-01-01 --den 2026-12-31
tim-dong In các dòng chứa từ khóa, kèm số dòng python vietlen.py tim-dong quan-trong ghi-chu.txt
so-sanh So sánh hai file theo nội dung (SHA-256) python vietlen.py so-sanh ban-goc.txt ban-sua.txt
luu Sao lưu file, tên kèm dấu thời gian python vietlen.py luu ghi-chu.txt --vao ~/sao-luu
don-dep Tìm rác trong thư mục (__pycache__, .DS_Store, *.pyc...), --xoa để dọn thật python vietlen.py don-dep ~/Projects --xoa
doi-ten Đổi tên hàng loạt theo cặp --cu/--moi, mặc định chỉ xem trước python vietlen.py doi-ten ~/Pictures --cu IMG --moi anh --thuc-su
doc-so Đọc số thành chữ: 123 -> "một trăm hai mươi ba" python vietlen.py doc-so 123 1.000.001

Ví dụ kết quả:

$ python vietlen.py ngay --den 2027-02-06
Còn 77 ngày nữa đến 06/02/2027

$ python vietlen.py so-sanh ban-goc.txt ban-sua.txt
KHÁC NHAU:
  ban-goc.txt: 8 B — sha256 1a2b3c4d5e6f...
  ban-sua.txt: 12 B — sha256 9f8e7d6c5b4a...

$ python vietlen.py doc-so 15 1.000.001
15 -> mười lăm
1.000.001 -> một triệu lẻ một

Cách dùng

Cần Python 3.9 trở lên (code chỉ dùng thư viện chuẩn, không có cú pháp mới). CI kiểm tra trên 3.11, 3.12, 3.13. Không cần cài thêm gì:

python vietlen.py <lệnh> <tham số>

Muốn chạy như một lệnh thật (Linux/macOS):

chmod +x vietlen.py
./vietlen.py ngay --den 2027-02-06

Cài thẳng từ PyPI (khuyên dùng, từ v0.4.0):

pip install vietlen
vietlen ngay --den 2027-02-06

Sau đó gõ vietlen là dùng được, không cần tải gì thêm.

Hoặc cài từ mã nguồn:

pip install .

Chạy test

python -m unittest discover -s tests -v

Người em họ nói tiếng Halis

Các lệnh của Lệnh Việt cũng có phiên bản viết bằng Halis tại halis-xin-chao/vietlen-halis — một cách góp file .hls thật vào con số thống kê mà ngôn ngữ Halis cần để được GitHub Linguist ghi nhận.

Lộ trình

  • v0.1.0 — 4 lệnh đầu tiên: dem, tim, kich-thuoc, ngay
  • v0.2.0 — thêm tim-dong, so-sanh, luu; CI chạy trên 3 phiên bản Python (3.9, 3.11, 3.12)
  • v0.3.0 — tài liệu song ngữ (README.en.md), đóng gói pyproject.toml — cài được bằng pip install .
  • v0.4.0 — thêm don-dep, doi-ten — nhà có đủ 9 lệnh
  • Đăng lên PyPI thật — vietlen 0.4.0 đã ở đó, pip install vietlen chạy ở mọi nơi
  • v0.5.0 — thêm dem-ngay — nhà có đủ 10 lệnh, 30 test
  • v0.6.0 — thêm doc-so (đọc số thành chữ, hiểu cả 1.000.001 lẫn 1,000,001) — nhà có đủ 11 lệnh, 42 test

Giấy phép

MIT — xem LICENSE.

Metadata

Release files for vietlen 0.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vietlen 0.6.0
File Size Uploaded Provenance Actions
vietlen-0.6.0.tar.gz 12.4 kB Without provenance Details for vietlen-0.6.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vietlen 0.6.0
File Interpreter ABI Platform Actions
vietlen-0.6.0-py3-none-any.whl Python 3 none any Details for vietlen-0.6.0-py3-none-any.whl

Total release size: 22.7 kB

Release files / vietlen-0.6.0.tar.gz

Download URL vietlen-0.6.0.tar.gz
Size 12.4 kB
Tags Source
SHA-256 checksum
How to use checksums
036a2acafc83fbb57360862a052c9116a64a83373eb798c4d7416f7c78e400c1
BLAKE2b-256 checksum
How to use checksums
7239db7b3cf1d863c023700eb0b76b153f91b84a0ae23793493de9b73eb0f876
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / vietlen-0.6.0-py3-none-any.whl

Download URL vietlen-0.6.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3673427a311b842bb7a3e6026435c856b58c92dcb65c7511fe36bbbf25ab39ab
BLAKE2b-256 checksum
How to use checksums
b0a510de28c02fc34b46a0a692c80d27cc66df68ef66832b5d16cef4bc6ec811
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for vietlen 0.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page