-
-
Notifications
You must be signed in to change notification settings - Fork 23
Using the Mini Maker
The Mini Maker (a.k.a. the file mini_maker.py
) is a command-line tool for "manually" creating images. An example of each possible created image is shown below:
Image Type | Example |
---|---|
Title Card | |
Collection Poster | |
Genre Card | |
Show Summary | |
Season Poster |
This file's -h
or --help
(help) menu is shown below:
Click to Expand
# pipenv run python3 mini_maker.py --help
usage: mini_maker.py [-h] [-p FILE] [--borderless] [--no-gradient] [--title-card SOURCE DESTINATION]
[--card-type TYPE] [--blur] [--episode EPISODE_TEXT] [--season SEASON_TEXT]
[--title TITLE_LINE [TITLE_LINE ...]] [--font FONT_FILE] [--font-size SCALE%]
[--font-color #HEX] [--vertical-shift PIXELS] [--interline-spacing PIXELS]
[--kerning SCALE%] [--stroke-width SCALE%] [--collection-poster SOURCE DESTINATION]
[--collection-title TITLE_LINE [TITLE_LINE ...]] [--collection-font FONT]
[--collection-font-color COLOR] [--collection-font-size SCALE%] [--omit-collection]
[--genre-card SOURCE GENRE DESTINATION] [--genre-card-batch SOURCE_DIRECTORY]
[--show-summary IMAGE_DIRECTORY LOGO] [--background COLOR_OR_IMAGE]
[--created-by CREATOR] [--season-poster SOURCE LOGO DESTINATION]
[--season-text SEASON_TEXT] [--season-font FONT_FILE] [--season-font-color COLOR]
[--season-font-size SCALE%] [--season-font-kerning SCALE%] [--top-placement]
Manually make cards
optional arguments:
-h, --help show this help message and exit
-p FILE, --preferences FILE, --preference-file FILE
File to read global preferences from. Environment variable TCM_PREFERENCES. Defaults
to "{...}/preferences.yml"
--borderless, --omit-border
Omit the border from the created Collection/Genre image
--no-gradient, --omit-gradient
Omit the gradient from the created Collection/Genre/Season image
Title Cards:
Manual TitleCardMaker interaction
--title-card SOURCE DESTINATION
Create a title card with the given source image, written to the given destination
--card-type TYPE Create a title card of a specific type
--blur Blur the source image for this card
--episode EPISODE_TEXT
The episode text for this card
--season SEASON_TEXT The season text for this card
--title TITLE_LINE [TITLE_LINE ...]
The title text for this card
--font FONT_FILE, --font-file FONT_FILE
A custom font file for this card
--font-size SCALE%, --size SCALE%
A font scale (as percentage) for this card
--font-color #HEX, --color #HEX
A custom font color for this card
--vertical-shift PIXELS, --shift PIXELS
How many pixels to vertically shift the title text
--interline-spacing PIXELS, --spacing PIXELS
How many pixels to increase the interline spacing of the title text
--kerning SCALE% Specify the font kerning scale (as percentage)
--stroke-width SCALE%, --stroke SCALE%
Specify the font black stroke scale (as percentage)
Collection Posters:
Manual collection poster creation
--collection-poster SOURCE DESTINATION
Create a collection poster with the given files
--collection-title TITLE_LINE [TITLE_LINE ...]
Collection title for this collection poster
--collection-font FONT
Custom font for the collection text of the specified poster
--collection-font-color COLOR
A custom font color for this collection poster
--collection-font-size SCALE%
A font scale (as percentage) for this collection poster
--omit-collection Omit the "COLLECTION" text from this collection poster
Genre Cards:
Manual genre card creation
--genre-card SOURCE GENRE DESTINATION
Create a genre card with the given text
--genre-card-batch SOURCE_DIRECTORY
Create all genre cards for images in the given directory based on their file names
Show Summaries:
Manual ShowSummary creation
--show-summary IMAGE_DIRECTORY LOGO
Create a show summary for the given directory
--background COLOR_OR_IMAGE
Specify background color or image for the created show summary
--created-by CREATOR Specify a custom username for the "Created by .." text on the created show sumamry
Season Poster:
Manual SeasonPoster creation
--season-poster SOURCE LOGO DESTINATION
Create a season poster with the given assets
--season-text SEASON_TEXT
Season text for the created season poster
--season-font FONT_FILE
A custom font file for this season poster
--season-font-color COLOR
A custom font color for this season poster
--season-font-size SCALE%
A font scale (as percentage) for this season poster
--season-font-kerning SCALE%
Specify the font kerning scale (as percentage) for this season poster
--top-placement Create the season poster with the logo and season text at the top
Specify the preference file to read for any related fix commands (notably ImageMagick).
The mini maker can be used to "manually" create title cards. This section of the fixer allows for the customization of these cards.
NOTE: A majority of the font customization arguments are explained in greater detail here.
NOTE: All the following commands have been spaced into multiple lines (the
\
characters) to improve readability; this is not required.
The following example creates a standard title card at card.jpg
using the source image at ./source/Breaking Bad (2005)/s1e1.jpg
with the title and season/episode text set according to the episode.
$ pipenv run python \
--title-card "./source/Breaking Bad (2005)/s1e1.jpg" "card.jpg" \
--title "Pilot" \
--season "SEASON 1" \
--episode "EPISODE 1"
Specify the card type of the title card to create. This must be a valid card type, or it can be a remote card type hosted on the GitHub.
Specify the input (source) image, and destination card filename. Paths with spaces need to be surrounded in quotes (" "
). An example of this option:
--title-card "in image.jpg" "out card.jpg"
Whether to blur the provided source image. See here for an example/motivaton for this effect.
The episode text to use for manual title card creation. Episode text with spaces need to be surrounded in quotes (" "
). If unspecified, EPISODE
is used. An example of this option:
--episode "CHAPTER 1"
The season text to use for manual title card creation. Season text with spaces need to be surrounded in quotes (" "
). If unspecified, no season text is used. An example of this option:
--season "SEASON 1"
The title text to use for manual title card creation. Titles with spaces need to be surrounded in quotes (" "
); and if the title is multiple lines, these need to be specified with spaces. An example of this option:
--title "Top Line:" "Bottom Line"
The custom font file to use for manual title card creation. Paths with spaces need to be surrounded in quotes (" "
). If unspecified, the generic font for the specified card type is used.
The font size scalar to use for manual title card creation. This must be specified as SCALE%
(i.e. 105%
). If unspecified, no scaling (100%
) is used.
The custom font color to use for manual title card creation. This must be a valid imagemagick color. If unspecified, the default font color for the specified card type is used.
How many pixels to vertically offset the title text for manual title card creation. A positive value moves the text up, negative down. If unspecified, a value of 0 is used.
How many pixels to offset the interline spacing between lines of title text for manual title card creation. A positive value adds spacing between lines, negative decreases spacing. If unspecified, a value of 0 is used.
How much to scale the kerning for letters of title text. If unspecified, no scaling (100%
) is used.
How much to scale the stroke width for title text. If unspecified, no scaling (100%
) is used.
Collection posters are images that can only be created with the mini maker, and are intended as collection posters for either manual use or with Plex Meta Manager.
Create a collection psoter for the given source image. The first argument is the input source image, the second is the file to write the poster to.
Specify the collection title for the created collection poster. If unspecified, no title will be added. To specify multiple lines, separate the title with spaces - for example:
$ pipenv run python mini_maker.py --collection-poster in_file.jpg out_poster.jpg --collection-title "Batman" "& ROBIN"
Will create a file out_poster.jpg
with the collection title being "BATMAN
" (top line) and "& ROBIN
" (bottom line).
Specify a custom font file for the collection title text (i.e. does not change the font of COLLECTION
). If
Font color to use for the created collection poster's title text (i.e. does not affect the word COLLECTION
).
Font size to use for the created collection poster's title text (i.e. does not affect the word COLLECTION
).
Whether to omit the word COLLECTION
from the created collection poster.
Whether to create the collection poster without the white border. This can be used to create a transparent version of the poster (if the output file is specified as an image that supports transparency like png
or gif
).
An example of a transparent poster is shown below:
Do not apply the gradient overlay to the created collection poster
Genre cards are images that can (currently) only be created by the Mini Maker, and are intended as collection posters for either manual use or with Plex Meta Manager. An example of a genre card, and how they can be showcased in Plex, are shown below:
Specify the input (source) image, and destination genre card filenames, as well as the genre text to use. This is specified as:
$ --genre-card in_image.jpg GENRE_TEXT out_card.jpg
Make the created genre card borderless. This removes the white border, and allows for transparent genre cards such as:
If omitted and a transparent image is provided, a transparent image will NOT be created. A white background is used instead.
NOTE: If using to create transparent genre cards, be sure to specify an output file type that supports transparency (such as
.png
or.gif
).
Do not apply the gradient overlay to the created genre card.
Specify the directory of images to 'batch' create multiple genre cards at once. All image files (ending in jpg
, jpeg
, png
, tiff
, or gif
) under the given directory are used. For each image, the filename is interpreted as the genre text.
For example, with the given directory:
genre_cards
├── Action.jpg
├── Adventure.gif
└── News.png
Using the following command:
$ --genre-card-batch ./genre_cards/
Will create three genre cards with text ACTION
, ADVENTURE
, and NEWS
as text. These cards have -GenreCard
added to their filenames (i.e. Action-GenreCard.jpg
).
The font size scalar to use for genre text. This must be specified as SCALE%
(i.e. 105%
). If unspecified, no scaling (100%
) is used.
Create a ShowSummary for an arbitrary directory. The first argument is the directory to make a summary of (the Maker will search recursively for images, so images can be in any sub-directories). The second argument is the logo file to use at the top of the summary.
An example of using this argument is below:
$ pipenv run python fixer.py --show-summary ./some_directory/ logo_file.png
Color or path to an image to use for the background of the ShowSummary being created with --show-summary. An example of an image summary created with a background image as opposed to a color is shown below:
Custom text (name/username) to use for the created ShowSummary. This is documented in greater detail here.
All season poster options follow the customization options present here.
Create a season poster for the given source image and logo. The first argument is the input poster image, the second the logo to use, and the third is the file to write the season poster to.
Season text to add to the created season poster.
Font file to use for the created season poster.
Font color to use for the created season poster.
Font size to use for the created season poster.
Font kerning to use for the created season poster.
Create this poster with top-placement. If omitted, the poster will be created with bottom-placement.
Do not apply the gradient overlay to the created season poster.