Skip to content

Commit 4289f84

Browse files
authored
Initial commit
0 parents  commit 4289f84

File tree

130 files changed

+11816
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

130 files changed

+11816
-0
lines changed

.devcontainer/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM ghcr.io/huideyeren/vivliostyle-review-docker:latest
2+
3+
RUN pnpm install
4+
RUN bundle install

.devcontainer/devcontainer.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2+
// https://github.com/microsoft/vscode-dev-containers/tree/v0.191.0/containers/debian
3+
{
4+
"name": "Re:VIEW",
5+
"build": {
6+
"dockerfile": "Dockerfile",
7+
},
8+
9+
// Set *default* container specific settings.json values on container create.
10+
"settings": {
11+
"editor.renderWhitespace": "all",
12+
"editor.renderControlCharacters": true,
13+
"git.suggestSmartCommit": true,
14+
"textlint.languages": [
15+
"review"
16+
]
17+
},
18+
19+
// Add the IDs of extensions you want installed when the container is created.
20+
"extensions": [
21+
"atsushieno.language-review",
22+
"taichi.vscode-textlint",
23+
"8amjp.charactercount",
24+
"mhutchie.git-graph",
25+
"donjayamanne.githistory",
26+
"felipecaputo.git-project-manager",
27+
"github.vscode-pull-request-github",
28+
"eamodio.gitlens",
29+
"ms-ceintl.vscode-language-pack-ja",
30+
"yzhang.markdown-all-in-one",
31+
"bierner.markdown-mermaid",
32+
"darkriszty.markdown-table-prettify",
33+
"bpruitt-goddard.mermaid-markdown-syntax-highlighting",
34+
"yzane.markdown-pdf",
35+
"christian-kohler.path-intellisense",
36+
"cssho.vscode-svgviewer",
37+
"takanotume24.pdf",
38+
"kisstkondoros.vscode-gutter-preview"
39+
],
40+
41+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
42+
// "forwardPorts": [],
43+
44+
// Uncomment to use the Docker CLI from inside the container. See https://aka.ms/vscode-remote/samples/docker-from-docker.
45+
// "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ],
46+
47+
// Uncomment when using a ptrace-based debugger like C++, Go, and Rust
48+
// "runArgs": [ "--cap-add=SYS_PTRACE", "--security-opt", "seccomp=unconfined" ],
49+
50+
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
51+
// "remoteUser": "vscode"
52+
}

