Skip to content

Commit

Permalink
doc: add charts
Browse files Browse the repository at this point in the history
  • Loading branch information
evan361425 committed Mar 25, 2024
1 parent a92190c commit 5685c9a
Show file tree
Hide file tree
Showing 21 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
.buildlog/
.history
.svn/
.venv

# IntelliJ related
*.iml
Expand Down
12 changes: 12 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
Pillow = "*"

[dev-packages]

[requires]
python_version = "3.12"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
- 設定顧客資訊
- 收銀機方便做每日結餘
- 訂單、菜單等資訊的匯出與備份
- 客製化折線圖、圓餅圖的分析

## 下載

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- 設定顧客資訊
- 收銀機方便做每日結餘
- 訂單、菜單等資訊的匯出與備份
- 客製化折線圖、圓餅圖的分析

## 下載

Expand Down
Binary file modified docs/images/index-introduction.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 5 additions & 6 deletions scripts/paint_introduce.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont

from PIL import Image, ImageDraw, ImageFont


def pp(file):
Expand All @@ -15,9 +14,9 @@ def pp(file):

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

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

0 comments on commit 5685c9a

Please sign in to comment.