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

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...

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

Giấy phép

MIT — xem LICENSE.

Metadata

Release files for vietlen 0.5.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.5.0
File Size Uploaded Provenance Actions
vietlen-0.5.0.tar.gz 10.2 kB Without provenance Details for vietlen-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 19.0 kB

Release files / vietlen-0.5.0.tar.gz

Download URL vietlen-0.5.0.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2211b6a0e1a10200ab91023441fcac35f7eb078a205fbd2c04c8963d8f94abd7
BLAKE2b-256 checksum
How to use checksums
132244c559c8769d9464dd85cb29de53f2cc8e3a406182a7faa3b3adefbb5923
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.5.0-py3-none-any.whl

Download URL vietlen-0.5.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8b87c7e6288e84083e379dfd64f14c99d20f9312b0808b9464bf8c6bcc90855e
BLAKE2b-256 checksum
How to use checksums
170b8ef643922a99dffb8bf0fb6c04dc9920400cbbe974887e6f2a1c52e994c4
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.5.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