Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d1d525a
Put all user option proficiencies in brackets
PJBrs Jun 29, 2024
2de29cc
character.py: Separate user selected optional proficiencies
PJBrs Jun 29, 2024
5e5c780
Don't list optional proficiencies on character sheets
PJBrs Jun 30, 2024
3b7d6b3
create_character.py: Add proficiency choices to file
PJBrs Jun 30, 2024
0d937f0
Add warnings for remaining optional proficiences
PJBrs Jun 30, 2024
e5ed9d6
epub: Switch to proficiencies by type
PJBrs Apr 14, 2025
3d216ee
latex.py: Silence a couple of docutils warnings
PJBrs Feb 20, 2025
8edb831
latex.py: Set docutils legacy_column_widths to False
PJBrs Mar 3, 2025
d0c919a
character.py: Remove fighting styles from features
PJBrs Feb 21, 2025
078ac87
character.py: Don't sort spells unnecessarily
PJBrs Feb 21, 2025
91e0464
make_sheets.py: Remove unused variable pages[]
PJBrs Mar 31, 2025
91d494b
latex character template: Fix halfcaster sheet
PJBrs Apr 11, 2025
c294d80
fillable_pdf_template: Fix halfcaster sheet
PJBrs Apr 11, 2025
3cda2f7
pyproject.toml: Package all html forms
PJBrs May 11, 2025
1f721d3
pyproject.toml: Deal with some deprecation warnings
PJBrs May 24, 2025
ec556b9
docs: Fix some warnings
PJBrs May 24, 2025
2e9e965
Latex feature pages: Sort feats by type
PJBrs Jan 30, 2024
88b6b50
Latex feature pages: Add headers for feat types
PJBrs Sep 3, 2025
e8da2bf
Latex feature pages: Advanced feat sorting
PJBrs Jun 9, 2024
0020aae
Feat sorting: Sort Battle Master maneuvers
PJBrs Jun 9, 2024
b73d070
Feat sorting: Sort TrickShots under AdeptMarksman
PJBrs Jun 9, 2024
493b2d6
Feat sorting: Sort Arcane Shots
PJBrs May 9, 2025
560b084
Feat sorting: Sort Eldritch Invocations
PJBrs Jun 9, 2024
a195ab9
Feat sorting: Bloodhunter Rites, Blood Curses and Formulas
PJBrs Jun 9, 2024
329eb24
tests: Add test for features_by_type
PJBrs Aug 31, 2025
fced5e3
README.rst: Document feature sorting option
PJBrs Jun 9, 2024
5b5e5b3
Fix typo in druid.py
user18130814200115-2 Sep 30, 2025
9194bbc
spells: Formatting enhancements and cleanups
PJBrs Feb 20, 2025
e29705c
features: Spelling and formatting enhancements
PJBrs May 9, 2025
b303c04
Misc spelling fixes
PJBrs May 9, 2025
0143ad2
races: Triton appear to have darkvision
PJBrs Nov 16, 2024
f53bc68
character: Add magic items to weight calculation
PJBrs May 6, 2025
43f678e
tests: character: Adapt carrying weight tests
PJBrs Sep 5, 2025
a469330
character.py: Allow FeatureSelector in feature_choices
PJBrs Aug 29, 2025
f4d3ecf
feat(ure)s.py: Implement Resilient
PJBrs Aug 28, 2024
61fbef9
dungeonsheets/modules: Add MSavage latex template
PJBrs Feb 17, 2024
ecaacbc
MSavage latex template: Switch to lualatex
PJBrs Mar 14, 2024
5c6a154
MSavage latex template: Rename
PJBrs Apr 5, 2024
b73fa4e
README.rst: Document the latex character sheet
PJBrs Jun 9, 2024
87ca589
latex.py: Add local dnd.sty and dndntemplate.sty if installed
PJBrs Mar 22, 2024
9bee6ba
Updates Dockerfile and test pipelines
matsavage Apr 7, 2024
1534606
Bloodhunter: 80-column source files and whitespace fixes
PJBrs Jun 7, 2024
f3ecf67
Make bloodhunter example more realistic
PJBrs Jun 9, 2024
2e4e79b
Bloodhunter cleanups
PJBrs Jun 9, 2024
0325a16
bloodhunter: integrate duplicate classes
PJBrs Jun 9, 2024
46f4234
bloodhunter: Remove duplicate definition of subclasses_available
PJBrs Aug 29, 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
86 changes: 80 additions & 6 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
name: Docker
name: Deploy Docker image

on:
push:
branches: [ "master" ]
workflow_run:
workflows: ["Python package"]
branches: ["master"]
types:
- completed

workflow_dispatch:

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
VERSION: latest

jobs:
build_publish:
build:
name: Build Docker image
runs-on: ubuntu-latest
permissions:
contents: read
Expand All @@ -29,7 +36,7 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Login against Container registry
- name: Login to container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
Expand All @@ -42,11 +49,78 @@ jobs:
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
- name: Build Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64, linux/arm64

test:
name: Test Docker image
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
packages: read
strategy:
matrix:
build-command: ["", "--fancy --tex-template --feats-by-type --spells-by-level", "--output-format=epub"]

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Login to container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Run Tests
run: |
docker run -v ${{ github.workspace }}/examples:/build ${{ steps.meta.outputs.tags }} ${{ matrix.build-command }}

push:
name: Deploy Docker image
needs: [build, test]
if: ${{ github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:

- name: Login to container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

- name: Pull Docker image from GHCR
run: docker pull ${{ steps.meta.outputs.tags }}

- name: Lowercase reponame
run: echo "IMAGE_NAME_LC=${GITHUB_REPOSITORY@L}" >> "${GITHUB_ENV}"

- name: Tag and push Docker image to GHCR (final)
run: |
docker tag ${{ steps.meta.outputs.tags }} ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:${{ env.VERSION }}
docker push ${{ steps.meta.outputs.tags }}
docker push ${{ env.REGISTRY }}/${{ env.IMAGE_NAME_LC }}:${{ env.VERSION }}
43 changes: 0 additions & 43 deletions .github/workflows/python-ci.yml

This file was deleted.

84 changes: 84 additions & 0 deletions .github/workflows/python_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: Python package

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
name: "Run test suite"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
python-version: ['3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Set up required system dependencies
run: |
sudo apt-get update
sudo apt-get -y install pdftk texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-luatex texlive-pstricks

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip

- name: Install dependencies and do a local pip install
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run flake
run: flake8 dungeonsheets/ --exit-zero

- name: Run tests
run: pytest --cov=dungeonsheets tests/

render_examples:
name: "Test python-3.12, render all examples"
runs-on: ubuntu-latest
needs: [build]
strategy:
matrix:
build-command: ["", "--fancy --tex-template --spells-by-level --feats-by-type", "--output-format=epub"]

steps:
- uses: actions/checkout@v4
name: Checkout Repo
with:
submodules: recursive

- name: Set up required system dependencies
run: |
sudo apt-get update
sudo apt-get -y install pdftk texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-luatex texlive-pstricks

- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip

- name: Install dependencies and do a local pip install
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"

- name: Run flake
run: flake8 dungeonsheets/ --exit-zero

- name: Run tests
run: pytest --cov=dungeonsheets tests/

- name: Render examples with ${{ matrix.build-command }}
run: |
cd examples
makesheets --debug ${{ matrix.build-command }}
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "dungeonsheets/modules/DND-5e-LaTeX-Template"]
path = dungeonsheets/modules/DND-5e-LaTeX-Template
url = https://github.com/rpgtex/DND-5e-LaTeX-Template.git
[submodule "dungeonsheets/modules/DND-5e-LaTeX-Character-Sheet-Template"]
path = dungeonsheets/modules/DND-5e-LaTeX-Character-Sheet-Template
url = https://github.com/matsavage/DND-5e-LaTeX-Character-Sheet-Template
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM python:latest

RUN apt-get update && apt-get install -y pdftk texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra
RUN apt-get update && apt-get install -y pdftk texlive-latex-base texlive-latex-extra texlive-fonts-recommended texlive-fonts-extra texlive-luatex texlive-pstricks

WORKDIR /app

Expand Down
30 changes: 24 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Run the following in a directory with valid character files (such as the example

.. code:: bash

$ docker run -it -v $(pwd):/build ghcr.io/canismarko/dungeon-sheets:master
$ docker run -it -v $(pwd):/build ghcr.io/canismarko/dungeon-sheets:latest


Installation
Expand All @@ -48,7 +48,7 @@ Installation

.. note::

Dungeon sheets requires **at least python 3.6**. This is mostly due
dungeon-sheets requires **at least python 3.6**. This is mostly due
to the liberal use of f-strings_. If you want to use it with
previous versions of python 3, you'll probably have to replace all
the f-strings with the older ``.format()`` method or string
Expand All @@ -72,8 +72,9 @@ pdftk is available in Debian and derivatives as **pdftk**, the package
is not available in some RPM distributions, such as Fedora and CentOS.
One alternative would be to build your PC sheets using docker.

If the ``pdflatex`` command is available on your system, spellcasters
will include a spellbook with descriptions of each spell known. If
If the ``pdflatex`` command is available on your system, dungeon-sheets
will include a description of a character's features. For spellcasters,
it will include a spellbook with descriptions of each spell known. If
not, then this feature will be skipped.

In order to properly format descriptions for spells/features/etc.,
Expand Down Expand Up @@ -109,12 +110,29 @@ so attack bonuses and damage can be calculated automatically.

Consider using the ``-F`` option to include the excellent D&D 5e
template for rendering spellbooks, druid wild forms and features
pages (https://github.com/rpgtex/DND-5e-LaTeX-Template).
pages (https://github.com/rpgtex/DND-5e-LaTeX-Template). dungeon-
sheets includes its own version of the template, but will use a
local one if it is installed.

Consider using the ``-T`` option to use the beautiful latex character
sheet
(https://github.com/matsavage/DND-5e-LaTeX-Character-Sheet-Template).
This does require lualatex as well as a fairly recent version of
texlive. dungeon-sheets includes its own version of the latex character
template, but will use a local one if it is installed.

By default, your character's spells are ordered alphabetically. If you
would like your spellbook to be ordered by level, you can use the ``-S``
option to do so.

Furthermore, your character's features are ordered alphabetically by
default as well. Pass the ``-N`` option to order feats by type
(character feats, class feats, racial feats and background feat) and,
if applicable, by sub-type (e.g., for Sorcerers, metamagic feature
choices are collected under the Metamagic feature; for the Battle
Master subclass, Maneuver feature choices are collected under
the Combat Superiority feature.)

If you'd like a **step-by-step walkthrough** for creating a new
character, just run ``create-character`` from a command line and a
helpful menu system will take care of the basics for you.
Expand All @@ -130,7 +148,7 @@ properly parsed and rendered into LaTeX or HTML::

class Scrying(Spell):
"""You can see and hear a particular creature you choose that is on
the same plane of existence as you. The target must make a W isdom
the same plane of existence as you. The target must make a Wisdom
saving throw, which is modified by how well you know the target
and the sort of physical connection you have to it. If a target
knows you're casting this spell, it can fail the saving throw
Expand Down
2 changes: 1 addition & 1 deletion docs/character_files.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Each character file must contain a line like::

dungeonsheets_version = "0.4.2"

Without this line, the :ref:`makesheets` command-line utility will ignore
Without this line, the :ref:`makesheets<Usage>` command-line utility will ignore
the file. This is necessary to avoid importing non-D&D python files.

.. note::
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand All @@ -90,7 +90,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
#html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down
5 changes: 3 additions & 2 deletions dungeonsheets/background.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class Outlander(Background):
class RivalIntern(Background):
"""You were an intern at a rival of Acquisitions Incorporated, and you
gained a healthy respect for nocjusc the job and the franchising
opportunities. but for the ruth- less and efficient way
opportunities. but for the ruthless and efficient way
Acquisitions Incorporated goes about its business. Why deal with
the rest, when you can work for the best?

Expand All @@ -117,7 +117,7 @@ class RivalIntern(Background):

name = "Rival Intern"
skill_proficiencies = ("history", "investigation")
proficiencies_text = ("One type of artisan's tools",)
proficiencies_text = ("[choose one type of artisan's tools]",)
languages = ("[choose one]",)
features = (feats.InsideInformant,)

Expand Down Expand Up @@ -263,6 +263,7 @@ class Faceless(Background):
about you prevents you from effectively pursuing the path you've chosen.
Even so, that doesn't stop you. You've left your old face behind, taking on
a new persona, becoming something more.

Characters with the faceless background don a disguise (literally or
otherwise) as they adventuree. This persona might be dramatic or subtle. In
a way, though, many characters have such larger than life personalities.
Expand Down
Loading