Skip to content
This repository has been archived by the owner on Jan 18, 2025. It is now read-only.

Commit

Permalink
docs: update docs better mkdocs
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinNitroG committed Jan 16, 2025
1 parent 8c19fb8 commit 97ff1a8
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 32 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/schedule-run.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
name: Schedule Run

# user-config start
on:
# schedule:
# - cron: 0 0 * * 0
workflow_dispatch:
# user-config end

jobs:
run:
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/apis/checkphatnguoi_vn.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# checkphatnguoi.vn

```http
--8<-- "requests/checkphatnguoi_vn.http"
--8<-- "dev/requests/checkphatnguoi_vn.http"
```

## Curl
Expand Down
2 changes: 1 addition & 1 deletion docs/dev/apis/csgt_vn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# csgt.vn

```http
--8<-- "requests/csgt_vn.http"
--8<-- "dev/requests/csgt_vn.http"
```
2 changes: 1 addition & 1 deletion docs/dev/apis/phatnguoi_vn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# phatnguoi.vn

```http
--8<-- "requests/phatnguoi_vn.http"
--8<-- "dev/requests/phatnguoi_vn.http"
```
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Check phạt nguội
# Check Phạt Nguội

Tool kiểm tra phạt nguội cho phương tiện giao thông của bạn từ nhiều api khác nhau. Hỗ trợ notify đến các nền tảng Telegram, Discord...
Tool kiểm tra phạt nguội cho phương tiện giao thông của bạn từ nhiều API khác nhau, thông báo đến các nền tảng Telegram, Discord...
27 changes: 14 additions & 13 deletions docs/usage/advanced/schedule-run.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,26 @@

## Github Action

<!--TODO: ref to ./../.github/workflows/schedule-run.yml-->

- Fork repo này
- Kích hoạt Github Action trong cài đặt của repo

<!--FIXME: This cannot included
- Kích hoạt Github Action của repo
- Bỏ comment 2 dòng sau

```yml title=".github/workflows/schedule-run.yml"
{ %
include = "../../.github/workflows/schedule-run.yml"
start = "# user-config start"
end = "# user-config end"
% }
```yaml title=".github/workflows/schedule-run.yml" hl_lines="4 5"
--8<-- ".github/workflows/schedule-run.yml:1:7"
```
-->

???+ note "Tùy chỉnh thời gian schedule"

- <https://crontab.guru>
- <https://savvytime.com/converter/utc-to-vietnam-ho-chi-minh-city>

---

## Windows

- Dùng Task Scheduler
- Task Scheduler

---

## Linux

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/from-source/pip.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pip install -r requirements/requirements.txt

## Chạy chương trình

!!! important ""
!!! important

Yêu cầu kích hoạt venv

Expand Down
2 changes: 1 addition & 1 deletion docs/usage/from-source/uv-just.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Yêu cầu

!!! info ""
!!! info

Giống uv

Expand Down
12 changes: 6 additions & 6 deletions docs/usage/index.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Hướng dẫn sử dụng

## Yêu cầu
## Yêu cầu chung

- [Tesseact OCR CLI](https://tesseract-ocr.github.io/tessdoc/Installation.html)[Tesseact data set](https://github.com/tesseract-ocr/tessdata) _(Không bắt buộc)_(1)
- [Tesseract OCR CLI](https://tesseract-ocr.github.io/tessdoc/Installation.html)[Tesseract data set](https://github.com/tesseract-ocr/tessdata) _(Không bắt buộc)_(1)
{ .annotate }

1. Sử dụng để giải captcha đối với API csgt.vn
1. Sử dụng để giải captcha đối với API `csgt.vn`

!!! warning

Expand All @@ -16,15 +16,15 @@

## Thiết lập file config

!!! note ""
!!! note

Thiết lập file config trước khi chạy chương trình. Xem tại [thiết lập file config](./setup-config.md).
Thiết lập file config trước khi chạy chương trình

---

## Cài đặt

- [Từ mã nguồn](./from-source/index.md)
- Từ mã nguồn

!!! info

Expand Down
5 changes: 4 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,10 @@ markdown_extensions:
line_spans: true
pygments_lang_class: true
- pymdownx.inlinehilite
- pymdownx.snippets
- pymdownx.snippets:
base_path:
- docs/
- .
- pymdownx.superfences
- admonition
- pymdownx.details
Expand Down
11 changes: 8 additions & 3 deletions src/check_phat_nguoi/types/vehicle_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,16 @@ def get_vehicle_enum(type: VehicleTypeEnum | VehicleType | Any) -> VehicleTypeEn
if isinstance(type, VehicleTypeEnum):
return type
match type:
case "car" | "Ô tô" | 1:
case "car" | "Ô tô" | 1 | VehicleTypeEnum.car:
return VehicleTypeEnum.car
case "motorbike" | "Xe máy" | 2:
case "motorbike" | "Xe máy" | 2 | VehicleTypeEnum.motorbike:
return VehicleTypeEnum.motorbike
case "electric_motorbike" | "Xe máy điện" | 3:
case (
"electric_motorbike"
| "Xe máy điện"
| 3
| VehicleTypeEnum.electric_motorbike
):
return VehicleTypeEnum.electric_motorbike
case _:
raise ValueError("Unknown vehicle type")
Expand Down

0 comments on commit 97ff1a8

Please sign in to comment.