Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
aae7ae3
create six-splited richmenu
4geru Jun 7, 2025
14f2118
add templates
4geru Jun 8, 2025
0f25ba1
create rich-menu folder
4geru Jun 8, 2025
6744607
separate the generateRichMenuImage function
4geru Jun 8, 2025
4f27622
add example images
4geru Jun 8, 2025
b281485
Merge remote-tracking branch 'origin/main' into 4geru/test-rich-menu
4geru Jun 8, 2025
d0229a4
refactor some
4geru Jun 8, 2025
6eb6d10
add h3 tag on templete 04
4geru Jun 8, 2025
417e9d7
change return messave
4geru Jun 8, 2025
34e8566
add create richmenu
4geru Jun 10, 2025
cb128ab
add create rich menu command
4geru Jun 10, 2025
3f81982
Merge remote-tracking branch 'origin/main' into 4geru/generate-rich-menu
4geru Jun 10, 2025
15bfb77
update the create rich menu
4geru Jun 10, 2025
3e3ae9e
change the image size
4geru Jun 10, 2025
1f2f63e
create the rich menu
4geru Jun 14, 2025
9a97695
refactor the code
4geru Jun 14, 2025
a1749ce
change the templetes
4geru Jun 14, 2025
0a39c3c
change TempleteNo and height
4geru Jun 14, 2025
b4f256b
change templete actions area
4geru Jun 14, 2025
fac005c
refactor the codes
4geru Jun 14, 2025
d709b29
use const variable
4geru Jun 14, 2025
760c059
rename the filename
4geru Jun 14, 2025
280a98c
add the areas and some
4geru Jun 14, 2025
73416bf
debug
4geru Jun 14, 2025
6237d7e
update the templetes
4geru Jun 14, 2025
28ba035
Merge branch 'main' into 4geru/generate-rich-menu
4geru Jun 15, 2025
63ffcc6
Merge remote-tracking branch 'fork/4geru/generate-rich-menu' into 4ge…
4geru Jun 15, 2025
36f68fd
self review
4geru Jun 15, 2025
9c6171c
fix the ci
4geru Jun 15, 2025
019ec7c
Merge remote-tracking branch 'origin/main' into 4geru/generate-rich-menu
4geru Jun 19, 2025
0b6bd3d
use puppeteer
4geru Jun 19, 2025
e266dec
reply successful message
4geru Jun 19, 2025
7d869ae
change the file name
4geru Sep 6, 2025
76e266d
change the templete to template
4geru Sep 6, 2025
fd89189
add fonts on docker
4geru Sep 6, 2025
3dc9472
update the tools argument
4geru Sep 6, 2025
2de1d99
add max and min argument
4geru Sep 6, 2025
9f1765a
update chatBarText message
4geru Sep 6, 2025
4a61be6
remove rich menu examples
4geru Sep 6, 2025
a3ee632
change the chatBatText description
4geru Sep 7, 2025
1c7ce01
change the font
4geru Sep 7, 2025
7fb6628
add the READMEs
4geru Sep 7, 2025
39214dd
Merge remote-tracking branch 'origin/main' into 4geru/generate-rich-menu
4geru Sep 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,33 @@ RUN --mount=type=cache,target=/root/.npm npm run build
# --- Release Stage ---
FROM node:22-alpine AS release

# Install necessary tools and base fonts
RUN apk add --no-cache \
fontconfig \
font-noto-cjk \
ttf-freefont \
curl \
unzip \
chromium \
nss

# Download and install Japanese fonts from GitHub
RUN mkdir -p /usr/share/fonts/truetype/google && \
# Noto Sans JP from GitHub
curl -L "https://github.com/googlefonts/noto-cjk/raw/main/Sans/OTF/Japanese/NotoSansJP-Regular.otf" -o /usr/share/fonts/truetype/google/NotoSansJP-Regular.otf && \
curl -L "https://github.com/googlefonts/noto-cjk/raw/main/Sans/OTF/Japanese/NotoSansJP-Bold.otf" -o /usr/share/fonts/truetype/google/NotoSansJP-Bold.otf && \
# IPAex Gothic font as fallback
curl -L "https://moji.or.jp/wp-content/ipafont/IPAexfont/IPAexfont00401.zip" -o ipaex.zip && \
unzip ipaex.zip && \
cp IPAexfont00401/*.ttf /usr/share/fonts/truetype/google/ && \
rm -rf IPAexfont00401 ipaex.zip

# Update font cache
RUN fc-cache -f -v

# Set Puppeteer to use system Chromium
ENV PUPPETEER_EXECUTABLE_PATH=/usr/bin/chromium-browser

# Set up a non-root user ('appuser'/'appgroup') to avoid running as root - good security practice!
# (-S is the Alpine option for a system user/group, suitable here)
RUN addgroup -S appgroup && adduser -S appuser -G appgroup
Expand All @@ -19,6 +46,7 @@ RUN addgroup -S appgroup && adduser -S appuser -G appgroup
COPY --from=builder /app/dist /app/dist
COPY --from=builder /app/package.json /app/package.json
COPY --from=builder /app/package-lock.json /app/package-lock.json
COPY --from=builder /app/richmenu-template /app/richmenu-template

ENV NODE_ENV=production

Expand Down
14 changes: 14 additions & 0 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,20 @@ LINE公式アカウントとAI Agentを接続するために、LINE Messaging AP
- デフォルトのリッチメニューを解除する。
- **入力:**
- なし
11. **create_rich_menu**
- 指定されたアクションに基づいてリッチメニューを作成。画像を生成してアップロード。デフォルトとして設定する。
- **入力:**
- `chatBarText` (string): チャットバー表示、リッチメニュー名にされるテキスト。
- `actions` (array): リッチメニューのアクション。最小1つから最大6つのアクションを指定できる。各アクションは以下のいずれかのタイプを指定できる:
- `postback`: ポストバックアクションを送信する
- `message`: テキストメッセージを送信する
- `uri`: URLを開く
- `datetimepicker`: 日付/時間選択ツールを開く
- `camera`: カメラを開く
- `cameraRoll`: カメラロールを開く
- `location`: 現在位置を送信する
- `richmenuswitch`: 別のリッチメニューに切り替える
- `clipboard`: テキストをクリップボードにコピーする

## インストール (npxを使用)

Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,20 @@
- Cancel the default rich menu.
- **Inputs:**
- None
11. **create_rich_menu**
- Create a rich menu based on the given actions. Generate and upload an image. Set as default.
- **Inputs:**
- `chatBarText` (string): Text displayed in chat bar, also used as rich menu name.
- `actions` (array): The actions of the rich menu. You can specify minimum 1 to maximum 6 actions. Each action can be one of the following types:
- `postback`: For sending a postback action
- `message`: For sending a text message
- `uri`: For opening a URL
- `datetimepicker`: For opening a date/time picker
- `camera`: For opening the camera
- `cameraRoll`: For opening the camera roll
- `location`: For sending the current location
- `richmenuswitch`: For switching to another rich menu
- `clipboard`: For copying text to clipboard

## Installation (Using npx)

Expand Down
Loading