Skip to content

Commit

Permalink
Merge pull request #8 from kodybrown/develop
Browse files Browse the repository at this point in the history
update master
  • Loading branch information
kodybrown authored Sep 1, 2019
2 parents 7d745c3 + 9d09a7b commit ecf8d66
Show file tree
Hide file tree
Showing 21 changed files with 1,231 additions and 923 deletions.
366 changes: 337 additions & 29 deletions .gitignore

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions App.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
</startup>
</configuration>
40 changes: 20 additions & 20 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
The MIT License (MIT)

Copyright (c) 2014 Kody Brown

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The MIT License (MIT)
Copyright (c) 2014 Kody Brown
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
72 changes: 36 additions & 36 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("sortxml")]
[assembly: AssemblyDescription("sort xml files")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("sortxml")]
[assembly: AssemblyCopyright("Copyright (C) 2014 @wasatchwizard")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c56283ba-afbb-4b4c-b8be-2018bb239370")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("sortxml")]
[assembly: AssemblyDescription("sort xml files")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("sortxml")]
[assembly: AssemblyCopyright("Copyright (C) 2014 @wasatchwizard")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("c56283ba-afbb-4b4c-b8be-2018bb239370")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
110 changes: 55 additions & 55 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
sortxml
=======

This is a very simple utility that prettifies and sorts xml files.
It uses the Microsoft XML .NET namespace.

Copyright 2014 Kody Brown (@wasatchwizard)

USAGE: sortxml.exe [options] infile [outfile]

infile The name of the file to sort, etc.

outfile The name of the file to save the output to.
If outfile is omitted, the output is written to stdout,
unless `--overwrite` is specified, in which case the
output is written back to infile, overwriting it.

OPTIONS:

/p --pause Pauses when finished.

--pretty Ignores the input format and makes the output look nice.
This is the default.

/s --sort Sort both the nodes and attributes.
--sort-node Sort the nodes.
--sort-attr Sort the attributes.
If a sort is specified, '--pretty' is assumed.
If a sort is NOT is specified, both nodes and attributes
will be sorted.

/i --case-insensitive
Sorts node and attributes without regard to letter case.
!i --case-sensitive
Sorts node and attributes case-sensitively.
If neither option is specified, uses case-sensitive sort.

--overwrite Writes back to the infile.
Only used if outfile is not specified.

Prefix an option with '!' to turn it off.
The '!' can be applied with or without one of the other prefixes.
The '/' and '--' prefixes are interchangable.

The default is to output pretty and sorted nodes and attributes:

> type sample.xml
<?xml version="1.0" encoding="utf-8" ?><root><node value="one" attr="name"/><node2 attr="name" value="two" /></root>

> sortxml.exe sample.xml
<?xml version="1.0" encoding="utf-8"?>
<root>
<node attr="name" value="one" />
<node2 attr="name" value="two" />
</root>
sortxml
=======

This is a very simple utility that prettifies and sorts xml files.
It uses the Microsoft XML .NET namespace.

Copyright 2014 Kody Brown (@wasatchwizard)

USAGE: sortxml.exe [options] infile [outfile]

infile The name of the file to sort, etc.

outfile The name of the file to save the output to.
If outfile is omitted, the output is written to stdout,
unless `--overwrite` is specified, in which case the
output is written back to infile, overwriting it.

OPTIONS:

/p --pause Pauses when finished.

--pretty Ignores the input format and makes the output look nice.
This is the default.

/s --sort Sort both the nodes and attributes.
--sort-node Sort the nodes.
--sort-attr Sort the attributes.
If a sort is specified, '--pretty' is assumed.
If a sort is NOT is specified, both nodes and attributes
will be sorted.

/i --case-insensitive
Sorts node and attributes without regard to letter case.
!i --case-sensitive
Sorts node and attributes case-sensitively.
If neither option is specified, uses case-sensitive sort.

--overwrite Writes back to the infile.
Only used if outfile is not specified.

Prefix an option with '!' to turn it off.
The '!' can be applied with or without one of the other prefixes.
The '/' and '--' prefixes are interchangable.

The default is to output pretty and sorted nodes and attributes:

> type sample.xml
<?xml version="1.0" encoding="utf-8" ?><root><node value="one" attr="name"/><node2 attr="name" value="two" /></root>

> sortxml.exe sample.xml
<?xml version="1.0" encoding="utf-8"?>
<root>
<node attr="name" value="one" />
<node2 attr="name" value="two" />
</root>
44 changes: 22 additions & 22 deletions sortxml.sln
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30110.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sortxml", "sortxml.csproj", "{F015ED1D-89EF-4251-9788-D581536501F2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F015ED1D-89EF-4251-9788-D581536501F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F015ED1D-89EF-4251-9788-D581536501F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F015ED1D-89EF-4251-9788-D581536501F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F015ED1D-89EF-4251-9788-D581536501F2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30110.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "sortxml", "sortxml.csproj", "{F015ED1D-89EF-4251-9788-D581536501F2}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{F015ED1D-89EF-4251-9788-D581536501F2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{F015ED1D-89EF-4251-9788-D581536501F2}.Debug|Any CPU.Build.0 = Debug|Any CPU
{F015ED1D-89EF-4251-9788-D581536501F2}.Release|Any CPU.ActiveCfg = Release|Any CPU
{F015ED1D-89EF-4251-9788-D581536501F2}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
2 changes: 1 addition & 1 deletion tests/b.xml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<?xml version="1.0"?>
<?xml version="1.0"?>
<UserSettings><ApplicationIdentity version="12.0"/><ToolsOptions><ToolsOptionsCategory name="Environment" RegisteredName="Environment"/></ToolsOptions><Category name="Environment_Group" RegisteredName="Environment_Group"><Category name="Environment_FontsAndColors" Category="{1EDA5DD4-927A-43a7-810E-7FD247D0DA1D}" Package="{DA9FB551-C724-11d0-AE1F-00A0C90FFFC3}" RegisteredName="Environment_FontsAndColors" PackageName="Visual Studio Environment Package"><PropertyValue name="Version">2</PropertyValue><FontsAndColors Version="2.0"><Theme Id="{A4D6A176-B948-4B29-8C66-53C97A1ED7D0}"/><Categories><Category GUID="{58E96763-1D3B-4E05-B6BA-FF7115FD0B7B}" FontName="Consolas" FontSize="11" CharSet="1" FontIsDefault="No"><Items/></Category><Category GUID="{75A05685-00A8-4DED-BAE5-E7A50BFA929A}" FontName="Consolas" FontSize="11" CharSet="1" FontIsDefault="No"><Items/></Category><Category GUID="{B0E6A221-92FD-4D72-BE80-04A36B591FCB}" FontSize="0" CharSet="0" FontIsDefault="No"><Items><Item Name="VSC.Output.Text" Foreground="0x00999999" Background="0x00000001"/><Item Name="VSC.Output.Information" Foreground="0x005D3B09" Background="0x00000001"/><Item Name="VSC.Output.Warning" Foreground="0x00005D66" Background="0x00000001"/><Item Name="VSC.Output.Error" Foreground="0x00000966" Background="0x00000001"/><Item Name="VSC.BuildOutput.BuildSummary" Foreground="0x00194D19" Background="0x00000001"/><Item Name="VSC.BuildOutput.BuildSummary.Success" Foreground="0x00194D19" Background="0x00000001"/><Item Name="VSC.BuildOutput.BuildSummary.Failed" Foreground="0x00000966" Background="0x00000001"/><Item Name="VSC.BuildOutput.BuildSummary.Total" Foreground="0x00194D19" Background="0x00000001"/><Item Name="VSC.BuildOutput.CodeContracts.Information" Foreground="0x00999999" Background="0x00000001"/><Item Name="VSC.BuildOutput.ProjectBuildStart" Foreground="0x00194D19" Background="0x00000001"/><Item Name="VSC.BuildOutput.ProjectBuildSkipped" Foreground="0x00727272" Background="0x00000001"/><Item Name="VSC.TfsOutput.Error" Foreground="0x00000966" Background="0x00000001"/><Item Name="VSC.TfsOutput.Warning" Foreground="0x00005D66" Background="0x00000001"/><Item Name="VSC.TfsOutput.Success" Foreground="0x00194D19" Background="0x00000001"/><Item Name="VSC.FindResultsOutput.Match" Foreground="0x005D3B09" Background="0x003AFFFF" BoldFont="Yes"/></Items></Category><Category GUID="{B36B0228-DBAD-4DB0-B9C7-2AD3E572010F}" FontName="Segoe UI" FontSize="9" CharSet="1" FontIsDefault="No"><Items><Item Name="Different content" Foreground="0x000014E5" Background="0x00FFFFFF" BoldFont="No"/><Item Name="Identical content" Foreground="0x00000000" Background="0x00FFFFFF" BoldFont="No"/><Item Name="Source Only" Foreground="0x00000000" Background="0x00FFFFFF" BoldFont="No"/><Item Name="Target Only" Foreground="0x00000000" Background="0x00FFFFFF" BoldFont="No"/><Item Name="Not Downloaded" Foreground="0x006D6D6D" Background="0x00FFFFFF" BoldFont="No"/><Item Name="Even Row Items" Foreground="0x00000000" Background="0x00FFFFFF" BoldFont="No"/><Item Name="Odd Row Items" Foreground="0x00000000" Background="0x00FFFFFF" BoldFont="No"/></Items></Category><Category GUID="{E0187991-B458-4F7E-8CA9-42C9A573B56C}" FontName="Consolas" FontSize="11" CharSet="1" FontIsDefault="No"><Items/></Category><Category GUID="{FF349800-EA43-46C1-8C98-878E78F46501}" FontName="Consolas" FontSize="11" CharSet="1" FontIsDefault="No"><Items/></Category></Categories></FontsAndColors></Category></Category></UserSettings>
Loading

0 comments on commit ecf8d66

Please sign in to comment.