diff --git a/.gitignore b/.gitignore index e0d2caa..ba9b4a6 100644 --- a/.gitignore +++ b/.gitignore @@ -452,6 +452,8 @@ $RECYCLE.BIN/ !.vscode/tasks.json !.vscode/launch.json !.vscode/extensions.json +!Instance/.vscode/appsettings.example.json +!Rename/.vscode/appsettings.example.json #VSCode Settings => mklink /J "VSCode Settings" "C:\Users\phares\AppData\Roaming\Code\User" globalStorage/ @@ -460,5 +462,4 @@ globalStorage/ #Auto Gen Code from Code-Generator *.gen - [Ll]ib/ \ No newline at end of file diff --git a/Instance/.vscode/appsettings.example.json b/Instance/.vscode/appsettings.example.json new file mode 100644 index 0000000..2554eba --- /dev/null +++ b/Instance/.vscode/appsettings.example.json @@ -0,0 +1,292 @@ +{ + "_Application": "Instance", + "_UserSecretsId": "2999dda1-5329-4d9f-9d68-cccfabe0e47f", + "Company": "Mike Phares", + "Linux": {}, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Log4netProvider": "Debug", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "MaxDegreeOfParallelism": 12, + "Serilog": { + "Using": [ + "Serilog.Sinks.Console", + "Serilog.Sinks.File" + ], + "MinimumLevel": "Debug", + "WriteTo": [ + { + "Name": "Debug", + "Args": { + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}" + } + }, + { + "Name": "Console", + "Args": { + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "%workingDirectory% - Log/log-.txt", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}", + "rollingInterval": "Hour" + } + } + ], + "Enrich": [ + "FromLogContext", + "WithMachineName", + "WithThreadId" + ], + "Properties": { + "Application": "Sample" + } + }, + "Windows": { + "Configuration": { + "CheckDFaceAndUpWriteDates": false, + "CheckJsonForDistanceResults": false, + "CopyFacesAndSaveFaceLandmarkForOutputResolutions": [], + "CrossDirectoryMaxItemsInDistanceCollection": 7, + "DateGroup": "dd514b88", + "DeletePossibleDuplicates": true, + "DistanceFactor": 8, + "DistanceMoveUnableToMatch": true, + "DistancePixelDistanceTolerance": 1, + "DistanceRenameToMatch": true, + "xEyeThreshold": 33, + "EyeThreshold": 2147483647, + "FaceAreaPermyriad": 10000, + "xFaceDistanceHiddenImageFactor": 2, + "FaceConfidencePercent": 100, + "FaceDistanceHiddenImageFactor": 3, + "FaceDistancePermyriad": 10000, + "FileNameDirectorySeparator": ".Z.", + "xFocusDirectory": "/Hawaii 2022", + "FocusDirectory": "", + "xFocusModel": "NIKON D3400", + "FocusModel": "", + "ForceFaceLastWriteTimeToCreationTime": false, + "ForceMetadataLastWriteTimeToCreationTime": false, + "ForcePropertyLastWriteTimeToCreationTime": false, + "xGenealogicalDataCommunicationFile": "", + "ForceResizeLastWriteTimeToCreationTime": false, + "GenealogicalDataCommunicationFile": "D:/1-Images-A/Images-dd514b88-Results/A2) People/dd514b88/([])/File-Folder-Helper/638268289384407819/638268289384407819.ged", + "xLocationContainerDistanceTolerance": 0.5764, + "LoadPhotoPrismLocations": false, + "LocationContainerDistanceTolerance": null, + "LocationDigits": 9, + "LocationFactor": 10000, + "LookForAbandoned": false, + "MappingDefaultName": "John Doe~25", + "MappingUseDeterministicHashCodeUnknownFaceKeyValuePairsForAddToMapping": false, + "MappingUseDeterministicHashCodeUnknownFaceKeyValuePairsForSaveMapping": false, + "MaxImagesInDirectoryForTopLevelFirstPass": 10, + "ModelDirectory": "C:/GitHub/dlib-models", + "ModelName": "Hog", + "NumberOfJitters": 0, + "NumberOfTimesToUpsample": 0, + "OutputExtension": ".jpg", + "OutputQuality": 95, + "OverrideForFaceImages": false, + "OverrideForFaceLandmarkImages": false, + "OverrideForResizeImages": false, + "Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]", + "PersonBirthdayFirstYear": 1500, + "xPersonCharacters": "!#%]^_`~+=", + "PersonBirthdayFormat": "yyyy-MM-dd_HH", + "PersonCharacters": "^!#]~", + "xPersonCharactersCopyCount": 5, + "PersonCharactersCopyCount": 0, + "PersonKeyFormat": "yyyy-MM-dd_HH", + "PopulatePropertyId": true, + "PredictorModelName": "Large", + "PropertiesChangedForDistance": false, + "PropertiesChangedForFaces": false, + "PropertiesChangedForIndex": false, + "PropertiesChangedForMetadata": false, + "PropertiesChangedForProperty": false, + "PropertiesChangedForResize": false, + "ResultAllInOne": "_ _ _", + "ResultAllInOneSubdirectoryLength": 2, + "ResultCollection": "[]", + "ResultContent": "()", + "ResultSingleton": "{}", + "Reverse": false, + "xRootDirectory": "D:/Tmp/phares/Pictures", + "xxRootDirectory": "D:/Tmp/Phares/Compare/Corrupt", + "xxxRootDirectory": "D:/2-Images-B/Not-Copy-Copy-dd514b88", + "xxxxRootDirectory": "D:/1-Images-A/Images-dd514b88/Facebook/2023.2 Facebook", + "RootDirectory": "D:/1-Images-A/Images-dd514b88", + "SaveFullYearOfRandomFiles": true, + "xSaveIndividually": true, + "SaveIndividually": false, + "SaveResizedSubFiles": true, + "xSkipOlderThanDays": 2200, + "SaveSortingWithoutPerson": true, + "xSkipPersonWithMoreThen": 15, + "SkipOlderThanDays": null, + "SkipPersonWithMoreThen": null, + "SkipSearch": false, + "SortingMaximumPerFaceShouldBeHigh": 3000, + "SortingMaximumPerKey": 7, + "SortingMinimumToUseSigma": 10, + "TestDistanceResults": true, + "xxPersonCharactersCopyCount": 2147483647, + "UseFilterTries": 0, + "xJLinks": [ + "Julie", + "Mike Phares Jr" + ], + "xxJLinks": [ + "Adonias-Sylvia-0006", + "Don-Trish-0058", + "Janet-0015", + "Josh-Kasey-0055", + "John-Rozanna-0004", + "Karen-0017", + "Larry-Becky-0009", + "Mark-Peggy-0021", + "Melvin-Mary-0020", + "Norman-Beverly-0003", + "Quinn-Tricia-0026", + "Wayne-Laurie-0012", + "Calvin-Bonnie-0018", + "Melvin-Ernestna-0065", + "Jeff-Laurel-0025", + "Gina-0024", + "A-A-0000" + ], + "JLinks": [ + "OneOff" + ], + "LoadOrCreateThenSaveDistanceResultsForOutputResolutions": [ + "Original" + ], + "LoadOrCreateThenSaveImageFacesResultsForOutputResolutions": [ + "Original" + ], + "OutputResolutions": [ + "Original" + ], + "PropertyContentCollectionFiles": [], + "RangeDaysDeltaTolerance": [ + 0, + 7000, + 7300 + ], + "RangeDistanceTolerance": [ + 0, + 1.164, + 1.8 + ], + "RangeFaceAreaTolerance": [ + 0, + 0.0001, + 1 + ], + "RangeFaceConfidence": [ + 0, + 0.5, + 2.4 + ], + "xRectangleIntersectMinimums": [ + 0.000001 + ], + "RectangleIntersectMinimums": [ + 0.94, + 0.99 + ], + "SaveFaceDistancesForOutputResolutions": [ + "Original" + ], + "SaveFaceLandmarkForOutputResolutions": [], + "SaveFilteredOriginalImagesFromJLinksForOutputResolutions": [], + "SaveMappedForOutputResolutions": [], + "SaveRandomForOutputResolutions": [], + "SaveShortcutsForOutputResolutions": [], + "SkipNotSkipDirectories": [], + "xSkipNotSkipDirectories": [ + "/!/_ Images-To-Do", + "/!/_ Test", + "/!/Disney", + "/!/Chelsea's Friends", + "/!/Jason's Friends", + "/!/Johnny's Friends", + "/!/Julie's Friends", + "/!/Kristy's Family", + "/!/Kristy's Friends", + "/!/Logan Friends", + "/!/Mackenzie Friends", + "/!/Mike's Family", + "/!/Mike's Friends", + "/!/Statue", + "/!/Tracy's Friend", + "/!/Wax" + ], + "IgnoreRelativePaths": [ + "zzz Pha-res Slides ####" + ], + "MixedYearRelativePaths": [ + "Edited", + "Phares Slides", + "Rex Memorial", + "Scanned Grandma's Quilt", + "Scanned Pictures Of Kids", + "Scanned Prints", + "Slide in Name Order Originals (622)", + "Slides Pictures" + ], + "IgnoreExtensions": [ + ".gif", + ".GIF", + ".json", + ".JOSN", + ".txt", + ".TXT", + ".ico", + ".ICO" + ], + "VerifyToSeason": [], + "ValidImageFormatExtensions": [ + ".bmp", + ".BMP", + ".gif", + ".GIF", + ".jpeg", + ".JPEG", + ".jpg", + ".JPG", + ".png", + ".PNG", + ".tiff", + ".TIFF", + ".tif", + ".TIF" + ], + "ValidResolutions": [ + "Original", + "176 x 176", + "256 x 256", + "353 x 353", + "1024 x 768", + "1280 x 720", + "1280 x 800", + "1376 x 768", + "1600 x 1200", + "1920 x 1080", + "2256 x 1496", + "3840 x 2160", + "7680 x 4320" + ] + } + }, + "WorkingDirectoryName": "PharesApps" + } \ No newline at end of file diff --git a/Rename/.vscode/UserSecrets/secrets.json b/Rename/.vscode/UserSecrets/secrets.json deleted file mode 100644 index a17d89d..0000000 --- a/Rename/.vscode/UserSecrets/secrets.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "_Application": "Rename", - "ComparePathsFile": "C:/Users/mikep/AppData/Local/PharesApps/Drag-Drop-Explorer/2023_21/638202586000194405.json", - "Windows": { - "Configuration": { - "RootDirectory": "D:/1-Images-A/Images-dd514b88" - } - } -} \ No newline at end of file diff --git a/Rename/.vscode/appsettings.example.json b/Rename/.vscode/appsettings.example.json new file mode 100644 index 0000000..d3fe436 --- /dev/null +++ b/Rename/.vscode/appsettings.example.json @@ -0,0 +1,111 @@ +{ + "_Application": "Rename", + "_UserSecretsId": "6e026d2f-9edf-4c6c-a042-162758114e9a", + "ComparePathsFile": "", + "Company": "Mike Phares", + "xDefaultUnknownDirectoryName": "Unknown", + "DefaultUnknownDirectoryName": "", + "xForceIdName": false, + "ForceIdName": true, + "Linux": {}, + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Log4netProvider": "Debug", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "MaxDegreeOfParallelism": 6, + "xMaxMinutesDelta": 2, + "xxMaxMinutesDelta": 2147483647, + "MaxMinutesDelta": 10080, + "RenameUndo": false, + "xxRenameUndo": true, + "Serilog": { + "Using": [ + "Serilog.Sinks.Console", + "Serilog.Sinks.File" + ], + "MinimumLevel": "Information", + "WriteTo": [ + { + "Name": "Debug", + "Args": { + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}" + } + }, + { + "Name": "Console", + "Args": { + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}" + } + }, + { + "Name": "File", + "Args": { + "path": "%workingDirectory% - Log/log-.txt", + "outputTemplate": "{Timestamp:yyyy-MM-dd HH:mm:ss.fff zzz} [{Level}] ({SourceContext}.{MethodName}) ({InstanceId}) ({RemoteIpAddress}) {Message}{NewLine}{Exception}", + "rollingInterval": "Hour" + } + } + ], + "Enrich": [ + "FromLogContext", + "WithMachineName", + "WithThreadId" + ], + "Properties": { + "Application": "Sample" + } + }, + "Windows": { + "Configuration": { + "VerifyToSeason": [], + "DateGroup": "dd514b88", + "DiffPropertyDirectory": "", + "FileNameDirectorySeparator": ".Z.", + "ForcePropertyLastWriteTimeToCreationTime": false, + "MaxImagesInDirectoryForTopLevelFirstPass": 10, + "OutputExtension": ".jpg", + "Pattern": "[^ABCDEFGHIJKLMNOPQRSTUVWXYZbcdfghjklmnpqrstvwxyz0-9]", + "PersonBirthdayFormat": "yyyy-MM-dd_HH", + "PopulatePropertyId": true, + "PropertiesChangedForProperty": false, + "ResultAllInOne": "_ _ _", + "ResultAllInOneSubdirectoryLength": 2, + "ResultCollection": "[]", + "ResultContent": "()", + "ResultSingleton": "{}", + "xRootDirectory": "D:/Images", + "xxRootDirectory": "D:/7-Question/iCloud Photos", + "xxxRootDirectory": "D:/1-Images-A/Images-dd514b88/Facebook/2023.3 Facebook", + "RootDirectory": "D:/7-Question/California", + "IgnoreExtensions": [ + ".gif", + ".GIF", + ".nef", + ".NEF", + ".pdf", + ".PDF" + ], + "ValidImageFormatExtensions": [ + ".bmp", + ".BMP", + ".gif", + ".GIF", + ".jpeg", + ".JPEG", + ".jpg", + ".JPG", + ".png", + ".PNG", + ".tiff", + ".TIFF", + ".tif", + ".TIF" + ] + } + }, + "WorkingDirectoryName": "PharesApps" +} \ No newline at end of file diff --git a/Rename/Program.cs b/Rename/Program.cs index f6996c1..4986a87 100644 --- a/Rename/Program.cs +++ b/Rename/Program.cs @@ -19,8 +19,6 @@ public class Program IsEnvironment isEnvironment = new(processesCount: null, nullASPNetCoreEnvironmentIsDevelopment: debuggerWasAttachedAtLineZero, nullASPNetCoreEnvironmentIsProduction: !debuggerWasAttachedAtLineZero); IConfigurationBuilder configurationBuilder = new ConfigurationBuilder() .AddEnvironmentVariables() - .AddJsonFile("appsettings.json", optional: false, reloadOnChange: true) - .AddJsonFile(isEnvironment.AppSettingsFileName, optional: false, reloadOnChange: true) .AddUserSecrets(); IConfigurationRoot configurationRoot = configurationBuilder.Build(); AppSettings appSettings = Models.Binder.AppSettings.Get(configurationRoot);