.github/workflows/jobs.yml

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: Build books.
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches:
10+
- main
11+
pull_request:
12+
branches:
13+
- main
14+
15+
# Allows you to run this workflow manually from the Actions tab
16+
workflow_dispatch:
17+
18+
env:
19+
SIZE: a6 # 対応はa4, a5, a6, b5, shinsho
20+
# tateが縦組み、yokoが横組み
21+
# config.ymlのdirectionの設定変更も忘れずに。
22+
MUKI: tate
23+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
24+
jobs:
25+
# reviewdog-github-check:
26+
# name: reviewdogによる簡易校正
27+
# runs-on: ubuntu-latest
28+
# steps:
29+
# #reviewdogのアクション
30+
# - uses: reviewdog/action-setup@v1
31+
# with:
32+
# reviewdog_version: latest
33+
34+
# #textlintを動かすためのnodeアクション
35+
# - uses: actions/setup-node@v4
36+
37+
# - name: リポジトリのチェックアウト
38+
# uses: actions/checkout@v3
39+
# with:
40+
# submodules: recursive
41+
42+
# - name: cache-node-modules
43+
# #stepsが失敗(文章の乱れ)した場合でもcacheを取得するようにする
44+
# uses: pat-s/always-upload-cache@v2.1.3
45+
# env:
46+
# cache-name: cache-node-modules
47+
# with:
48+
# path: ~/.npm
49+
# key: node-${{ hashFiles('**/package-lock.json') }}
50+
# restore-keys: |
51+
# node-
52+
53+
# - name: Install textlint
54+
# run: 'npm install --save-dev textlint textlint-rule-preset-smarthr textlint-rule-prh textlint-plugin-review'
55+
56+
# - name: Install dependent module
57+
# run: npm install
58+
59+
# - name: Execute textlint
60+
# env:
61+
# REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
62+
# run: |
63+
# npx textlint -f checkstyle chapter/*.re wiki/*.md README.md \
64+
# | reviewdog -f=checkstyle -name="textlint" -diff="git diff ${{ github.event.pull_request.base.ref }}" -reporter=github-pr-review -level="error"
65+
66+
epub:
67+
# needs: reviewdog-github-check
68+
name: EPUB版組
69+
runs-on: ubuntu-latest
70+
container:
71+
image: ghcr.io/huideyeren/vivliostyle-review-docker:latest
72+
steps:
73+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
74+
- name: リポジトリのチェックアウト
75+
uses: actions/checkout@v4
76+
- name: 現在時刻を取得
77+
env:
78+
TZ: "Asia/Tokyo" # タイムゾーンを指定
79+
id: date
80+
run: echo "::set-output name=date::$(date +'%Y-%m-%d_%H%M')"
81+
# '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。
82+
- name: 現在時刻を確認
83+
run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42
84+
- name: Node.jsのパッケージをインストール
85+
run: pnpm install
86+
- name: SCSSのコンパイル
87+
run: pnpm run style:${{ env.SIZE }}-${{ env.MUKI }}-no-bleed
88+
- name: Rubyのパッケージをインストール
89+
run: bundle install
90+
- name: MermaidのPNG化
91+
run: ./mmdtopng.sh images
92+
- name: EPUBの生成
93+
run: REVIEW_CONFIG_FILE=config-epub-${{ env.MUKI }}.yml bundle exec rake epub
94+
- name: 成果物のアップロード
95+
uses: actions/upload-artifact@v4
96+
with:
97+
name: ${{ format('inokashira-template_{0}_{1}_{2}', 'epub', env.MUKI, steps.date.outputs.date) }}
98+
path: book.epub
99+
100+
print-pdf:
101+
# needs: reviewdog-github-check
102+
name: 塗り足しのある印刷用PDF
103+
runs-on: ubuntu-latest
104+
container:
105+
image: ghcr.io/huideyeren/vivliostyle-review-docker:latest
106+
steps:
107+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
108+
- name: リポジトリのチェックアウト
109+
uses: actions/checkout@v4
110+
- name: 現在時刻を取得
111+
env:
112+
TZ: "Asia/Tokyo" # タイムゾーンを指定
113+
id: date
114+
run: echo "::set-output name=date::$(date +'%Y-%m-%d_%H%M')"
115+
# '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。
116+
- name: 現在時刻を確認
117+
run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42
118+
- name: Node.jsのパッケージをインストール
119+
run: pnpm install
120+
- name: SCSSのコンパイル
121+
run: pnpm run style:${{ env.SIZE }}-tate
122+
- name: Rubyのパッケージをインストール
123+
run: bundle install
124+
# - name: Pythonのセットアップ
125+
# uses: actions/setup-python@v5
126+
# with:
127+
# python-version: '3.12'
128+
# - name: 画像の白黒化
129+
# run: |
130+
# python -m pip install --upgrade pip
131+
# python -m pip install anshitsu
132+
# pwd | python grayscaling.py >> .grayscaling.log
133+
# - name: 画像白黒化のログ確認
134+
# run: cat .grayscaling.log
135+
- name: MermaidのPNG化
136+
run: ./mmdtopng.sh images
137+
- name: PDFの生成
138+
run: REVIEW_CONFIG_FILE=config-print-tate.yml REVIEW_VSCLI_USESANDBOX=true REVIEW_VSCLI_GRAYSCALE=true bundle exec rake vivliostyle
139+
- name: 成果物のアップロード
140+
uses: actions/upload-artifact@v4
141+
with:
142+
name: ${{ format('inokashira-template_{0}_{1}_{2}', 'print-pdf', env.MUKI, steps.date.outputs.date) }}
143+
path: book.pdf
144+
145+
print-pdf-no-bleed:
146+
# needs: reviewdog-github-check
147+
name: 塗り足しのない印刷用PDF
148+
runs-on: ubuntu-latest
149+
container:
150+
image: ghcr.io/huideyeren/vivliostyle-review-docker:latest
151+
steps:
152+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
153+
- name: リポジトリのチェックアウト
154+
uses: actions/checkout@v4
155+
- name: 現在時刻を取得
156+
env:
157+
TZ: "Asia/Tokyo" # タイムゾーンを指定
158+
id: date
159+
run: echo "::set-output name=date::$(date +'%Y-%m-%d_%H%M')"
160+
# '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。
161+
- name: 現在時刻を確認
162+
run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42
163+
- name: Node.jsのパッケージをインストール
164+
run: pnpm install
165+
- name: SCSSのコンパイル
166+
run: pnpm run style:${{ env.SIZE }}-${{ env.MUKI }}-no-bleed
167+
- name: Rubyのパッケージをインストール
168+
run: bundle install
169+
# - name: Pythonのセットアップ
170+
# uses: actions/setup-python@v5
171+
# with:
172+
# python-version: '3.12'
173+
# - name: 画像の白黒化
174+
# run: |
175+
# python -m pip install --upgrade pip
176+
# python -m pip install anshitsu
177+
# pwd | python grayscaling.py >> .grayscaling.log
178+
# - name: 画像白黒化のログ確認
179+
# run: cat .grayscaling.log
180+
- name: MermaidのPNG化
181+
run: ./mmdtopng.sh images
182+
- name: PDFの生成
183+
run: REVIEW_CONFIG_FILE=config-print-${{ env.MUKI }}.yml EVIEW_VSCLI_USESANDBOX=true REVIEW_VSCLI_GRAYSCALE=true bundle exec rake vivliostyle
184+
- name: 成果物のアップロード
185+
uses: actions/upload-artifact@v4
186+
with:
187+
name: ${{ format('inokashira-template_{0}_{1}', 'print-pdf-no-bleed', env.MUKI, steps.date.outputs.date) }}
188+
path: book.pdf
189+
190+
ebook-pdf:
191+
# needs: reviewdog-github-check
192+
name: 電子書籍用PDF
193+
runs-on: ubuntu-latest
194+
container:
195+
image: ghcr.io/huideyeren/vivliostyle-review-docker:latest
196+
steps:
197+
- name: リポジトリのチェックアウト
198+
uses: actions/checkout@v4
199+
- name: 現在時刻を取得
200+
env:
201+
TZ: "Asia/Tokyo" # タイムゾーンを指定
202+
id: date
203+
run: echo "::set-output name=date::$(date +'%Y-%m-%d_%H%M')"
204+
# '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。
205+
- name: 現在時刻を確認
206+
run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42
207+
- name: Node.jsのパッケージをインストール
208+
run: pnpm install
209+
- name: SCSSのコンパイル
210+
run: pnpm run style:${{ env.SIZE }}-${{ env.MUKI }}-no-bleed
211+
- name: Rubyのパッケージをインストール
212+
run: bundle install
213+
- name: MermaidのPNG化
214+
run: ./mmdtopng.sh images
215+
- name: PDFの生成
216+
run: REVIEW_CONFIG_FILE=config-ebook-${{ env.MUKI }}.yml REVIEW_VSCLI_USESANDBOX=true bundle exec rake vivliostyle
217+
- name: 成果物のアップロード
218+
uses: actions/upload-artifact@v4
219+
with:
220+
name: ${{ format('inokashira-template_{0}_{1}_{2}', 'ebook-pdf', env.MUKI, steps.date.outputs.date) }}
221+
path: book.pdf
222+
223+
# paper:
224+
# # 校正ツールによるチェックが通らないとダメにするにはチェックを外す
225+
# # needs: reviewdog-github-check
226+
# name: 旧LaTeX版PDF
227+
# runs-on: ubuntu-latest
228+
# container:
229+
# image: ghcr.io/huideyeren/review-docker:latest
230+
# steps:
231+
# - name: リポジトリのチェックアウト
232+
# uses: actions/checkout@v4
233+
# - name: 現在時刻の取得
234+
# env:
235+
# TZ: "Asia/Tokyo" # タイムゾーンを指定
236+
# id: date
237+
# run: echo "::set-output name=date::$(date +'%Y-%m-%d_%H%M')"
238+
# # '%Y-%m-%d %H:%M'の部分を書き換えれば、任意の表示に変更できる。
239+
# - name: 現在時刻を確認
240+
# run: echo ${{ steps.date.outputs.date }} # 2022-01-03 10:42
241+
# - name: Rubyのパッケージをインストール
242+
# run: bundle install
243+
# - name: Node.jsのパッケージをインストール
244+
# run: npm install
245+
# - name: Playwrightのインストール
246+
# run: ./node_modules/.bin/playwright install
247+
# - name: pdfcropコマンドを使えるようにする
248+
# run: apt install texlive-extra-utils
249+
# - name: PlantUMLのコピー
250+
# run: cp /java/plantuml.jar .
251+
# - name: ツールのチェック
252+
# run: dot -V && blockdiag --version && java -jar plantuml.jar -version
253+
# - name: PlantUMLを図に変換する
254+
# run: pwd | bash ./plantuml.sh >> .plantuml.log
255+
# - name: PlantUMLの変換ログを確認する
256+
# run: cat .plantuml.log
257+
# - name: SVGをPDFに変換する
258+
# run: pwd | python3 svg.py >> .svg.log
259+
# - name: SVGをPDFに変換したときのログを確認する
260+
# run: cat .svg.log
261+
# - name: MermaidのPNG化
262+
# run: ./mmdtopng.sh images/*.mermaid
263+
# - name: 画像の白黒化
264+
# run: pwd | python3 grayscaling.py >> .grayscaling.log
265+
# - name: 画像白黒化のログ確認
266+
# run: cat .grayscaling.log
267+
# - name: PDFの生成
268+
# run: REVIEW_CONFIG_FILE=config-print-pdf.yml bundle exec rake pdf
269+
# - name: 成果物のアップロード
270+
# uses: actions/upload-artifact@v4
271+
# with:
272+
# name: ${{ format('inokashira-template_{0}_{1}_{2}', 'print-pdf', env.MUKI, steps.date.outputs.date) }}
273+
# path: book.pdf
274+

0 commit comments

Comments
 (0)