case studies

UnGathered Checks Article Images and Photo Credit Lines

A missing image is often obvious in the browser. A missing credit line can be much easier to overlook, especially when the article itself reads well and the photo has already been selected. The publishing example gives both expectations a place in a local collection rule, before treating a folder of article assets as ready.

The generated collection has two Markdown articles, cafe.md and harbor.md. The manifest selects articles/*.md, expects an image at images/{stem}.jpg and looks for a Photo credit: line followed by text inside each article. Cafe has both. Harbor has neither. One recorded scan by a downloaded UnGathered 0.1.0 binary on Linux x86_64 produces four checks: two present requirements, a missing image and a content_mismatch for the credit rule. There is one complete item, two gaps and no operational errors. The command exits 1.

Cafe has its matching image and credit line, while harbor is missing its image and fails the declared credit-text check

The naming relationship is explicit. The anchor articles/harbor.md yields the stem harbor, which expands the image requirement to images/harbor.jpg. The content rule checks the article itself through {item}. This is useful when a team keeps a stable filename convention and wants the same small checklist applied before a batch of articles moves further through its publishing process.

The regex is deliberately limited to the convention in this example. It checks a line beginning with Photo credit:, ignoring case, followed by a non-whitespace character. It does not parse frontmatter, follow a featured-image URL, establish a photograph’s ownership or determine whether the attribution is adequate. A line inside a code example could satisfy that literal regex too, so a publishing workflow with more complex Markdown would need a more precise validator or a different representation of its requirements.

The article and image files here are generated fixtures; the .jpg contains placeholder bytes. Minimum size is not image decoding. Those boundaries keep the example honest about the first release: it checks declared local relationships and simple content conditions, without claiming to validate an entire publishing system.

The quick start explains the rule variables, and the recorded scan explorer shows every check from this run. The manifest is included in each archive as examples/publishing.json. Original reports and source-preservation checks are in the release evidence. A stable local convention is enough to make these gaps visible; an unwritten expectation still needs to become a rule.