doc
This commit is contained in:
44
README.md
44
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
|
||||

|
||||
|
||||
- 国道
|
||||
```
|
||||
```json
|
||||
{
|
||||
"type": 1,
|
||||
"info": {
|
||||
@@ -71,7 +81,7 @@ python .\test\main.py -d filepath
|
||||

|
||||
|
||||
- 省道
|
||||
```
|
||||
```json
|
||||
{
|
||||
"type": 2,
|
||||
"info": {
|
||||
@@ -82,7 +92,7 @@ python .\test\main.py -d filepath
|
||||

|
||||
|
||||
- 县道/乡道
|
||||
```
|
||||
```json
|
||||
{
|
||||
"type": 3,
|
||||
"info": {
|
||||
@@ -93,7 +103,7 @@ python .\test\main.py -d filepath
|
||||

|
||||
|
||||
- 国家高速
|
||||
```
|
||||
```json
|
||||
{
|
||||
"type": 4,
|
||||
"info": {
|
||||
@@ -105,7 +115,7 @@ python .\test\main.py -d filepath
|
||||

|
||||
|
||||
- 省级高速
|
||||
```
|
||||
```json
|
||||
{
|
||||
"type": 5,
|
||||
"info": {
|
||||
@@ -117,7 +127,7 @@ python .\test\main.py -d filepath
|
||||

|
||||
|
||||
- 街道
|
||||
```
|
||||
```json
|
||||
{
|
||||
"type": 6,
|
||||
"info": {
|
||||
@@ -128,7 +138,7 @@ python .\test\main.py -d filepath
|
||||

|
||||
|
||||
- 旅游区
|
||||
```
|
||||
```json
|
||||
{
|
||||
"type": 7,
|
||||
"info": {
|
||||
@@ -139,7 +149,7 @@ python .\test\main.py -d filepath
|
||||

|
||||
|
||||
- 中英双语文本
|
||||
```
|
||||
```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|出口编号(字母部分)||
|
||||
|
||||

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

|
||||
|
||||
```
|
||||
```json
|
||||
{
|
||||
"icons": [1, 2, 3, 4],
|
||||
"name": {
|
||||
@@ -290,7 +303,8 @@ python .\test\main.py -d filepath
|
||||
数组:元素为组件结构,并附加`distance`字段
|
||||
|
||||

|
||||
```
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"type": 4,
|
||||
|
||||
Reference in New Issue
Block a user