From fd76fd29198d6ba5aa3842da06a16d25c3f64d8a Mon Sep 17 00:00:00 2001 From: Chisel Date: Fri, 14 Apr 2023 14:08:12 +0100 Subject: [PATCH 1/6] fix placement of footer info on first page --- .changes/unreleased/Added-20230414-140901.yaml | 5 +++++ templates/style.css | 17 +++++++++-------- 2 files changed, 14 insertions(+), 8 deletions(-) create mode 100644 .changes/unreleased/Added-20230414-140901.yaml diff --git a/.changes/unreleased/Added-20230414-140901.yaml b/.changes/unreleased/Added-20230414-140901.yaml new file mode 100644 index 00000000..4127bdd7 --- /dev/null +++ b/.changes/unreleased/Added-20230414-140901.yaml @@ -0,0 +1,5 @@ +kind: Added +body: fix placement of footer info on first page +time: 2023-04-14T14:09:01.9167+01:00 +custom: + GithubIssue: "" diff --git a/templates/style.css b/templates/style.css index 14375389..c0f630cc 100644 --- a/templates/style.css +++ b/templates/style.css @@ -176,13 +176,6 @@ div.not-first-night { bottom: 5%; transform: translateX(-50%); } -div.not-affiliated { - position: absolute; - right: 0%; - bottom: 1%; - font-family: botc-light, sans-serif; - font-size: 7px; -} header { display: flex; @@ -208,15 +201,23 @@ footer { display: flex; justify-content: space-between; align-items: flex-start; - background-color: none; color: black; font-family: botc-light, sans-serif; + background-color: none; + + position: fixed; /* Add this line */ + bottom: 15px; /* Add this line */ + left: 0; + right: 0; + padding: 0 10px; /* Add this line for some padding */ } footer .footer-left { + left: 0%; font-size: 8px; } footer .footer-right { + right: 0%; font-size: 8px; } From 7ff62f5b24ffcd008dddf03a8925455d326863f4 Mon Sep 17 00:00:00 2001 From: Chisel Date: Fri, 14 Apr 2023 14:13:24 +0100 Subject: [PATCH 2/6] ensure 'make process' depends on 'install-dev' .. this seems to fix a problem with the wrong version number showing sometimes in the page footer --- .changes/unreleased/Fixed-20230414-141605.yaml | 5 +++++ Makefile | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changes/unreleased/Fixed-20230414-141605.yaml diff --git a/.changes/unreleased/Fixed-20230414-141605.yaml b/.changes/unreleased/Fixed-20230414-141605.yaml new file mode 100644 index 00000000..941bb6af --- /dev/null +++ b/.changes/unreleased/Fixed-20230414-141605.yaml @@ -0,0 +1,5 @@ +kind: Fixed +body: add make dep of 'install-dev' for 'process' +time: 2023-04-14T14:16:05.170844+01:00 +custom: + GithubIssue: "" diff --git a/Makefile b/Makefile index edcb00f8..5dd0446e 100644 --- a/Makefile +++ b/Makefile @@ -6,7 +6,7 @@ INPUT_FILE= all: examples -process: +process: install-dev @basename="$(shell basename "$(INPUT_FILE)" .json)" && \ poetry run python3 -m botcpdf.main "$(INPUT_FILE)" From 2c35234a53b895f0f471be7676bbe2e76838ffcb Mon Sep 17 00:00:00 2001 From: Chisel Date: Fri, 14 Apr 2023 14:19:34 +0100 Subject: [PATCH 3/6] ignore .changes/unreleased/ files with yamllint --- .changes/unreleased/Changed-20230414-141841.yaml | 5 +++++ .pre-commit-config.yaml | 1 + 2 files changed, 6 insertions(+) create mode 100644 .changes/unreleased/Changed-20230414-141841.yaml diff --git a/.changes/unreleased/Changed-20230414-141841.yaml b/.changes/unreleased/Changed-20230414-141841.yaml new file mode 100644 index 00000000..79dcbaec --- /dev/null +++ b/.changes/unreleased/Changed-20230414-141841.yaml @@ -0,0 +1,5 @@ +kind: Changed +body: ignore .changes/unreleased/ files with yamllint +time: 2023-04-14T14:18:41.248879+01:00 +custom: + GithubIssue: "" diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9dc64140..5f5a3eef 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,6 +60,7 @@ repos: hooks: - id: yamllint args: [--format, parsable, --strict] + exclude: ^.changes/unreleased - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.9.0.2 From 2a4ef7a0e15f0aca8c747dc393bcfa0c77ba5182 Mon Sep 17 00:00:00 2001 From: Chisel Date: Fri, 14 Apr 2023 15:20:17 +0100 Subject: [PATCH 4/6] whitespace/comment cleanup --- botcpdf/role.py | 3 ++- botcpdf/util.py | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/botcpdf/role.py b/botcpdf/role.py index b73f2121..dcbf9630 100644 --- a/botcpdf/role.py +++ b/botcpdf/role.py @@ -87,8 +87,8 @@ def __init__(self): self.derive_night_values() def derive_night_values(self): + """Derive values for first_night and other_night""" night_data = load_nightdata() - #print(night_data) # loop through firstNight list in night_data; we need the index as well for index, role_id in enumerate(night_data["firstNight"]): @@ -189,6 +189,7 @@ def get_other_night_meta_roles(self) -> list[Role]: """Get a list of meta roles.""" return [self.roles["_dawn"], self.roles["_dusk"]] + # we're outside the class now, and this is just helper functions def cleanup_role_id(id_slug) -> str: """Cleanup the character ID.""" diff --git a/botcpdf/util.py b/botcpdf/util.py index d33e098f..0936510a 100644 --- a/botcpdf/util.py +++ b/botcpdf/util.py @@ -14,6 +14,7 @@ def load_role_data(): """Load role data from a JSON file.""" return load_data("gameinfo/roles-bra1n.json") + def load_nightdata(): """Load role data from a JSON file.""" return load_data("gameinfo/nightsheet.json") From fe0085af0191ff642145b6a8f89483ff13c29977 Mon Sep 17 00:00:00 2001 From: Chisel Date: Fri, 14 Apr 2023 15:21:26 +0100 Subject: [PATCH 5/6] bump pyproject version to 0.0.6 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1003d1d7..a413d92f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "botc-json2pdf" -version = "0.0.5" +version = "0.0.6" description = "" authors = ["Chisel "] readme = "README.md" From e40225c5b8e0f32e558ea5a1a8b8ee84afff6de8 Mon Sep 17 00:00:00 2001 From: Chisel Date: Fri, 14 Apr 2023 15:21:28 +0100 Subject: [PATCH 6/6] changie updates for 0.0.6 --- .changes/0.0.6.md | 15 +++++++++++++++ .changes/unreleased/Added-20230414-140901.yaml | 5 ----- .changes/unreleased/Changed-20230414-014524.yaml | 5 ----- .changes/unreleased/Changed-20230414-015528.yaml | 5 ----- .changes/unreleased/Changed-20230414-115103.yaml | 5 ----- .changes/unreleased/Changed-20230414-141841.yaml | 5 ----- .changes/unreleased/Fixed-20230414-105528.yaml | 6 ------ .changes/unreleased/Fixed-20230414-141605.yaml | 5 ----- CHANGELOG.md | 15 +++++++++++++++ README.md | 2 +- 10 files changed, 31 insertions(+), 37 deletions(-) create mode 100644 .changes/0.0.6.md delete mode 100644 .changes/unreleased/Added-20230414-140901.yaml delete mode 100644 .changes/unreleased/Changed-20230414-014524.yaml delete mode 100644 .changes/unreleased/Changed-20230414-015528.yaml delete mode 100644 .changes/unreleased/Changed-20230414-115103.yaml delete mode 100644 .changes/unreleased/Changed-20230414-141841.yaml delete mode 100644 .changes/unreleased/Fixed-20230414-105528.yaml delete mode 100644 .changes/unreleased/Fixed-20230414-141605.yaml diff --git a/.changes/0.0.6.md b/.changes/0.0.6.md new file mode 100644 index 00000000..1678aa05 --- /dev/null +++ b/.changes/0.0.6.md @@ -0,0 +1,15 @@ +## 0.0.6 - 2023-04-14 + +### Added + +* fix placement of footer info on first page +### Changed + +* add more json assets to 'make refresh-json' [#2] +* Update gameinfo/*.json from assets +* pre-commit autoupdate, and format change for 'exclude' +* ignore .changes/unreleased/ files with yamllint +### Fixed + +* [pre-commit] ignore anything in gameinfo and fonts as we don't author these ourself +* add make dep of 'install-dev' for 'process' \ No newline at end of file diff --git a/.changes/unreleased/Added-20230414-140901.yaml b/.changes/unreleased/Added-20230414-140901.yaml deleted file mode 100644 index 4127bdd7..00000000 --- a/.changes/unreleased/Added-20230414-140901.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: Added -body: fix placement of footer info on first page -time: 2023-04-14T14:09:01.9167+01:00 -custom: - GithubIssue: "" diff --git a/.changes/unreleased/Changed-20230414-014524.yaml b/.changes/unreleased/Changed-20230414-014524.yaml deleted file mode 100644 index 2f83a5ef..00000000 --- a/.changes/unreleased/Changed-20230414-014524.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: Changed -body: add more json assets to 'make refresh-json' -time: 2023-04-14T01:45:24.847542+01:00 -custom: - GithubIssue: "2" diff --git a/.changes/unreleased/Changed-20230414-015528.yaml b/.changes/unreleased/Changed-20230414-015528.yaml deleted file mode 100644 index a74d967a..00000000 --- a/.changes/unreleased/Changed-20230414-015528.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: Changed -body: Update gameinfo/*.json from assets -time: 2023-04-14T01:55:28.439088+01:00 -custom: - GithubIssue: "" diff --git a/.changes/unreleased/Changed-20230414-115103.yaml b/.changes/unreleased/Changed-20230414-115103.yaml deleted file mode 100644 index 8af1c7f7..00000000 --- a/.changes/unreleased/Changed-20230414-115103.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: Changed -body: pre-commit autoupdate, and format change for 'exclude' -time: 2023-04-14T11:51:03.876999+01:00 -custom: - GithubIssue: "" diff --git a/.changes/unreleased/Changed-20230414-141841.yaml b/.changes/unreleased/Changed-20230414-141841.yaml deleted file mode 100644 index 79dcbaec..00000000 --- a/.changes/unreleased/Changed-20230414-141841.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: Changed -body: ignore .changes/unreleased/ files with yamllint -time: 2023-04-14T14:18:41.248879+01:00 -custom: - GithubIssue: "" diff --git a/.changes/unreleased/Fixed-20230414-105528.yaml b/.changes/unreleased/Fixed-20230414-105528.yaml deleted file mode 100644 index a5a1595b..00000000 --- a/.changes/unreleased/Fixed-20230414-105528.yaml +++ /dev/null @@ -1,6 +0,0 @@ -kind: Fixed -body: '[pre-commit] ignore anything in gameinfo and fonts as we don''t author these - ourself' -time: 2023-04-14T10:55:28.518855+01:00 -custom: - GithubIssue: "" diff --git a/.changes/unreleased/Fixed-20230414-141605.yaml b/.changes/unreleased/Fixed-20230414-141605.yaml deleted file mode 100644 index 941bb6af..00000000 --- a/.changes/unreleased/Fixed-20230414-141605.yaml +++ /dev/null @@ -1,5 +0,0 @@ -kind: Fixed -body: add make dep of 'install-dev' for 'process' -time: 2023-04-14T14:16:05.170844+01:00 -custom: - GithubIssue: "" diff --git a/CHANGELOG.md b/CHANGELOG.md index e10e13b9..5e4fef8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,21 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). +## 0.0.6 - 2023-04-14 + +### Added + +* fix placement of footer info on first page +### Changed + +* add more json assets to 'make refresh-json' [#2] +* Update gameinfo/*.json from assets +* pre-commit autoupdate, and format change for 'exclude' +* ignore .changes/unreleased/ files with yamllint +### Fixed + +* [pre-commit] ignore anything in gameinfo and fonts as we don't author these ourself +* add make dep of 'install-dev' for 'process' ## 0.0.5 - 2023-04-14 ### Added diff --git a/README.md b/README.md index 334ebd8e..0a67089a 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ -![version](https://img.shields.io/badge/version-v0.0.5-blue) ![GitHub issues](https://img.shields.io/github/issues-raw/chizmw/botc-custom-script-json2pdf) ![GitHub last commit](https://img.shields.io/github/last-commit/chizmw/botc-custom-script-json2pdf) ![GitHub pull requests](https://img.shields.io/github/issues-pr/chizmw/botc-custom-script-json2pdf) +![version](https://img.shields.io/badge/version-v0.0.6-blue) ![GitHub issues](https://img.shields.io/github/issues-raw/chizmw/botc-custom-script-json2pdf) ![GitHub last commit](https://img.shields.io/github/last-commit/chizmw/botc-custom-script-json2pdf) ![GitHub pull requests](https://img.shields.io/github/issues-pr/chizmw/botc-custom-script-json2pdf)