Skip to content
GitLab
Menu
Why GitLab
Pricing
Contact Sales
Explore
Why GitLab
Pricing
Contact Sales
Explore
Sign in
Get free trial
Primary navigation
Search or go to…
Project
T
TiledToOrx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Privacy statement
Keyboard shortcuts
?
What's new
4
Snippets
Groups
Projects
Show more breadcrumbs
Sausage
TiledToOrx
Commits
de9a1f70
Commit
de9a1f70
authored
5 years ago
by
John Cheesman
Browse files
Options
Downloads
Patches
Plain Diff
Add command line utils
parent
30fc6319
No related branches found
No related tags found
1 merge request
!1
Add CLI
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
TiledToOrx.CLI/Program.cs
+21
-2
21 additions, 2 deletions
TiledToOrx.CLI/Program.cs
TiledToOrx.CLI/TiledToOrx.CLI.csproj
+4
-0
4 additions, 0 deletions
TiledToOrx.CLI/TiledToOrx.CLI.csproj
with
25 additions
and
2 deletions
TiledToOrx.CLI/Program.cs
+
21
−
2
View file @
de9a1f70
using
System
;
using
System.Text
;
using
TiledToOrx.Core
;
using
Microsoft.Extensions.CommandLineUtils
;
namespace
TiledToOrx.CLI
{
...
...
@@ -8,7 +9,25 @@ namespace TiledToOrx.CLI
{
static
void
Main
(
string
[]
args
)
{
var
fileName
=
args
[
0
];
var
app
=
new
CommandLineApplication
();
app
.
Name
=
"TiledToOrx"
;
app
.
Description
=
"Convert TMX files to Orx config data"
;
app
.
HelpOption
(
"-?|-h|--help"
);
var
fileName
=
app
.
Option
(
"-f|--fileName<optionvalue>"
,
""
,
CommandOptionType
.
SingleValue
);
app
.
OnExecute
(()
=>
{
Console
.
WriteLine
(
fileName
);
return
0
;
});
app
.
Execute
(
args
);
/* var fileName = args[0];
StringBuilder sb = new StringBuilder();
...
...
@@ -16,7 +35,7 @@ namespace TiledToOrx.CLI
engine.Convert(fileName, sb, false, 0);
Console
.
WriteLine
(
sb
.
ToString
());
Console.WriteLine(sb.ToString());
*/
}
}
}
This diff is collapsed.
Click to expand it.
TiledToOrx.CLI/TiledToOrx.CLI.csproj
+
4
−
0
View file @
de9a1f70
...
...
@@ -4,6 +4,10 @@
<ProjectReference Include="..\TiledToOrx.Core\TiledToOrx.Core.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.CommandLineUtils" Version="1.1.1" />
</ItemGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.0</TargetFramework>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment