Repository navigation
Development
How the two packages are built, tested and released. The maintainer's working notes are in the repository: AGENTS.md for the rules, and ai-docs/ (start with ai-docs/HANDOFF.md) for the plan, decisions and logs.
| Path | What it is |
|---|---|
src/TrailerClipperLib/ |
the library (package TrailerClipper): TrailerClipper, TrailerClipperManager (per-file work), MediaEngine.cs (the FFMpegCore calls behind an internal interface), FFmpegLocator, ClipperCommandLineInterpreter, TrailerClipperOptions, and help.txt
|
src/TrailerClipper.Tool/ |
the tclipper tool: Program.cs and FFmpegInstaller.cs
|
tests/TrailerClipperLib.Tests/ |
NUnit tests: the golden replay, unit tests with a fake engine, the review's tests, and the 1.1.0 public API list |
tests/Golden/ |
the recording of the published 1.1.0 (1.1.0.json), the capture program that made it, and its WAV and MP3 fixtures; never edited |
You need the .NET SDK named in global.json (10.0.401 at the time of writing) and ffmpeg with ffprobe for the tests that clip real files.
dotnet restore --locked-mode
dotnet format --verify-no-changes
dotnet build -c Release
dotnet test -c Release
dotnet pack -c Release -o artifactsdotnet test runs net10.0 everywhere and net48 on Windows (net48 exercises the netstandard2.0 build). On 2026-09-30 a copy of master at 18522a4 passed 193 of 193 tests on each framework on Windows 11 with ffmpeg 9.0.1, in about 6 seconds each.
Lock files are committed; after changing a package reference, run dotnet restore and commit them. src/TrailerClipperLib/help.txt keeps 1.1.0's bytes (a byte order mark and CRLF line endings) and is marked -text in .gitattributes; every other file is LF.
2.x gives 1.1.0's answers for every call in tests/Golden/1.1.0.json, except the differences the CHANGELOG names (E1 to E11). GoldenTests.cs replays the recording against the current code and holds the allowed differences as a table; a change that alters another answer fails the build. When it fails, fix src/; never re-record. The capture program runs on .NET Framework 4.8, where 1.1.0's clipper works (Versions and upgrading).
ci.yml runs on every push to master and every pull request, on Ubuntu 24.04, Windows and macOS. It does a locked restore, the format check, a Release build with analyzers as errors, and a NuGet audit that fails on any advisory. Then it runs the tests (net10.0, plus net48 on Windows) and packs both packages. On Linux it checks that the library package holds exactly its README and the two builds' DLL and XML files. On every system it installs the packed tool and clips a file with it. ffmpeg comes from BtbN's 9.0 builds (checked against their checksums) on Linux, Homebrew on macOS and Chocolatey on Windows. Actions are pinned to commit SHAs, and Dependabot proposes updates weekly.
- Update
CHANGELOG.mdwith a dated heading, and set the same<Version>in both project files. - Merge, and wait for
cito pass onmaster. - Tag
v<version>on that commit and push the tag. -
release.ymlchecks the tag against both versions, builds, tests, packs, attests, and waits for the maintainer's approval in thenugetenvironment, then pushes both packages to nuget.org through Trusted Publishing (no stored API key) and creates the GitHub release. - Run
verify-published.ymlwith the version: it installs both packages from nuget.org on Linux, macOS and Windows and checks them.
2.0.0 went this way on 2026-09-27, after a rehearsal as 2.0.0-beta.1.
The wiki is a separate git repository (TrailerClipperLib.wiki.git). Its examples come from a program that installs the published packages and prints every output the pages show; the program, its saved outputs and the steps to update the wiki for a new release are in the repository's ai-docs/notes/ (the notes dated 2026-09-30).
This wiki describes TrailerClipper and TrailerClipper.Tool 2.0.0 and was last updated on 2026-09-30. Both packages are MIT licensed. Report problems in the issues. On NuGet: TrailerClipper and TrailerClipper.Tool.
Using it
- Getting started
- Commands
- Configuration
- How files are clipped
- Errors and edge cases
- API reference
- Recipes
- FAQ
The releases
Contributing
Elsewhere