Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELIST.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
### WIP (xxxx-xx-xx)

- Add man page output to the command-line programs (gmipf)
- Add a man page for the graphical frontend (gmipf)

### 3.8.2 (2026-07-01)

- Output used configuration path for commandline programs
Expand Down
23 changes: 23 additions & 0 deletions MPF.Avalonia/MPF.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.\" Manual page for the MPF graphical frontend.
.\" This page is maintained by hand. The command-line frontends generate
.\" their own pages with "MPF.CLI man" and "MPF.Check man".
.TH "MPF" "1" "" "" "User Commands"
.SH NAME
MPF \- graphical frontend for various dumping programs
.SH SYNOPSIS
.B MPF
.SH DESCRIPTION
MPF is the graphical component of the Media Preservation Frontend. It
provides a cross-platform interface for dumping optical media with programs
such as Redumper, Aaru, and DiscImageCreator, and for preparing the
resulting submission information.
.PP
The program is operated through its graphical interface. For scripted or
headless use, the command-line frontends provide the same dumping and
validation workflows.
.SH SEE ALSO
.BR MPF.CLI (1),
.BR MPF.Check (1)
.PP
Full documentation and source are available at
https://github.com/SabreTools/MPF
30 changes: 26 additions & 4 deletions MPF.CLI/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,18 @@
{
public static void Main(string[] args)
{
// Create the command set
var mainFeature = new MainFeature();
var commandSet = CreateCommands(mainFeature);

// The man page is rendered purely from the command model, so emit it
// before the configuration path and other startup output to keep the roff clean
if (args is not null && args.Length > 0 && commandSet.GetTopLevel(args[0]) is Manpage manpage)
{
manpage.ProcessArgs(args, 0, commandSet);
return;
}

// Load options from the config file
var options = OptionsLoader.LoadFromConfig(out string? configPath);

Expand All @@ -34,10 +46,6 @@
return;
}

// Create the command set
var mainFeature = new MainFeature();
var commandSet = CreateCommands(mainFeature);

// If we have no args, show the help and quit
if (args is null || args.Length == 0)
{
Expand Down Expand Up @@ -151,6 +159,7 @@

// Standalone Options
commandSet.Add(new Help());
commandSet.Add(new Manpage(CreateManpageInfo()));
commandSet.Add(new VersionFeature());
commandSet.Add(new ListCodesFeature());
commandSet.Add(new ListConfigFeature());
Expand All @@ -171,5 +180,18 @@

return commandSet;
}

/// <summary>
/// Create the man page metadata for the program
/// </summary>
private static ManpageInfo CreateManpageInfo()

Check failure on line 187 in MPF.CLI/Program.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'ManpageInfo' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 187 in MPF.CLI/Program.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'ManpageInfo' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 187 in MPF.CLI/Program.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'ManpageInfo' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 187 in MPF.CLI/Program.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'ManpageInfo' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 187 in MPF.CLI/Program.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'ManpageInfo' could not be found (are you missing a using directive or an assembly reference?)
{
return new ManpageInfo("MPF.CLI")
{
Version = FrontendTool.GetCurrentVersion(),
Title = "User Commands",
Description = "CLI frontend for various dumping programs",
};
}
}
}
15 changes: 15 additions & 0 deletions MPF.Check/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
{
// Standalone Options
case Help: BaseFeature.DisplayHelp(); return;
case Manpage manpage: manpage.ProcessArgs(args, 0, commandSet); return;
case VersionFeature version: version.Execute(); return;
case ListCodesFeature lc: lc.Execute(); return;
case ListConfigFeature lc: lc.Execute(); return;
Expand Down Expand Up @@ -133,6 +134,7 @@

// Standalone Options
commandSet.Add(new Help());
commandSet.Add(new Manpage(CreateManpageInfo()));
commandSet.Add(new VersionFeature());
commandSet.Add(new ListCodesFeature());
commandSet.Add(new ListConfigFeature());
Expand Down Expand Up @@ -167,5 +169,18 @@

return commandSet;
}

/// <summary>
/// Create the man page metadata for the program
/// </summary>
private static ManpageInfo CreateManpageInfo()

Check failure on line 176 in MPF.Check/Program.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'ManpageInfo' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 176 in MPF.Check/Program.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'ManpageInfo' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 176 in MPF.Check/Program.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'ManpageInfo' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 176 in MPF.Check/Program.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'ManpageInfo' could not be found (are you missing a using directive or an assembly reference?)

Check failure on line 176 in MPF.Check/Program.cs

View workflow job for this annotation

GitHub Actions / build

The type or namespace name 'ManpageInfo' could not be found (are you missing a using directive or an assembly reference?)
{
return new ManpageInfo("MPF.Check")
{
Version = FrontendTool.GetCurrentVersion(),
Title = "User Commands",
Description = "Validator for various dumping programs",
};
}
}
}