Skip to content

Commit

Permalink
Release v1.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
CollinHeist authored Dec 28, 2023
2 parents 4f6b0f9 + f964c25 commit 087ab19
Show file tree
Hide file tree
Showing 66 changed files with 2,857 additions and 901 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,15 @@ jobs:
- name: Check Out Repo
uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Login to GHCR
uses: docker/login-action@v2
with:
Expand All @@ -37,12 +41,11 @@ jobs:
with:
platforms: all

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build and Push
uses: docker/build-push-action@v4
with:
platforms: linux/amd64,linux/arm64 # edit this if you want to build more architectures
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKER_HUB_USERNAME }}/titlecardmaker:${{ inputs.tag }},ghcr.io/collinheist/titlecardmaker:${{ inputs.tag }}
cache-from: type=gha
cache-to: type=gha,mode=max
61 changes: 61 additions & 0 deletions .ruff.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".mypy_cache",
".nox",
".pants.d",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"venv",
"config",
"archives",
"modules/.objects",
"app/alembic/",
"modules/global_objects.py",
]

# Same as Black.
line-length = 88
indent-width = 4

# Assume Python 3.9
target-version = "py39"

[lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
select = ["E4", "E7", "E9", "F"]
ignore = ['F541', 'F403', 'F405']

# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []

# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"

[format]
# Like Black, use double quotes for strings.
quote-style = "single"

# Like Black, indent with spaces, rather than tabs.
indent-style = "space"

# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false

# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
3 changes: 2 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name = "pypi"
[packages]
regex = "==2023.10.3"
num2words = "==0.5.12"
pyyaml = "==6.0"
pyyaml = "==6.0.1"
requests = "==2.31.0"
titlecase = "==2.4"
tqdm = "==4.66.1"
Expand All @@ -21,6 +21,7 @@ imagesize = "==1.4.1"
pillow = "==10.0.1"

[dev-packages]
ruff = "*"

[requires]
python_version = "3.9"
343 changes: 198 additions & 145 deletions Pipfile.lock

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

An automated title card maker for the Plex, Jellyfin, and Emby media servers. All user documentation is available on the [Wiki](https://github.com/CollinHeist/TitleCardMaker/wiki).

Version 2.0 - the Web UI - has officially entered pre-release, and is currently available for project [Sponsors](https://github.com/sponsors/CollinHeist).

<img alt="Web UI" src="https://raw.githubusercontent.com/CollinHeist/TitleCardMaker/web-ui/docs/assets/home_dark.webp"/>

More details are located at [titlecardmaker.com](https://titlecardmaker.com/) - this README (and the Wiki documentation) are primarily geared towards the non-UI (v1).

## Table of Contents
- [Description](#description)
- [Getting Started](#getting-started)
Expand Down Expand Up @@ -46,17 +52,17 @@ For invocation and configuration details, read [here](https://github.com/CollinH
Below are examples of almost all the types of title card that can be created automatically by TitleCardMaker:

### Built-in Card Types
<img alt="Anime" src="https://user-images.githubusercontent.com/17693271/185820454-4e3dca1c-c0df-4fa0-a7a7-81e070aa9e69.jpg" height="150"/> <img alt="Calligraphy" src="https://user-images.githubusercontent.com/17693271/275364823-473521f4-e2e3-4236-a514-49eb186f2872.jpg" height="150"> <img alt="Comic Book" src="https://github.com/CollinHeist/TitleCardMaker/assets/17693271/c5f34e46-ec3b-44a9-a563-b9a24db8cd1a" height="150"/> <img alt="Cutout" src="https://user-images.githubusercontent.com/17693271/212500535-e88daff6-ecc0-4cc8-8627-82069114c7e0.jpg" height="150"/> <img alt="Divider" src="https://user-images.githubusercontent.com/17693271/232378485-a9a737dc-9faf-47c2-b639-7df3d3ffb194.jpg" height="150"> <img alt="Fade" src="https://user-images.githubusercontent.com/17693271/214648223-b4f68553-e982-4efa-a16b-9662018b5d40.jpg" height="150"/> <img alt="Frame" src="https://user-images.githubusercontent.com/17693271/202352614-155a176a-fdb0-4476-9f11-6a3a20533a54.jpg" height="150"/> <img alt="Landscape" src="https://user-images.githubusercontent.com/17693271/202352137-b411da21-65ce-4bed-991b-90428c71ec34.jpg" height="150"/> <img alt="Logo" src="https://user-images.githubusercontent.com/17693271/172227163-0ee4990a-b0a8-4dbd-91b3-3f57dfe6e732.jpg" height="150"/> <img alt="Marvel" src="https://github.com/CollinHeist/TitleCardMaker/assets/17693271/8cd0c2b5-bd48-4c58-9e5b-bf1e0ebf322d" height="150"> <img alt="Olivier" src="https://user-images.githubusercontent.com/17693271/212500009-067f14ff-4f48-4f75-bacd-7311a9aba716.jpg" height="150"/> <img alt="Overline" src="https://user-images.githubusercontent.com/17693271/277546845-a8de2b70-5d62-4a14-97cd-3ed365054795.jpg" height="150"> <img alt="Poster" src="https://user-images.githubusercontent.com/17693271/180627387-f72bb58e-e001-4608-b4be-82a26263c628.jpg" height="150"/> <img alt="Roman" src="https://user-images.githubusercontent.com/17693271/203910966-4dde1466-6c7e-4422-923b-1f9222ad49e9.jpg" height="150"/> <img alt="Standard" src="https://user-images.githubusercontent.com/17693271/212500240-ae946f2c-a5c8-4881-85f2-83ccb45bf46e.jpg" height="150"/> <img alt="Star Wars" src="https://user-images.githubusercontent.com/17693271/170836059-136fa6eb-40ef-4cd7-9aca-8ad8e0537239.jpg" height="150"> <img alt="tinted Frame" src="https://user-images.githubusercontent.com/17693271/233257029-8b17ce2e-01ea-4ae3-bc73-54e152be4d31.jpg" height="150"> <img alt="Tinted Glass" src="https://user-images.githubusercontent.com/17693271/213939482-6018b2be-28c5-42dd-988d-d7b9733fe0e8.jpg" height="150"> <img alt="White Border" height="150" src="https://github.com/CollinHeist/TitleCardMaker/assets/17693271/14f25d6a-4be7-4078-97c2-7730ed070508"/>
<img alt="Anime" src="https://user-images.githubusercontent.com/17693271/185820454-4e3dca1c-c0df-4fa0-a7a7-81e070aa9e69.jpg" width="32%"/> <img alt="Banner" src="https://github.com/CollinHeist/TitleCardMaker/assets/17693271/384915b9-cd0c-4e0d-90dc-4b3194c7d4a1" width="32%"> <img alt="Calligraphy" src="https://user-images.githubusercontent.com/17693271/275364823-473521f4-e2e3-4236-a514-49eb186f2872.jpg" width="32%"> <img alt="Comic Book" src="https://github.com/CollinHeist/TitleCardMaker/assets/17693271/c5f34e46-ec3b-44a9-a563-b9a24db8cd1a" width="32%"/> <img alt="Cutout" src="https://user-images.githubusercontent.com/17693271/212500535-e88daff6-ecc0-4cc8-8627-82069114c7e0.jpg" width="32%"/> <img alt="Divider" src="https://user-images.githubusercontent.com/17693271/232378485-a9a737dc-9faf-47c2-b639-7df3d3ffb194.jpg" width="32%"> <img alt="Fade" src="https://user-images.githubusercontent.com/17693271/214648223-b4f68553-e982-4efa-a16b-9662018b5d40.jpg" width="32%"/> <img alt="Frame" src="https://user-images.githubusercontent.com/17693271/202352614-155a176a-fdb0-4476-9f11-6a3a20533a54.jpg" width="32%"/> <img alt="Inset" src="https://github.com/CollinHeist/TitleCardMaker/assets/17693271/65d2fac6-c29e-47f2-bdd4-725672c0ace2" width="32%"> <img alt="Landscape" src="https://user-images.githubusercontent.com/17693271/202352137-b411da21-65ce-4bed-991b-90428c71ec34.jpg" width="32%"> <img alt="Logo" src="https://user-images.githubusercontent.com/17693271/172227163-0ee4990a-b0a8-4dbd-91b3-3f57dfe6e732.jpg" width="32%"> <img alt="Marvel" src="https://github.com/CollinHeist/TitleCardMaker/assets/17693271/8cd0c2b5-bd48-4c58-9e5b-bf1e0ebf322d" width="32%"> <img alt="Olivier" src="https://user-images.githubusercontent.com/17693271/212500009-067f14ff-4f48-4f75-bacd-7311a9aba716.jpg" width="32%"/> <img alt="Overline" src="https://user-images.githubusercontent.com/17693271/277546845-a8de2b70-5d62-4a14-97cd-3ed365054795.jpg" width="32%"> <img alt="Poster" src="https://user-images.githubusercontent.com/17693271/180627387-f72bb58e-e001-4608-b4be-82a26263c628.jpg" width="32%"> <img alt="Roman" src="https://user-images.githubusercontent.com/17693271/203910966-4dde1466-6c7e-4422-923b-1f9222ad49e9.jpg" width="32%"> <img alt="Standard" src="https://user-images.githubusercontent.com/17693271/212500240-ae946f2c-a5c8-4881-85f2-83ccb45bf46e.jpg" width="32%"/> <img alt="Shape" src="https://github.com/CollinHeist/TitleCardMaker/assets/17693271/fabc3224-c99f-434e-a70a-cfc468eada2a" width="32%"> <img alt="Star Wars" src="https://user-images.githubusercontent.com/17693271/170836059-136fa6eb-40ef-4cd7-9aca-8ad8e0537239.jpg" width="32%"> <img alt="tinted Frame" src="https://user-images.githubusercontent.com/17693271/233257029-8b17ce2e-01ea-4ae3-bc73-54e152be4d31.jpg" width="32%"> <img alt="Tinted Glass" src="https://user-images.githubusercontent.com/17693271/213939482-6018b2be-28c5-42dd-988d-d7b9733fe0e8.jpg" width="32%"> <img alt="White Border" width="32%" src="https://github.com/CollinHeist/TitleCardMaker/assets/17693271/14f25d6a-4be7-4078-97c2-7730ed070508">

> The above cards are, in order, the [anime](https://github.com/CollinHeist/TitleCardMaker/wiki/AnimeTitleCard), [calligraphy](https://github.com/CollinHeist/TitleCardMaker/wiki/CalligraphyTitleCard), [comic book](https://github.com/CollinHeist/TitleCardMaker/wiki/ComicBookTitleCard), [cutout](https://github.com/CollinHeist/TitleCardMaker/wiki/CutoutTitleCard), [divider](https://github.com/CollinHeist/TitleCardMaker/wiki/DividerTitleCard), [fade](https://github.com/CollinHeist/TitleCardMaker/wiki/FadeTitleCard), [frame](https://github.com/CollinHeist/TitleCardMaker/wiki/FrameTitleCard), [landscape](https://github.com/CollinHeist/TitleCardMaker/wiki/LandscapeTitleCard), [logo](https://github.com/CollinHeist/TitleCardMaker/wiki/LogoTitleCard), [marvel](https://github.com/CollinHeist/TitleCardMaker/wiki/MarvelTitleCard), [olivier](https://github.com/CollinHeist/TitleCardMaker/wiki/OlivierTitleCard), [overline](https://github.com/CollinHeist/TitleCardMaker/wiki/OverlineTitleCard), [poster](https://github.com/CollinHeist/TitleCardMaker/wiki/PosterTitleCard), [roman](https://github.com/CollinHeist/TitleCardMaker/wiki/RomanNumeralTitleCard), [standard](https://github.com/CollinHeist/TitleCardMaker/wiki/StandardTitleCard), [star wars](https://github.com/CollinHeist/TitleCardMaker/wiki/StarWarsTitleCard), [tinted frame](https://github.com/CollinHeist/TitleCardMaker/wiki/TintedFrameTitleCard), [tinted glass](https://github.com/CollinHeist/TitleCardMaker/wiki/TintedGlassTitleCard), and the [white border](https://github.com/CollinHeist/TitleCardMaker/wiki/WhiteBorderTitleCard) title cards - the [textless](https://github.com/CollinHeist/TitleCardMaker/wiki/TitleCard) card is not shown.
> The above cards are, in order, the [anime](https://github.com/CollinHeist/TitleCardMaker/wiki/AnimeTitleCard), [banner](https://github.com/CollinHeist/TitleCardMaker/wiki/BannerTitleCard), [calligraphy](https://github.com/CollinHeist/TitleCardMaker/wiki/CalligraphyTitleCard), [comic book](https://github.com/CollinHeist/TitleCardMaker/wiki/ComicBookTitleCard), [cutout](https://github.com/CollinHeist/TitleCardMaker/wiki/CutoutTitleCard), [divider](https://github.com/CollinHeist/TitleCardMaker/wiki/DividerTitleCard), [fade](https://github.com/CollinHeist/TitleCardMaker/wiki/FadeTitleCard), [frame](https://github.com/CollinHeist/TitleCardMaker/wiki/FrameTitleCard), [inset](https://github.com/CollinHeist/TitleCardMaker/wiki/InsetTitleCard), [landscape](https://github.com/CollinHeist/TitleCardMaker/wiki/LandscapeTitleCard), [logo](https://github.com/CollinHeist/TitleCardMaker/wiki/LogoTitleCard), [marvel](https://github.com/CollinHeist/TitleCardMaker/wiki/MarvelTitleCard), [olivier](https://github.com/CollinHeist/TitleCardMaker/wiki/OlivierTitleCard), [overline](https://github.com/CollinHeist/TitleCardMaker/wiki/OverlineTitleCard), [poster](https://github.com/CollinHeist/TitleCardMaker/wiki/PosterTitleCard), [roman](https://github.com/CollinHeist/TitleCardMaker/wiki/RomanNumeralTitleCard), [standard](https://github.com/CollinHeist/TitleCardMaker/wiki/StandardTitleCard), [shape](https://github.com/CollinHeist/TitleCardMaker/wiki/ShapeTitleCard), [star wars](https://github.com/CollinHeist/TitleCardMaker/wiki/StarWarsTitleCard), [tinted frame](https://github.com/CollinHeist/TitleCardMaker/wiki/TintedFrameTitleCard), [tinted glass](https://github.com/CollinHeist/TitleCardMaker/wiki/TintedGlassTitleCard), and the [white border](https://github.com/CollinHeist/TitleCardMaker/wiki/WhiteBorderTitleCard) title cards - the [textless](https://github.com/CollinHeist/TitleCardMaker/wiki/TextlessTitleCard) card is not shown.

<details><summary><h3>User-Created Card Types</h3></summary>

The TitleCardMaker can also use user-created and maintained card types hosted on the [companion GitHub](https://github.com/CollinHeist/TitleCardMaker-CardTypes), an example of each type is shown below:

<img src="https://i.ibb.co/tBPsxpc/Westworld-2016-S04-E01.jpg" height="175"/> <img src="https://github.com/Beedman/TitleCardMaker-CardTypes/blob/master/Beedman/The%20Afterparty%20(2022)%20-%20S01E02%20-%20Brett.jpg?raw=true" height="175"/> <img src="https://i.ibb.co/0tnJJ6P/Stranger-Things-2016-S03-E02.jpg" height="175"/> <img src="https://cdn.discordapp.com/attachments/975108033531219979/977614937457303602/S01E04.jpg" height="175"/> <img src="https://github.com/Wdvh/TitleCardMaker-CardTypes/blob/c14f1b3759983a63e66982ba6517e2bc3f651dca/Wdvh/S01E01.jpg" height="175"/> <img src="https://user-images.githubusercontent.com/17693271/169709482-6bb023ab-4986-464e-88d6-0e05ad75d0d3.jpg" height="175"/> <img src="https://user-images.githubusercontent.com/1803189/171089736-f60a6ff2-0914-432a-a45d-145323d39c42.jpg" height="175"/> <img src="https://user-images.githubusercontent.com/17693271/169709359-ffc9e109-b327-44e9-b78a-7276f77fe917.jpg" height="175"/> <img src="https://github.com/CollinHeist/TitleCardMaker-CardTypes/blob/110c2ec729dbb20d8ed461e7cc5a07c54540f842/Wdvh/S01E07.jpg" height="175"/> <img src="https://user-images.githubusercontent.com/7379812/187586521-353ba09f-30a8-424b-bbf3-ee9036c9e638.jpg" height="175"/>
<img src="https://i.ibb.co/tBPsxpc/Westworld-2016-S04-E01.jpg" height="175"/> <img src="https://github.com/Beedman/TitleCardMaker-CardTypes/blob/master/Beedman/The%20Afterparty%20(2022)%20-%20S01E02%20-%20Brett.jpg?raw=true" height="175"/> <img src="https://i.ibb.co/0tnJJ6P/Stranger-Things-2016-S03-E02.jpg" height="175"/> <img src="https://cdn.discordapp.com/attachments/975108033531219979/977614937457303602/S01E04.jpg" height="175"/> <img src="https://raw.githubusercontent.com/Wdvh/TitleCardMaker-CardTypes/c14f1b3759983a63e66982ba6517e2bc3f651dca/Wdvh/S01E01.jpg" height="175"/> <img src="https://user-images.githubusercontent.com/17693271/169709482-6bb023ab-4986-464e-88d6-0e05ad75d0d3.jpg" height="175"/> <img src="https://user-images.githubusercontent.com/1803189/171089736-f60a6ff2-0914-432a-a45d-145323d39c42.jpg" height="175"/> <img src="https://user-images.githubusercontent.com/17693271/169709359-ffc9e109-b327-44e9-b78a-7276f77fe917.jpg" height="175"/> <img src="https://raw.githubusercontent.com/CollinHeist/TitleCardMaker-CardTypes/110c2ec729dbb20d8ed461e7cc5a07c54540f842/Wdvh/S01E07.jpg" height="175"/> <img src="https://user-images.githubusercontent.com/7379812/187586521-353ba09f-30a8-424b-bbf3-ee9036c9e638.jpg" height="175"/> <img src="https://github.com/khthe8th/TitleCardMaker-CardTypes/assets/5308389/d089a1b1-7458-4eaf-ad8d-59c7f332a7c1" height="175"/>

> The above cards are, in order, `Yozora/BarebonesTitleCard`, `Beedman/GradientLogoTitleCard`, `Yozora/RetroTitleCard`, `Yozora/SlimTitleCard`, `Wdvh/StarWarsTitleOnly`, `Wdvh/WhiteTextAbsolute`, `lyonza/WhiteTextBroadcast`, `Wdvh/WhiteTextStandard`, `Wdvh/WhiteTextTitleOnly`, and `azuravian/TitleColorMatch`
> The above cards are, in order, `Yozora/BarebonesTitleCard`, `Beedman/GradientLogoTitleCard`, `Yozora/RetroTitleCard`, `Yozora/SlimTitleCard`, `Wdvh/StarWarsTitleOnly`, `Wdvh/WhiteTextAbsolute`, `lyonza/WhiteTextBroadcast`, `Wdvh/WhiteTextStandard`, `Wdvh/WhiteTextTitleOnly`, `azuravian/TitleColorMatch`, and `KHthe8th/TintedFramePlusTitleCard`
</details>

Expand Down
2 changes: 1 addition & 1 deletion fixer.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ class Episode: # pylint: disable=missing-class-docstring
media_interface = JellyfinInterface(**pp.jellyfin_interface_kwargs)
else:
media_interface = PlexInterface(**pp.plex_interface_kwargs)
except Exception as e:
except Exception:
log.critical(f'Cannot connect to "{args.media_server}" Media Server')
sys_exit(1)

Expand Down
23 changes: 15 additions & 8 deletions mini_maker.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from os import environ
from pathlib import Path
from re import match, IGNORECASE
from sys import exit
from sys import exit as sys_exit

try:
from modules.AspectRatioFixer import AspectRatioFixer
Expand All @@ -20,7 +20,7 @@
from modules.StylizedSummary import StylizedSummary
except ImportError:
print(f'Required Python packages are missing - execute "pipenv install"')
exit(1)
sys_exit(1)

# Environment Variables
ENV_IS_DOCKER = 'TCM_IS_DOCKER'
Expand Down Expand Up @@ -366,11 +366,17 @@
type=str,
default='100%',
metavar='SCALE%',
help='Specify the font kerning scale (as percentage) for this season poster')
help='Specify the font kerning scale (as percentage) in the season poster')
season_poster_group.add_argument(
'--top-placement',
action='store_true',
help='Create the season poster with the logo and season text at the top')
'--logo-placement',
choices=('top', 'middle', 'bottom'),
default='bottom',
help='Where to place the logo in the created season poster')
season_poster_group.add_argument(
'--text-placement',
choices=('top', 'bottom'),
default='bottom',
help='Where to place the text in the created season poster')

# Parse given arguments
args, unknown = parser.parse_known_args()
Expand All @@ -388,7 +394,7 @@

# Parse preference file for options that might need it
if not (pp := PreferenceParser(args.preferences, is_docker)).valid:
exit(1)
sys_exit(1)
set_preference_parser(pp)

# Execute title card related options
Expand Down Expand Up @@ -582,7 +588,8 @@ class Show:
font_color=args.season_font_color,
font_size=float(args.season_font_size[:-1])/100.0,
font_kerning=float(args.season_font_kerning[:-1])/100.0,
top_placement=args.top_placement,
logo_placement=args.logo_placement,
omit_gradient=args.no_gradient,
omit_logo=not hasattr(args, 'season_poster_logo'),
text_placement=args.text_placement,
).create()
Loading

0 comments on commit 087ab19

Please sign in to comment.