Changelog¶
Upcoming Changes¶
Miscellaneous¶
Reorder fonts in
FontFamily.universal_fonts()andCompuGlobalAPIConfig.allowed_fontsto match the order used by the API.Change
OverlayFormat.normalise()from class method to static method.
0.4.2¶
Miscellaneous¶
OverlayFormatchanged from dataclass to pydantic model for easier serialization and validation
0.4.1¶
Added¶
Optional default format to
AsyncCompuGlobalAPIconstructor, for easier configuration of default preferencesTimecode property for Subtitle model
Subtitle.timecodeValidation for allowed fonts in each API, if an invalid font is used, its replaced by
FontFamily.IMPACTValidation for font_size in
OverlayFormatensuring its 0-120
0.4.0¶
Breaking Changes¶
Many model methods have been changed to be properties, see the following section for a full list
- Comic/Gif methods now support overriding (
OverlayFormat) instead of onlyFontFamily:
- Comic/Gif methods now support overriding (
Timestamp helper method get_readable_timestamp() renamed to
Timestamp.get_timecode()FontColorRGB class renamed to
FontColor
# Before
frinkiac.get_gif_url(screencap, font_family=FontFamily.JOST)
# After
overlay_format = OverlayFormat(font_family=FontFamily.JOST)
frinkiac.get_gif_url(screencap, overlay_format=overlay_format)
Added¶
- Added some useful properties to models:
Screencap:
Screencap.key,Screencap.timestamp,Screencap.timecode,Screencap.duration,Screencap.start,Screencap.end,Screencap.caption,Screencap.captionsScreencapMoment:
ScreencapMoment.key,ScreencapMoment.timecodeFrame:
Frame.timecodeSubtitle:
Subtitle.durationStream:
Stream.caption,Stream.encodedComicPanel:
ComicPanel.encodedComicStrip:
ComicStrip.encoded
OverlayFormatfor defining format preferences to use in overlays- Optional argument for overriding overlay formatting, overlay_formats:
This enables overriding font, color, size, uppercase/lowercase in all overlays.
These can override all overlays in the entire gif/comic, or you can specify different formats for each overlay by providing a list.
See
OverlayFormat.normalise()for more details on how formats are resolved.
- Methods for gif/comic maker urls, these urls take you straight to the website to edit there:
- Logging throughout the library for:
API requests/responses
Endpoint validation
Non-default behaviour (subtitles/overlay formats overrides)
0.3.8¶
Added¶
Timestamphelper class for handling timestamps
0.3.7¶
Added¶
- Optional season filters, season_minimum, and season_maximum for the following methods:
Miscellaneous¶
Add support for optional query parameters with validation
0.3.6¶
Breaking Changes¶
All instances of
AsyncCompuGlobalAPInow always requireaiohttp.ClientSessionSearch methods
AsyncCompuGlobalAPI.search()andAsyncCompuGlobalAPI.search_for_screencap()now return lists containingFrameResultinstead ofFrameRename
NoSearchResultsFoundtoNoSearchResultsFoundError
Added¶
FrameResultmodel for search resultsBaseCompuGlobalModelas parent for all models with desired serialization/validation behaviour
Fixed¶
Custom subtitles not being applied for comic panels
Font color length validation
Subtitle duration calculation
Extra slash (/) in gif url
Miscellaneous¶
Add unit tests for all models and API calls
Add integration tests with real APIs
Apply ruff rules to entire project
0.3.5¶
Added¶
Subtitle.get_duration()for getting Subtitle duration
Fixed¶
Incorrect path param using in
AsyncCompuGlobalAPI.get_frames()Custom subtitles not being used in comics/gifs
0.3.4¶
Fixed¶
Incorrect frames used in
ComicStripMissing field alias in
EpisodeSummary
0.3.3¶
Fixed¶
Missing panels in
ComicStrip
0.3.2¶
Added¶
- Methods for missing API endpoints:
- Methods for getting caption as a string:
StreamOverlay.get_caption()Screencap.get_caption()
- Methods for building models from a
Screencapdirectly:
- Methods for building models from a
Fixed¶
Missing panels in
ComicStrip
0.3.1¶
Breaking Changes¶
Made all models immutable
Added¶
All models to compuglobal import scope
0.3.0¶
Breaking Changes¶
These changes are to accommodate the extensive update to the APIs with new features:
All synchronous implementations of the package have been removed
The async endpoints persist and are now accessible via
compuglobalorcompuglobal.aioas done previouslyThe Master Of All Science API appears to be unavailable at this point in time and redirects to Frinkiac, I have added a deprecation warning to this API and it will remain unless the API returns
The package now requires Python 3.13+
- Image, comic, and gif generation are all now performed using the API rather than from a Screencap:
# This is now async
simpsons = compuglobal.Frinkiac()
# Previous usage
await screencap.get_gif_url()
# New usage
await simpsons.get_gif_url(screencap)
Added¶
- Endpoints for comic panels/strips:
- Models for comics:
Default font for APIs to use in text Overlays
Miscellaneous¶
Moved fonts to its own module
Added default values to
Stream