Skip to content

Commit a6ff220

Browse files
authored
Merge pull request #19 from chizmw/regenerate-png-examples-on-version-tag
Regenerate png examples on version tag
2 parents 36cb045 + 76b4376 commit a6ff220

File tree

8 files changed

+98
-3
lines changed

8 files changed

+98
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
kind: Added
2+
body: showcase full-on jinx rendering
3+
time: 2023-04-17T08:50:11.559488+01:00
4+
custom:
5+
GithubIssue: ""
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
name: Generate PNG Samples
3+
4+
# yamllint disable rule:truthy
5+
on:
6+
push:
7+
tags:
8+
- '*'
9+
workflow_dispatch:
10+
11+
jobs:
12+
generate-samples:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Setup Python
16+
uses: actions/setup-python@v4
17+
with:
18+
python-version: '3.11'
19+
20+
- name: Setup Poetry
21+
uses: abatilo/actions-poetry@v2
22+
with:
23+
poetry-version: 1.4.2
24+
25+
- name: Checkout
26+
uses: actions/checkout@v3
27+
28+
- name: Get JSON
29+
shell: bash
30+
run: |
31+
make grab-some-scripts
32+
33+
- name: Generate samples
34+
shell: bash
35+
env:
36+
BOTC_PDF2IMAGE: yes-please
37+
run: |
38+
sudo apt-get install -y poppler-utils
39+
make all-scripts
40+
41+
# and eventually we'll create a PR for this
42+
# but we need to make sure we don't end up in a loop
43+
# of generate -> new version -> generate -> new version ...
44+
45+
- name: Create Pull Request
46+
id: cpr
47+
uses: peter-evans/create-pull-request@v4
48+
with:
49+
title: Regenerate PNG sample images [auto-generated]
50+
# add some labels
51+
labels: automatic-pr, generate-pngs
52+
# this is the name of the branch created to hold the changes for the
53+
# PR
54+
branch: generate-pngs/${{ github.sha }}
55+
# just to be extra safe we specify that we want to merge into the
56+
# default branch
57+
base: ${{ github.event.repository.default_branch }}
58+
# no need to keep the branch around after the PR is merged
59+
delete-branch: true
60+
# ignore any (accidental?) changes outside of the user_access/ dir
61+
add-paths: |
62+
generated/
63+
# yamllint disable-line rule:line-length
64+
# https://docs.github.com/en/actions/using-workflows/triggering-a-workflow#triggering-a-workflow-from-a-workflow
65+
token: ${{ secrets.CHISEL_GITHUB_TOKEN }}
66+
67+
- name: Check outputs
68+
if: ${{ steps.cpr.outputs.pull-request-number }}
69+
# yamllint disable rule:line-length
70+
run: |
71+
echo "::notice::Pull Request Created - ${{ steps.cpr.outputs.pull-request-url }}"
72+
# yamllint enable rule:line-length

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ These are just meant to be samples for easy viewing. For best results _generate
7373

7474
This shows how the official "starter" script looks.
7575

76-
<details open><summary>Trouble Brewing - Player Sheet</summary>
76+
<details><summary>Trouble Brewing - Player Sheet</summary>
7777
<a href="generated/Trouble Brewing/Trouble Brewing-p1.png"><img src="generated/Trouble Brewing/Trouble Brewing-p1.png" width="100%"></a>
7878
</details>
7979

@@ -89,7 +89,7 @@ This shows how the official "starter" script looks.
8989

9090
This was the script that made me aspire to better custom generated scripts.
9191

92-
<details open><summary>No Roles Barred - Player Sheet</summary>
92+
<details><summary>No Roles Barred - Player Sheet</summary>
9393
<a href="generated/No Roles Barred/No Roles Barred-p1.png"><img src="generated/No Roles Barred/No Roles Barred-p1.png" width="100%"></a>
9494
</details>
9595

@@ -101,6 +101,24 @@ This was the script that made me aspire to better custom generated scripts.
101101
<a href="generated/No Roles Barred/No Roles Barred-p3.png"><img src="generated/No Roles Barred/No Roles Barred-p3.png" width="100%"></a>
102102
</details>
103103

104+
#### Let's Test Some Jinxes
105+
106+
This script was generated purely to have something to test our output with
107+
jinxes in a script. There are probably more than you'd really want, or have, in
108+
a legit custom script so don't panic if it's slightly weird in places...
109+
110+
<details><summary>Let's Test Some Jinxes - Player Sheet</summary>
111+
<a href="generated/Let's Test Some Jinxes/Let's Test Some Jinxes-p1.png"><img src="generated/Let's Test Some Jinxes/Let's Test Some Jinxes-p1.png" width="100%"></a>
112+
</details>
113+
114+
<details><summary>Let's Test Some Jinxes - First Night</summary>
115+
<a href="generated/Let's Test Some Jinxes/Let's Test Some Jinxes-p2.png"><img src="generated/Let's Test Some Jinxes/Let's Test Some Jinxes-p2.png" width="100%"></a>
116+
</details>
117+
118+
<details><summary>Let's Test Some Jinxes - Other Nights</summary>
119+
<a href="generated/Let's Test Some Jinxes/Let's Test Some Jinxes-p3.png"><img src="generated/Let's Test Some Jinxes/Let's Test Some Jinxes-p3.png" width="100%"></a>
120+
</details>
121+
104122
#### Reptiles!
105123

106124
This is a custom script that I've played, and it turns out this is a good test of "cramming things into one page" and using Top Sekrit data from the generated script.
520 KB
Loading
573 KB
Loading
652 KB
Loading
3.84 MB
Binary file not shown.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "botc-json2pdf"
3-
version = "0.0.13"
3+
version = "0.0.14a0"
44
description = ""
55
authors = ["Chisel <[email protected]>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)