-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Command-Line Interface #30
Comments
Usage proposalnx-editor.exe <action> <input_file> [-f|--flags] FLAGS ActionActions can be defined in the e.g. public class SarcViewModel : ReactiveEditor, ICommandModel
{
// . . .
public Task ICommandModel.ProcessAction(string actionName, Dictionary<char, string> flags)
{
// Could also be automatically
// processed with reflection
return actionName switch {
"Extract" => ExtractFile(flags['k']),
_ => throw new Exception($"Action {actionName} was not found")
};
}
// . . .
} Input FileThe source (input) file used to identify the FlagsAn infinite array of e.g. for SarcViewModel [-k|--key] KEY --key "Some/Sarc/Path" DocumentationGiven the modularity and verbosity of the rest of this system, it would follow that the docs could also be auto-generated from the current state of editors/actions. This might prove difficult with the current proposal, so further discussion should follow once we have a clearer implementation spec. |
Other NotesA CLI-safe abstraction of the This might be possible by just casting to an interface level ( |
This issue is stale because it has been open for 30 days with no activity. |
General discussion and proposals for the CLI (command line interface) implementation.
The text was updated successfully, but these errors were encountered: