diff --git a/README.md b/README.md index 15ddc4e..40412fc 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,23 @@ ```sh pip install -r requirements.txt ``` -- 安装用于模板元素生成的必要字体: +- 安装用于模板元素生成的必要字体(Windows): ```sh - .\install_fonts.bat + ./install_fonts.bat ``` ## 使用 +- 出口预告/直行标志 ```sh -python .\test\main.py -d filepath +python ./test/main.py -d filepath +``` +- 服务区预告标志 +```sh +python ./test/sa_pa.py -d filepath +``` +- 地点距离预告标志 +```sh +python ./test/distance.py -d filepath ``` ## 组件介绍 @@ -48,8 +57,9 @@ python .\test\main.py -d filepath |中英双语纯文本|8|`text`:字符串,中文文本内容,使用A型交通标志字体;`en`:字符串,英文文本内容,使用B型交通标志字体| ## 组件示例 + - 单语言纯文本 - ``` + ```json { "type": 0, "info": { @@ -60,7 +70,7 @@ python .\test\main.py -d filepath ![Alt text](./example/plain_text.png) - 国道 - ``` + ```json { "type": 1, "info": { @@ -71,7 +81,7 @@ python .\test\main.py -d filepath ![Alt text](./example/national_road.png) - 省道 - ``` + ```json { "type": 2, "info": { @@ -82,7 +92,7 @@ python .\test\main.py -d filepath ![Alt text](./example/prov_road.png) - 县道/乡道 - ``` + ```json { "type": 3, "info": { @@ -93,7 +103,7 @@ python .\test\main.py -d filepath ![Alt text](./example/township_road.png) - 国家高速 - ``` + ```json { "type": 4, "info": { @@ -105,7 +115,7 @@ python .\test\main.py -d filepath ![Alt text](./example/national_expressway.png) - 省级高速 - ``` + ```json { "type": 5, "info": { @@ -117,7 +127,7 @@ python .\test\main.py -d filepath ![Alt text](./example/prov_expressway.png) - 街道 - ``` + ```json { "type": 6, "info": { @@ -128,7 +138,7 @@ python .\test\main.py -d filepath ![Alt text](./example/street.png) - 旅游区 - ``` + ```json { "type": 7, "info": { @@ -139,7 +149,7 @@ python .\test\main.py -d filepath ![Alt text](./example/tourist.png) - 中英双语文本 - ``` + ```json { "type": 8, "info": { @@ -152,6 +162,7 @@ python .\test\main.py -d filepath ## 出口预告 + - 直行、出口JSON文件顶层结构 |字段|类型|含义|备注| @@ -168,7 +179,7 @@ python .\test\main.py -d filepath |`sub`|string|出口编号(字母部分)|| ![Alt text](./example/example.png) -``` +```json { "type": 1, "exit": { @@ -250,7 +261,9 @@ python .\test\main.py -d filepath ] } ``` + ## 服务区预告 + - JSON结构 |字段|类型|含义|备注| @@ -271,7 +284,7 @@ python .\test\main.py -d filepath ![Alt text](./example/sa_pa.png) -``` +```json { "icons": [1, 2, 3, 4], "name": { @@ -290,7 +303,8 @@ python .\test\main.py -d filepath 数组:元素为组件结构,并附加`distance`字段 ![Alt text](./example/distance.png) -``` + +```json [ { "type": 4,