Abstract base class for subcommands that output to a file (or stdout).
FileOutputSubcommand
Abstract subcommand to output applications as some type of file.
after_write_file
file_contents
Subtypes must override this to return the contents of the output file for the given doc.
filename_from_route
files_arg
Returns a positional arg for files to specify file inputs to the command.
files
Subclasses should include this to their class args.
args
Example
class Foo(FileOutputSubcommand): args = ( FileOutputSubcommand.files_arg("FOO"), # more args for Foo ) + FileOutputSubcommand.other_args()
invoke
other_args
Return args for -o / --output to specify where output should be written, and for a --args to pass on any additional command line args to the subcommand.
-o
--output
--args
Subclasses should append these to their class args.
write_file