import command stub

This commit is contained in:
Jindra Petřík
2024-01-21 13:56:34 +01:00
parent f376e89a7d
commit 215dcc4c3d
2 changed files with 82 additions and 1 deletions

View File

@@ -0,0 +1,80 @@
package com.jpexs.decompiler.flash.cli.commands;
import com.jpexs.decompiler.flash.cli.VersionProvider;
import com.jpexs.decompiler.flash.cli.commands.types.CompressionKind;
import com.jpexs.decompiler.flash.cli.commands.types.ImportObject;
import com.jpexs.decompiler.flash.cli.commands.types.ReplaceFormat;
import java.util.List;
import picocli.CommandLine;
import picocli.CommandLine.Command;
import picocli.CommandLine.Option;
import picocli.CommandLine.Parameters;
import picocli.CommandLine.ParentCommand;
import picocli.CommandLine.ArgGroup;
/**
*
* @author JPEXS
*/
@Command(
name = "import",
mixinStandardHelpOptions = true,
versionProvider = VersionProvider.class,
header = "Bulk import items to the SWF",
optionListHeading = "%n@|bold,underline Options|@:%n",
parameterListHeading = "%n@|bold,underline Parameters|@:%n",
synopsisHeading = "@|bold,underline Usage|@:",
footerHeading = "%n@|bold,underline Examples|@:%n",
footer = {
"ffdec-cli import sound input.swf output.swf c:/sounds/",
"ffdec-cli import --update-bounds shape input.swf output.swf c:/shapes/",
"ffdec-cli import symbolclass input.swf output.swf c:/data/sc.csv",
},
sortSynopsis = false
)
public class Import implements Runnable {
@Parameters(
index = "0",
paramLabel = "<itemKind>",
description = {
"Item kind to import.",
"@|bold Enum values|@: ${COMPLETION-CANDIDATES}"
}
)
ImportObject itemKind;
@Parameters(
index = "1",
paramLabel = "IN_FILE",
description = "Input file"
)
String inFile;
@Parameters(
index = "2",
paramLabel = "OUT_FILE",
description = "Output file"
)
String outFile;
@Parameters(
index = "3",
paramLabel = "DATA_DIR",
description = "Data directory containing imported items. For symbolclass item kind, it is a file instead of directory."
)
String dataDirectory;
@Option(
names = "--update-bounds",
description = "For shape import: Update shape bounds (no fill)",
order = 1
)
boolean updateShapeBounds;
@Override
public void run() {
}
}

View File

@@ -51,7 +51,8 @@ import picocli.CommandLine.ScopeType;
ReplaceCharacter.class,
ReplaceCharacterId.class,
Remove.class,
RemoveCharacter.class
RemoveCharacter.class,
Import.class
},
descriptionHeading = "%n@|bold,underline Description|@:%n",
optionListHeading = "%n@|bold,underline Options|@:%n",