Skip to content
Merged
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
2 changes: 2 additions & 0 deletions CHANGELIST.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
- Fix two recent media information window render issues
- Modify link to new dreamdump release 0.4.0 (MoriGM)
- Slight wording tweaks for commandline interactive modes
- Add man page output to the command-line programs (gmipf)
- Add a man page for the graphical frontend (gmipf)

### 3.8.3 (2026-07-06)

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.
Comment thread
mnadareski marked this conversation as resolved.
.\" 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 class Program
{
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
Comment thread
mnadareski marked this conversation as resolved.
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 @@ public static void Main(string[] args)
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 @@ private static CommandSet CreateCommands(MainFeature mainFeature)

// 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 @@ private static CommandSet CreateCommands(MainFeature mainFeature)

return commandSet;
}

/// <summary>
/// Create the man page metadata for the program
/// </summary>
private static ManpageInfo CreateManpageInfo()
{
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 @@ public static void Main(string[] args)
{
// 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 @@ private static CommandSet CreateCommands(MainFeature mainFeature)

// 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 @@ -178,5 +180,18 @@ private static CommandSet CreateCommands(MainFeature mainFeature)

return commandSet;
}

/// <summary>
/// Create the man page metadata for the program
/// </summary>
private static ManpageInfo CreateManpageInfo()
{
return new ManpageInfo("MPF.Check")
{
Version = FrontendTool.GetCurrentVersion(),
Title = "User Commands",
Description = "Validator for various dumping programs",
};
}
}
}