Skip to content

Commit 5685c9a

Browse files
committed
doc: add charts
1 parent a92190c commit 5685c9a

21 files changed

+20
-6
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
.buildlog/
99
.history
1010
.svn/
11+
.venv
1112

1213
# IntelliJ related
1314
*.iml

Pipfile

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
Pillow = "*"
8+
9+
[dev-packages]
10+
11+
[requires]
12+
python_version = "3.12"

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- 設定顧客資訊
2121
- 收銀機方便做每日結餘
2222
- 訂單、菜單等資訊的匯出與備份
23+
- 客製化折線圖、圓餅圖的分析
2324

2425
## 下載
2526

Loading
Loading
Loading
Binary file not shown.
Loading
Loading
Binary file not shown.
Loading
Binary file not shown.
Loading
Binary file not shown.
Loading

docs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
- 設定顧客資訊
1111
- 收銀機方便做每日結餘
1212
- 訂單、菜單等資訊的匯出與備份
13+
- 客製化折線圖、圓餅圖的分析
1314

1415
## 下載
1516

docs/images/index-introduction.png

557 KB
Loading

scripts/paint_introduce.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import os
2-
from PIL import Image
3-
from PIL import ImageDraw
4-
from PIL import ImageFont
2+
3+
from PIL import Image, ImageDraw, ImageFont
54

65

76
def pp(file):
@@ -15,9 +14,9 @@ def pp(file):
1514

1615
images = [
1716
Image.open("%s/%s" % (folder, x))
18-
for x in ["2_menu_product.png", "3_order.png", "5_stock.png"]
17+
for x in ["1_analysis_chart.png", "4_order_action.png", "7_stock.png"]
1918
]
20-
textList = ["設定產品", "點餐", "庫存系統"]
19+
textList = ["分析訂單", "點餐", "庫存系統"]
2120
widths, heights = zip(*(i.size for i in images))
2221

2322
# with space between images and around
@@ -36,7 +35,7 @@ def pp(file):
3635
font = ImageFont.truetype(pp("Tra-Chi.ttf"), 50)
3736
x_offset = space // 2
3837
for text, im in zip(textList, images):
39-
w, h = draw.textsize(text, font=font)
38+
x, y, w, h = draw.textbbox(xy=(0, 0), text=text, font=font)
4039
draw.text(
4140
(x_offset + im.size[0] // 2 - w // 2, im.size[1] + 10),
4241
text,

0 commit comments

Comments
 (0)