Skip to content

Commit

Permalink
Run ImageMagick to trim whitespace on board image after export.
Browse files Browse the repository at this point in the history
  • Loading branch information
huacnlee committed Oct 28, 2024
1 parent 9c7c907 commit 3a5e10c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
FROM node:latest

RUN apt install imagemagick
RUN yarn config set prefix /root/.yarn && \
yarn global add feishu-pages --prefix /usr/local
yarn global add feishu-pages --prefix /usr/local
ADD ./entrypoint.sh /entrypoint.sh

ENTRYPOINT ["/usr/local/bin/feishu-pages"]
ENTRYPOINT ["/entrypoint.sh"]
5 changes: 5 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
echo "Running feishu-pages..."
/usr/local/bin/feishu-pages $@
echo "Trimming whiteboard images to remove whitespace..."
echo "Dist $OUTPUT_DIR"
find $OUTPUT_DIR -name "*-board.png" -exec mogrify -trim {} +

0 comments on commit 3a5e10c

Please sign in to comment.