Skip to main content

Releases

v52 · e5e2f88

Static site tests now allow keeping a Python requirements.in and requirements.txt file in the top-level of a static site folder.

v51 · cd8d40e

Add a ChiveSorting class and <chives-sort-controls> web component that handle sorting for a collection of items.

v50 · 1a0e9e7

Create a ChivesPagination class and <chives-pagination-nav> web component that handle pagination for a collection of items.

v49 · 675908a

Create a <chives-video> web component that renders an instance of VideoEntity created by chives.media. This standardises video rendering across my static sites.

v48 · 6321762

Start sharing front-end code between my projects.

This release introduces a <chives-image> web component that renders an instance of ImageEntity created by chives.media. This standardises image rendering across my static sites.

This includes all the infrastructure for publishing JavaScript. Subsequent releases will add more front-end code.

v47 · cefb712

Fix a bug in the byte order mark handling in v47. Rather than preserving the UTF-8 byte order mark, discard it entirely.

v46 · 108ddb5

Change the browser fixture to be session-scoped, so the browser only needs to be started once per test suite.

Also, improve the documentation for browser_fixtures.

v45 · 76d0c27

Fix a bug with SRT subtitle files that contain a byte order mark (BOM). Specifically, when converting those files to VTT, the caption number at the start of the SRT would be written to the VTT, and the BOM in the VTT would be in the wrong place.

v44 · c066caf

Improve support for VTT subtitles (which work with the HTML5-native <video> element) rather than SRT:

v43 · e644df5

Use file signatures to improve image format detection in fetch.download_image().

v42 · 4be521a

Remove Playwright testing from StaticSiteTestSuite, and instead provide chives.browser_fixtures to allow individual static sites to build their own test suites.

v41 · e27fae7

In urls.clean_youtube_url(), remove the app=desktop URL query parameter.

v40 · a318488

Add a function text.coloured() for printing text with ANSI escape codes.

v39 · 1308f4a

Remove some debugging code that was left in v38.

v38 · 7452067

Remove the smartypants dependency from chives.text.

v37 · d7cced9

Remove the rapidfuzz dependency from chives.static_site_tests.

v36 · 5a2876d

Fix another dependency issue with chives.static_site_tests.

v35 · 4ffb5ec

Fix an issue where installing chives.static_site_tests without chives.urls would complain about a missing certifi dependency.

v34 · aac4328

Improve the URL-handling in chives.fetch; in particular improve the case where you call fetch_url(url, params) with a URL that already has some query parameters or a fragment.

v33 · 1b2da07

Remove the fetch_image function from chives.fetch; either use fetch_url or download_image.

v32 · 9881a6a

Add a download_image function to chives.fetch.

v31 · ba24dec

Remove the hyperlink dependency.

v30 · 644f388

Add a chives.fetch package which has some helper functions for making HTTP requests using the standard library.

v29 · 6aad8e3

Add a chives.text package which exports a smartify() function for applying SmartyPants-style formatting to a string – adding curly quotes and smart dashes.

v28 · 7386d03

Remove the httpx dependency in chives.urls.

v27 · 48e14d7

Don’t reuse the browser fixture between tests.

v26 · 7870242

Extract the browser fixture as a standalone fixture rather than binding it to a class, so it can be reused across multiple test suites.

v25 · 14b1d8b

Change the type of StaticSiteTestSuite.pages_to_check from set to list to ensure consistent ordering of parametrised tests.

Fix a bug when testing URLs with query parameters.

v24 · d507b13

In StaticSiteTestSuite, add testing with Playwright that checks static websites render correctly.

Breaking change: the site root must now be specified as a classmethod get_site_root() rather than a site_root fixture.

v23 · eecb946

Change the format of VideoEntity.subtitles to be a list of SubtitlesEntity, so a single video can have multiple subtitles.

v22 · 306f294

Remove the start_radio parameter in clean_youtube_url().

v21 · 1902bc3

Add a method dates.now() to return the current time in the timestamp used by all my static sites.

v20 · 8d5fb3a

Use concurrency in test_no_videos_are_av1, which can make it faster for larger media collections.

v19 · 8476cf4

Allow passing both width and height as part of ThumbnailConfig, to constrain a thumbnail to a bounding box.

v18 · 76e9021

Expose get_tint_colour() as a public function from chives.media.

v17 · 281f405

Account for EXIF orientation when getting the width/height of image entities.

v16 · 099b303

Don’t require defining list_tags_in_metadata() in projects that don’t use tags.

v15 · f27bca6

Fix a bunch of lints from ruff; remove an unused dependency.

v14 · e1bc6bf

Improve the error message on failed assertions in StaticSiteTestSuite.

v13 · 165514b

Mark a couple more folders/files as ignored in StaticSiteTestSuite.

v12 · ab7365b

Add checks for fuzzy tag matching to StaticSiteTestSuite.

v11 · bed1321

Add a new class StaticSiteTestSuite which runs my standard set of tests for a static site, e.g. checking every file is saved, checking timestamps use the correct format.

v10 · 3bd0cd7

Add a new is_url_safe() function for checking if a path can be safely used in a URL.

v9 · a9bcefa

This adds three models to chives.media: ImageEntity, VideoEntity, and ImageEntity. These have all the information I need to show an image/video in a web page.

It also includes functions create_image_entity and create_video_entity which construct instances of these models.

v8 · 4298500

Add the is_mastodon_host() function.

v7 · 98013cb

Add the parse_tumblr_post_url() function.

v6 · a67bf25

Add the parse_mastodon_post_url() function.

v5 · 05e6b41

When calling reformat_date(), ensure all dates are converted to UTC.

v4 · 689a15f

Rename chives.timestamps to chives.dates.

v3 · 5f67edc

Add the clean_youtube_url() function and urls extra. Rearrange the package structure slightly, to allow optional dependencies.

v2 · d12e051

Add the is_av1_video() function for detecting AV1-encoded videos.

v1 · 9d6790f

Initial release. Included functions: