-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Filter Reconciled Files with Regular Expression
* Add regex filter options * Add regex filter implmentation * Run CI for all branches * Document -l & -L options * Refactor Entries * Move regex filter to framework and add filesystem option * Update readme for regex filter * Update future plans * Simplify reconciliation handler & entries and file system * Refactor console & add tests * Fix typo in readme * Ensure command line options are validated before they're used * Don't pass unrequired command line args to ReconciliationHandler * Do not pass command line arguments to ReconciliationHandler * Add XUnit analyser to all test projects * Add Sonar analyser all projects * Control structures should use curly braces (S121) * Fix markdown tabs * Fix tabs in Readme * Add laguage to code blocks * Fix line loosness * Fix tabs in markdown * Further markdown fixes * Set code block language * Code quality fixes * Add code quality badge and links * Update forthcoming features * Add license badge * Add release badge * Fix example code blocks * Fix publish paths and ignore output * Readme improvements
- Loading branch information
Showing
37 changed files
with
626 additions
and
331 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
src/Elzik.Mecon.Console/CommandLine/Reconciliation/IReconciliationHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
using Microsoft.Extensions.Configuration; | ||
|
||
namespace Elzik.Mecon.Console.CommandLine.Reconciliation; | ||
|
||
public interface IReconciliationHandler | ||
{ | ||
void Handle(IConfigurationBuilder configurationBuilder, ReconciliationOptions reconciliationOptions); | ||
} |
16 changes: 9 additions & 7 deletions
16
src/Elzik.Mecon.Console/Entries.cs → .../Reconciliation/MediaEntriesExtensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 26 additions & 14 deletions
40
src/Elzik.Mecon.Console/CommandLine/Reconciliation/ReconciliationHandler.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
...on.Console/Configuration/Configuration.cs → src/Elzik.Mecon.Console/Configuration.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,23 @@ | ||
using CommandLine; | ||
using Elzik.Mecon.Console.CommandLine; | ||
using Elzik.Mecon.Console; | ||
using Elzik.Mecon.Console.CommandLine.Config; | ||
using Elzik.Mecon.Console.CommandLine.Error; | ||
using Elzik.Mecon.Console.CommandLine.Reconciliation; | ||
using Elzik.Mecon.Console.Configuration; | ||
|
||
var config = Configuration.Get(); | ||
using Microsoft.Extensions.DependencyInjection; | ||
|
||
var commandParser = new Parser(setting => | ||
{ | ||
setting.CaseInsensitiveEnumValues = true; | ||
}); | ||
|
||
var parserResult = commandParser.ParseArguments<ReconciliationOptions, ConfigOptions>(args); | ||
|
||
parserResult | ||
.WithParsed<ReconciliationOptions>(options => ReconciliationHandler.Handle(config, options)) | ||
.WithParsed<ConfigOptions>(_ => ConfigHandler.Display(config)) | ||
.WithParsed<ReconciliationOptions>(options => | ||
{ | ||
var config = Configuration.Get(args); | ||
var services = Services.Get(config); | ||
var reconciliationHandler = services.GetRequiredService<IReconciliationHandler>(); | ||
reconciliationHandler.Handle(config, options); | ||
}) | ||
.WithParsed<ConfigOptions>(_ => ConfigHandler.Display(Configuration.Get(args))) | ||
.WithNotParsed(errors => ErrorHandler.Display(parserResult, errors)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,14 @@ | ||
using System.Collections.Generic; | ||
using System.Threading.Tasks; | ||
using Elzik.Mecon.Framework.Domain; | ||
using Elzik.Mecon.Framework.Infrastructure.FileSystem; | ||
|
||
namespace Elzik.Mecon.Framework.Application | ||
{ | ||
public interface IReconciledMedia | ||
{ | ||
Task<IEnumerable<MediaEntry>> GetMediaEntries(string directoryDefinitionName); | ||
|
||
Task<IEnumerable<MediaEntry>> GetMediaEntries( | ||
string directoryPath, | ||
IEnumerable<string> supportedFileExtensions, | ||
bool recurse, | ||
IEnumerable<MediaType> mediaTypes); | ||
Task<IEnumerable<MediaEntry>> GetMediaEntries(DirectoryDefinition directoryDefinition); | ||
} | ||
} |
Oops, something went wrong.