From 4e3f06bb44b7e85ba40a5e589e6ca871cbdbfb3e Mon Sep 17 00:00:00 2001 From: Mike Phares Date: Mon, 8 Jan 2024 13:57:27 -0700 Subject: [PATCH] Minor changes Empty file ISO Add date back for just .kanbn Removed HardcodedFileSearchAndSort Sync with 01-23 JsonToTsv System.Text.Json White-List Ready to move to Move Helper Remove Whitelist Force Start At Check for .git directory before ls Optional Allow root for unc path nuget bump PreVerify EnforceCodeStyleInBuild dotnet_analyzer_diagnostic HelperGit searchDelegate Host File AlertIfNewDeviceIsConnected AOT SetFrontMatterAndH1 Match Error Unknown with better logging Undo 04-05 WriteAppendToHostConfFile MonA IsKanbanIndex Dotnet Format Pre-commit NPM CreateWindowsShortcut Working directory Split description Copy tests Ready to test Delete after a couple of days GitConfigCleanUp knb Files --- .editorconfig | 28 +- .gitignore | 6 +- .vscode/.json | 312 ++++++++++++ .vscode/launch.json | 7 +- .vscode/mklink.md | 8 +- .vscode/pre-commit | 32 ++ .vscode/settings.json | 3 + .vscode/tasks.json | 20 +- Day/2023-Q4/Helper-2023-12-12.cs | 538 -------------------- Day/2024-Q1/Helper-2024-01-06.cs | 136 ++++- Day/2024-Q1/Helper-2024-01-07.cs | 21 +- Day/2024-Q1/Helper-2024-01-08.cs | 53 +- Day/2024-Q1/Helper-2024-01-29.cs | 83 +++ Day/2024-Q1/Helper-2024-03-05.cs | 58 +++ Day/2024-Q2/Helper-2024-04-03.cs | 151 ++++++ Day/2024-Q2/Helper-2024-04-04.cs | 96 ++++ Day/2024-Q2/Helper-2024-04-09.cs | 91 ++++ Day/2024-Q2/Helper-2024-04-17.cs | 62 +++ Day/2024-Q2/Helper-2024-04-26.cs | 93 ++++ Day/2024-Q2/Helper-2024-04-27.cs | 145 ++++++ Day/2024-Q2/Helper-2024-04-29.cs | 56 ++ Day/HelperDay.cs | 26 +- File-Folder-Helper.csproj | 18 +- Helpers/HelperDirectory.cs | 42 ++ Helpers/HelperGit.cs | 66 +++ Helpers/HelperHardcodedFileSearchAndSort.cs | 84 --- Helpers/HelperKanbanMetadata.cs | 58 ++- Helpers/HelperMarkdown.cs | 269 +++++----- Helpers/HelperNPM.cs | 30 ++ Helpers/HelperSaveOrCopyContents.cs | 4 +- Helpers/RijndaelEncryption.cs | 100 ++++ Models/AppSettings.cs | 1 - Models/Binder/AppSettings.cs | 35 +- Worker.cs | 57 ++- package.json | 9 +- 35 files changed, 1914 insertions(+), 884 deletions(-) create mode 100644 .vscode/.json create mode 100644 .vscode/pre-commit delete mode 100644 Day/2023-Q4/Helper-2023-12-12.cs create mode 100644 Day/2024-Q1/Helper-2024-01-29.cs create mode 100644 Day/2024-Q1/Helper-2024-03-05.cs create mode 100644 Day/2024-Q2/Helper-2024-04-03.cs create mode 100644 Day/2024-Q2/Helper-2024-04-04.cs create mode 100644 Day/2024-Q2/Helper-2024-04-09.cs create mode 100644 Day/2024-Q2/Helper-2024-04-17.cs create mode 100644 Day/2024-Q2/Helper-2024-04-26.cs create mode 100644 Day/2024-Q2/Helper-2024-04-27.cs create mode 100644 Day/2024-Q2/Helper-2024-04-29.cs create mode 100644 Helpers/HelperDirectory.cs create mode 100644 Helpers/HelperGit.cs delete mode 100644 Helpers/HelperHardcodedFileSearchAndSort.cs create mode 100644 Helpers/HelperNPM.cs create mode 100644 Helpers/RijndaelEncryption.cs diff --git a/.editorconfig b/.editorconfig index fc1c233..eb38845 100644 --- a/.editorconfig +++ b/.editorconfig @@ -90,26 +90,48 @@ csharp_style_var_elsewhere = false:warning csharp_style_var_for_built_in_types = false:warning csharp_style_var_when_type_is_apparent = false:warning csharp_using_directive_placement = outside_namespace +dotnet_analyzer_diagnostic.category-Design.severity = error +dotnet_analyzer_diagnostic.category-Documentation.severity = error +dotnet_analyzer_diagnostic.category-Globalization.severity = none +dotnet_analyzer_diagnostic.category-Interoperability.severity = error +dotnet_analyzer_diagnostic.category-Maintainability.severity = error +dotnet_analyzer_diagnostic.category-Naming.severity = none +dotnet_analyzer_diagnostic.category-Performance.severity = none +dotnet_analyzer_diagnostic.category-Reliability.severity = error +dotnet_analyzer_diagnostic.category-Security.severity = error +dotnet_analyzer_diagnostic.category-SingleFile.severity = error +dotnet_analyzer_diagnostic.category-Style.severity = error +dotnet_analyzer_diagnostic.category-Usage.severity = error dotnet_code_quality_unused_parameters = all -dotnet_code_quality_unused_parameters = non_public # IDE0060: Remove unused parameter +dotnet_code_quality_unused_parameters = non_public dotnet_code_quality.CAXXXX.api_surface = private, internal -dotnet_diagnostic.CA1825.severity = warning # CA1823: Avoid zero-length array allocations +dotnet_diagnostic.CA1001.severity = error # CA1001: Types that own disposable fields should be disposable +dotnet_diagnostic.CA1051.severity = error # CA1051: Do not declare visible instance fields +dotnet_diagnostic.CA1511.severity = warning # CA1511: Use 'ArgumentException.ThrowIfNullOrEmpty' instead of explicitly throwing a new exception instance +dotnet_diagnostic.CA1513.severity = warning # Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance +dotnet_diagnostic.CA1825.severity = warning # CA1825: Avoid zero-length array allocations dotnet_diagnostic.CA1829.severity = warning # CA1829: Use Length/Count property instead of Count() when available dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance +dotnet_diagnostic.CA1862.severity = warning # CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase' dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead. +dotnet_diagnostic.CA2201.severity = none # CA2201: Exception type System.NullReferenceException is reserved by the runtime dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])' dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2"); dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant. dotnet_diagnostic.IDE0005.severity = warning # Using directive is unnecessary +dotnet_diagnostic.IDE0010.severity = none # Add missing cases to switch statement (IDE0010) dotnet_diagnostic.IDE0028.severity = error # IDE0028: Collection initialization can be simplified dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031) dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed +dotnet_diagnostic.IDE0048.severity = none # Parentheses preferences (IDE0047 and IDE0048) dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049) +dotnet_diagnostic.IDE0051.severity = error # Private member '' is unused [, ] dotnet_diagnostic.IDE0058.severity = warning # IDE0058: Expression value is never used -dotnet_diagnostic.IDE0060.severity = warning # IDE0060: Remove unused parameter +dotnet_diagnostic.IDE0060.severity = error # IDE0060: Remove unused parameter dotnet_diagnostic.IDE0074.severity = warning # IDE0074: Use compound assignment +dotnet_diagnostic.IDE0130.severity = none # Namespace does not match folder structure (IDE0130) dotnet_diagnostic.IDE0270.severity = warning # IDE0270: Null check can be simplified dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290) dotnet_diagnostic.IDE0300.severity = error # IDE0300: Collection initialization can be simplified diff --git a/.gitignore b/.gitignore index 8ac8f51..7a8378f 100644 --- a/.gitignore +++ b/.gitignore @@ -330,4 +330,8 @@ ASALocalRun/ .vscode/Helper/** -.kanbn \ No newline at end of file +.kanbn + +.extensions-vscode +.extensions-vscode-oss +.extensions-vscode-insiders diff --git a/.vscode/.json b/.vscode/.json new file mode 100644 index 0000000..2e529b0 --- /dev/null +++ b/.vscode/.json @@ -0,0 +1,312 @@ +[ + { + "id": "403675d4-631e-40bb-900e-fae36d9c9cdd", + "deviceAssetId": "449501900719.jpg", + "ownerId": "fc9fd5a1-d1b3-4080-a21c-daf9b1c24593", + "deviceId": "Library Import", + "type": "IMAGE", + "originalPath": "/var/snap/immich-distribution/pictures/71/449501900719.jpg", + "previewPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/40/36/403675d4-631e-40bb-900e-fae36d9c9cdd-preview.jpeg", + "fileCreatedAt": "2016-12-02T02:34:23-07:00", + "fileModifiedAt": "2016-12-02T02:34:22-07:00", + "isFavorite": false, + "duration": null, + "thumbnailPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/40/36/403675d4-631e-40bb-900e-fae36d9c9cdd-thumbnail.webp", + "encodedVideoPath": "", + "checksum": "\\x28b46dbf4864b92f18800815cf8145c38d037e92", + "isVisible": true, + "livePhotoVideoId": null, + "updatedAt": "2024-04-25T13:13:20.074314-07:00", + "createdAt": "2024-04-25T10:14:24.253144-07:00", + "isArchived": false, + "originalFileName": "449501900719.jpg", + "sidecarPath": null, + "isReadOnly": true, + "thumbhash": "\\xe5a9090d8257787870788886886877776870760aa9", + "isOffline": false, + "libraryId": "af11ab7c-0782-4b7a-ba8e-fe68cf9a718d", + "isExternal": true, + "deletedAt": null, + "localDateTime": "2016-12-01T19:34:23-07:00", + "stackId": null + }, + { + "id": "11ceb05f-8c94-46cd-9a7e-1c06be5a18b8", + "deviceAssetId": "015516300831.jpg", + "ownerId": "fc9fd5a1-d1b3-4080-a21c-daf9b1c24593", + "deviceId": "Library Import", + "type": "IMAGE", + "originalPath": "/var/snap/immich-distribution/pictures/83/015516300831.jpg", + "previewPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/11/ce/11ceb05f-8c94-46cd-9a7e-1c06be5a18b8-preview.jpeg", + "fileCreatedAt": "2014-05-03T14:44:20-07:00", + "fileModifiedAt": "2014-11-17T11:18:58-07:00", + "isFavorite": false, + "duration": null, + "thumbnailPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/11/ce/11ceb05f-8c94-46cd-9a7e-1c06be5a18b8-thumbnail.webp", + "encodedVideoPath": "", + "checksum": "\\x5b976715bab319b3bdc69d5f337701a062494e0b", + "isVisible": true, + "livePhotoVideoId": null, + "updatedAt": "2024-04-25T13:07:55.048725-07:00", + "createdAt": "2024-04-25T10:14:12.923101-07:00", + "isArchived": false, + "originalFileName": "015516300831.jpg", + "sidecarPath": null, + "isReadOnly": true, + "thumbhash": "\\x5a08120c00771777f87778979877597fbef365", + "isOffline": false, + "libraryId": "af11ab7c-0782-4b7a-ba8e-fe68cf9a718d", + "isExternal": true, + "deletedAt": null, + "localDateTime": "2014-05-03T14:44:20-07:00", + "stackId": null + }, + { + "id": "e8e94a75-2b0c-48f6-b26a-76f5cbe46233", + "deviceAssetId": "985177500821.jpg", + "ownerId": "fc9fd5a1-d1b3-4080-a21c-daf9b1c24593", + "deviceId": "Library Import", + "type": "IMAGE", + "originalPath": "/var/snap/immich-distribution/pictures/82/985177500821.jpg", + "previewPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/e8/e9/e8e94a75-2b0c-48f6-b26a-76f5cbe46233-preview.jpeg", + "fileCreatedAt": "2004-04-28T20:31:40-07:00", + "fileModifiedAt": "2018-05-16T21:41:26.093-07:00", + "isFavorite": false, + "duration": null, + "thumbnailPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/e8/e9/e8e94a75-2b0c-48f6-b26a-76f5cbe46233-thumbnail.webp", + "encodedVideoPath": "", + "checksum": "\\x176b222fa88bc72aaf81031f3b7f73644b178de4", + "isVisible": true, + "livePhotoVideoId": null, + "updatedAt": "2024-04-25T13:07:55.667409-07:00", + "createdAt": "2024-04-25T10:14:12.945414-07:00", + "isArchived": false, + "originalFileName": "985177500821.jpg", + "sidecarPath": null, + "isReadOnly": true, + "thumbhash": "\\xdf07121d0687868f87378788887877887780670789", + "isOffline": false, + "libraryId": "af11ab7c-0782-4b7a-ba8e-fe68cf9a718d", + "isExternal": true, + "deletedAt": null, + "localDateTime": "2004-04-28T20:31:40-07:00", + "stackId": null + }, + { + "id": "4091bebd-4c26-4d30-bd3a-f2160a54b451", + "deviceAssetId": "956694610829.jpg", + "ownerId": "fc9fd5a1-d1b3-4080-a21c-daf9b1c24593", + "deviceId": "Library Import", + "type": "IMAGE", + "originalPath": "/var/snap/immich-distribution/pictures/82/956694610829.jpg", + "previewPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/40/91/4091bebd-4c26-4d30-bd3a-f2160a54b451-preview.jpeg", + "fileCreatedAt": "2010-07-05T09:10:13.2-07:00", + "fileModifiedAt": "2010-07-05T08:10:12-07:00", + "isFavorite": false, + "duration": null, + "thumbnailPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/40/91/4091bebd-4c26-4d30-bd3a-f2160a54b451-thumbnail.webp", + "encodedVideoPath": "", + "checksum": "\\xc2eb5667d6da5ead1be71c51064ea293ad413ea6", + "isVisible": true, + "livePhotoVideoId": null, + "updatedAt": "2024-04-25T13:07:56.364375-07:00", + "createdAt": "2024-04-25T10:14:12.976197-07:00", + "isArchived": false, + "originalFileName": "956694610829.jpg", + "sidecarPath": null, + "isReadOnly": true, + "thumbhash": "\\x12080a0d82668886808887867877877867807906b7", + "isOffline": false, + "libraryId": "af11ab7c-0782-4b7a-ba8e-fe68cf9a718d", + "isExternal": true, + "deletedAt": null, + "localDateTime": "2010-07-05T09:10:13.2-07:00", + "stackId": null + }, + { + "id": "c7bf1944-9f71-4808-8ff9-b0f972e907b0", + "deviceAssetId": "948800300821.jpg", + "ownerId": "fc9fd5a1-d1b3-4080-a21c-daf9b1c24593", + "deviceId": "Library Import", + "type": "IMAGE", + "originalPath": "/var/snap/immich-distribution/pictures/82/948800300821.jpg", + "previewPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/c7/bf/c7bf1944-9f71-4808-8ff9-b0f972e907b0-preview.jpeg", + "fileCreatedAt": "2009-10-09T05:35:00.2-07:00", + "fileModifiedAt": "2009-10-09T04:35:00-07:00", + "isFavorite": false, + "duration": null, + "thumbnailPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/c7/bf/c7bf1944-9f71-4808-8ff9-b0f972e907b0-thumbnail.webp", + "encodedVideoPath": "", + "checksum": "\\x3c5c87ab7e442d1f7a0f2a12678c1d6be00dbc7b", + "isVisible": true, + "livePhotoVideoId": null, + "updatedAt": "2024-04-25T13:07:56.553262-07:00", + "createdAt": "2024-04-25T10:14:12.982686-07:00", + "isArchived": false, + "originalFileName": "948800300821.jpg", + "sidecarPath": null, + "isReadOnly": true, + "thumbhash": "\\x103806258e02bd47937779a478997768fd3bcb9fa4", + "isOffline": false, + "libraryId": "af11ab7c-0782-4b7a-ba8e-fe68cf9a718d", + "isExternal": true, + "deletedAt": null, + "localDateTime": "2009-10-09T05:35:00.2-07:00", + "stackId": null + }, + { + "id": "4f5ea703-47e9-48c6-9366-0cc10630dac2", + "deviceAssetId": "898525300821.jpg", + "ownerId": "fc9fd5a1-d1b3-4080-a21c-daf9b1c24593", + "deviceId": "Library Import", + "type": "IMAGE", + "originalPath": "/var/snap/immich-distribution/pictures/82/898525300821.jpg", + "previewPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/4f/5e/4f5ea703-47e9-48c6-9366-0cc10630dac2-preview.jpeg", + "fileCreatedAt": "2020-12-25T08:35:04.92-07:00", + "fileModifiedAt": "2020-12-25T08:35:04-07:00", + "isFavorite": false, + "duration": null, + "thumbnailPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/4f/5e/4f5ea703-47e9-48c6-9366-0cc10630dac2-thumbnail.webp", + "encodedVideoPath": "", + "checksum": "\\xf706263e450c9a26feaeba2dd14fe0fd8f22e623", + "isVisible": true, + "livePhotoVideoId": null, + "updatedAt": "2024-04-25T13:07:58.530848-07:00", + "createdAt": "2024-04-25T10:14:13.048275-07:00", + "isArchived": false, + "originalFileName": "898525300821.jpg", + "sidecarPath": null, + "isReadOnly": true, + "thumbhash": "\\x5518060d8208976849959a99687678687f8dae48f6", + "isOffline": false, + "libraryId": "af11ab7c-0782-4b7a-ba8e-fe68cf9a718d", + "isExternal": true, + "deletedAt": null, + "localDateTime": "2020-12-25T01:35:04.92-07:00", + "stackId": null + }, + { + "id": "86c813ad-2a1c-489f-8fc2-0b76a21889c0", + "deviceAssetId": "864710800829.jpg", + "ownerId": "fc9fd5a1-d1b3-4080-a21c-daf9b1c24593", + "deviceId": "Library Import", + "type": "IMAGE", + "originalPath": "/var/snap/immich-distribution/pictures/82/864710800829.jpg", + "previewPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/86/c8/86c813ad-2a1c-489f-8fc2-0b76a21889c0-preview.jpeg", + "fileCreatedAt": "2004-04-28T20:00:46-07:00", + "fileModifiedAt": "2004-04-28T19:00:46-07:00", + "isFavorite": false, + "duration": null, + "thumbnailPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/86/c8/86c813ad-2a1c-489f-8fc2-0b76a21889c0-thumbnail.webp", + "encodedVideoPath": "", + "checksum": "\\x9061edbf75f11526cef2c832ba339267509eaec4", + "isVisible": true, + "livePhotoVideoId": null, + "updatedAt": "2024-04-25T13:07:59.171233-07:00", + "createdAt": "2024-04-25T10:14:13.078169-07:00", + "isArchived": false, + "originalFileName": "864710800829.jpg", + "sidecarPath": null, + "isReadOnly": true, + "thumbhash": "\\x140812250674874f87777669788778887a93a0470a", + "isOffline": false, + "libraryId": "af11ab7c-0782-4b7a-ba8e-fe68cf9a718d", + "isExternal": true, + "deletedAt": null, + "localDateTime": "2004-04-28T20:00:46-07:00", + "stackId": null + }, + { + "id": "b65121d8-4a74-4f27-9d6f-c582ffc444dc", + "deviceAssetId": "862274900829.jpg", + "ownerId": "fc9fd5a1-d1b3-4080-a21c-daf9b1c24593", + "deviceId": "Library Import", + "type": "IMAGE", + "originalPath": "/var/snap/immich-distribution/pictures/82/862274900829.jpg", + "previewPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/b6/51/b65121d8-4a74-4f27-9d6f-c582ffc444dc-preview.jpeg", + "fileCreatedAt": "2018-08-17T22:50:55.15-07:00", + "fileModifiedAt": "2022-11-03T20:25:09.161-07:00", + "isFavorite": false, + "duration": null, + "thumbnailPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/b6/51/b65121d8-4a74-4f27-9d6f-c582ffc444dc-thumbnail.webp", + "encodedVideoPath": "", + "checksum": "\\xd4f623e97acd727868fe0e191c170e449d4456a5", + "isVisible": true, + "livePhotoVideoId": null, + "updatedAt": "2024-04-25T13:07:59.640678-07:00", + "createdAt": "2024-04-25T10:14:13.087927-07:00", + "isArchived": false, + "originalFileName": "862274900829.jpg", + "sidecarPath": null, + "isReadOnly": true, + "thumbhash": "\\x99180a0d045977a077687887777678876a806b0867", + "isOffline": false, + "libraryId": "af11ab7c-0782-4b7a-ba8e-fe68cf9a718d", + "isExternal": true, + "deletedAt": null, + "localDateTime": "2018-08-17T15:50:55.15-07:00", + "stackId": null + }, + { + "id": "09fa281c-b828-47f6-8fbb-a5856edb63b5", + "deviceAssetId": "840656100829.jpg", + "ownerId": "fc9fd5a1-d1b3-4080-a21c-daf9b1c24593", + "deviceId": "Library Import", + "type": "IMAGE", + "originalPath": "/var/snap/immich-distribution/pictures/82/840656100829.jpg", + "previewPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/09/fa/09fa281c-b828-47f6-8fbb-a5856edb63b5-preview.jpeg", + "fileCreatedAt": "2019-05-30T14:56:36.82-07:00", + "fileModifiedAt": "2019-05-30T14:56:36-07:00", + "isFavorite": false, + "duration": null, + "thumbnailPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/09/fa/09fa281c-b828-47f6-8fbb-a5856edb63b5-thumbnail.webp", + "encodedVideoPath": "", + "checksum": "\\xd215606441cefcc295130262bad9fed96d9ac40e", + "isVisible": true, + "livePhotoVideoId": null, + "updatedAt": "2024-04-25T13:08:00.211274-07:00", + "createdAt": "2024-04-25T10:14:13.104556-07:00", + "isArchived": false, + "originalFileName": "840656100829.jpg", + "sidecarPath": null, + "isReadOnly": true, + "thumbhash": "\\xd6070a0d826f62873c788799993a7777137f679058", + "isOffline": false, + "libraryId": "af11ab7c-0782-4b7a-ba8e-fe68cf9a718d", + "isExternal": true, + "deletedAt": null, + "localDateTime": "2019-05-30T07:56:36.82-07:00", + "stackId": null + }, + { + "id": "8c239624-2bea-479d-b7fa-9f2cd5ebc9b7", + "deviceAssetId": "812813100821.jpg", + "ownerId": "fc9fd5a1-d1b3-4080-a21c-daf9b1c24593", + "deviceId": "Library Import", + "type": "IMAGE", + "originalPath": "/var/snap/immich-distribution/pictures/82/812813100821.jpg", + "previewPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/8c/23/8c239624-2bea-479d-b7fa-9f2cd5ebc9b7-preview.jpeg", + "fileCreatedAt": "2021-08-28T16:29:07.65-07:00", + "fileModifiedAt": "2021-08-28T16:29:08-07:00", + "isFavorite": false, + "duration": null, + "thumbnailPath": "/var/snap/immich-distribution/common/upload/thumbs/fc9fd5a1-d1b3-4080-a21c-daf9b1c24593/8c/23/8c239624-2bea-479d-b7fa-9f2cd5ebc9b7-thumbnail.webp", + "encodedVideoPath": "", + "checksum": "\\x25a9ffe84298f0e3e7151aaf2eb339908574c035", + "isVisible": true, + "livePhotoVideoId": null, + "updatedAt": "2024-04-25T13:08:00.918411-07:00", + "createdAt": "2024-04-25T10:14:13.134038-07:00", + "isArchived": false, + "originalFileName": "812813100821.jpg", + "sidecarPath": null, + "isReadOnly": true, + "thumbhash": "\\x21080e0d825878767f9678bf7747799612c3b0308a", + "isOffline": false, + "libraryId": "af11ab7c-0782-4b7a-ba8e-fe68cf9a718d", + "isExternal": true, + "deletedAt": null, + "localDateTime": "2021-08-28T09:29:07.65-07:00", + "stackId": null + } +] \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json index de680ce..0a8ea35 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -12,10 +12,9 @@ "program": "${workspaceFolder}/bin/Debug/net8.0/win-x64/File-Folder-Helper.dll", "args": [ "s", - "X", - "Day/2024-Q1", - "Day-Helper-2024-01-08" - ], + "K", + ".kanbn" + ], "cwd": "${workspaceFolder}", "console": "integratedTerminal", "stopAtEntry": false diff --git a/.vscode/mklink.md b/.vscode/mklink.md index 49aea77..808cbd5 100644 --- a/.vscode/mklink.md +++ b/.vscode/mklink.md @@ -7,9 +7,15 @@ updated: "2023-10-20T04:00:37.259Z" # mklink ```bash -mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.kanbn" "D:\Documents\Kanban\File-Folder-Helper" +mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.kanbn" "D:\5-Other-Small\Kanban\File-Folder-Helper" ``` ```bash mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.kanbn" "D:\5-Other-Small\Kanban\File-Folder-Helper" ``` + +```bash +mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode" "C:\Users\phares\.vscode\extensions\ifx.type-script-helper-1.5.2" +mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode-oss" "C:\Users\phares\.vscode-oss\extensions\ifx.type-script-helper-1.5.2" +mklink /J "L:\DevOps\Mesa_FI\File-Folder-Helper\.extensions-vscode-insiders" "C:\Users\phares\.vscode-insiders\extensions\ifx.type-script-helper-1.5.2" +``` diff --git a/.vscode/pre-commit b/.vscode/pre-commit new file mode 100644 index 0000000..4703d18 --- /dev/null +++ b/.vscode/pre-commit @@ -0,0 +1,32 @@ +#!/bin/sh + +echo "*****eclint fix******" + +before=$(git ls-files --others --modified --deleted --exclude-standard | wc -l) +echo "before: $before" + +dotnet format whitespace + +err=$? + +case $err in + 0) echo success ;; + 1) echo fail ;; + 2) echo "unexpected failure" ;; + *) echo "I never thought this would happen" ;; +esac + +if [ $err -ne 0 ]; then + exit $err +fi + +after=$(git ls-files --others --modified --deleted --exclude-standard | wc -l) +echo "after: $after" + +if [ $after -gt $before ]; then + files=$(git ls-files --others --modified --deleted --exclude-standard) + echo "Files not formatted correctly: $files" + exit 1 +fi + +exit $err diff --git a/.vscode/settings.json b/.vscode/settings.json index ed99375..e6247ad 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,16 +19,19 @@ "FAMS", "GIVN", "HUSB", + "Immich", "INDI", "Infineon", "Kanban", "kanbn", "Kofax", + "NpgSql", "NSFX", "OBJE", "onenote", "pged", "Phares", + "Rijndael", "Serilog", "SUBM", "SURN", diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 9309c24..5338b78 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -22,8 +22,8 @@ "-p", "${workspaceFolder}/File-Folder-Helper.csproj", "set", - "asdf", - "123" + "_UserSecretsId", + "0c43f9aa-96e9-4298-967c-ed069d79e262" ], "problemMatcher": "$msCompile" }, @@ -42,6 +42,16 @@ ], "problemMatcher": "$msCompile" }, + { + "label": "Format-Whitespaces", + "command": "dotnet", + "type": "process", + "args": [ + "format", + "whitespace" + ], + "problemMatcher": "$msCompile" + }, { "label": "build", "command": "dotnet", @@ -89,8 +99,6 @@ "-c", "Release", "-p:PublishAot=true", - "--source", - "https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet7/nuget/v3/index.json", "${workspaceFolder}/File-Folder-Helper.csproj", "/property:GenerateFullPaths=true", "/consoleloggerparameters:NoSummary" @@ -112,7 +120,7 @@ { "label": "File-Folder-Helper AOT s M Self .Kanbn Tasks", "type": "shell", - "command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s M '.kanbn/tasks'", + "command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s M L:/DevOps/Mesa_FI/File-Folder-Helper L:/DevOps/Mesa_FI/File-Folder-Helper/.kanbn/tasks", "problemMatcher": [] }, { @@ -124,7 +132,7 @@ { "label": "File-Folder-Helper AOT s X SortCodeMethods", "type": "shell", - "command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s X Day/2024-Q1 Day-Helper-2024-01-08", + "command": "L:/DevOps/Mesa_FI/File-Folder-Helper/bin/Release/net8.0/win-x64/publish/File-Folder-Helper.exe s X L:/DevOps/Mesa_FI/File-Folder-Helper Day-Helper-2024-01-08 L:/DevOps/Mesa_FI/File-Folder-Helper/Day/2024-Q2", "problemMatcher": [] }, { diff --git a/Day/2023-Q4/Helper-2023-12-12.cs b/Day/2023-Q4/Helper-2023-12-12.cs deleted file mode 100644 index e31bc96..0000000 --- a/Day/2023-Q4/Helper-2023-12-12.cs +++ /dev/null @@ -1,538 +0,0 @@ -using Microsoft.Extensions.Logging; -using System.Collections.ObjectModel; -using System.Text.Json; -using System.Text.Json.Serialization; - -namespace File_Folder_Helper.Day; - -internal static partial class Helper20231212 -{ - - private record Debugging( - [property: JsonPropertyName("Level")] int Level - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(Debugging))] - private partial class DebuggingSourceGenerationContext : JsonSerializerContext - { - } - - private record Distance( - [property: JsonPropertyName("Value")] int Value - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(Distance))] - private partial class DistanceSourceGenerationContext : JsonSerializerContext - { - } - - private record Finished( - [property: JsonPropertyName("Elapsed")] double Elapsed, - [property: JsonPropertyName("Exit")] string Exit, - [property: JsonPropertyName("Summary")] string Summary, - [property: JsonPropertyName("Time")] int Time, - [property: JsonPropertyName("TimeStr")] string TimeStr - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(Finished))] - private partial class FinishedSourceGenerationContext : JsonSerializerContext - { - } - - private record Hop( - [property: JsonPropertyName("Host")] string Host, - [property: JsonPropertyName("IPAddr")] string IPAddr, - [property: JsonPropertyName("RTT")] double RTT, - [property: JsonPropertyName("TTL")] int TTL - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(Hop))] - private partial class HopSourceGenerationContext : JsonSerializerContext - { - } - - private record Host( - [property: JsonPropertyName("Distance")] Distance Distance, - [property: JsonPropertyName("EndTime")] int EndTime, - [property: JsonPropertyName("HostAddress")] IReadOnlyList HostAddresses, - [property: JsonPropertyName("HostNames")] HostNames HostNames, - [property: JsonPropertyName("IPIDSequence")] IPIDSequence IPIDSequence, - [property: JsonPropertyName("OS")] OS OS, - [property: JsonPropertyName("Port")] IReadOnlyList Ports, - [property: JsonPropertyName("StartTime")] int StartTime, - [property: JsonPropertyName("Status")] Status Status, - [property: JsonPropertyName("TCPSequence")] TCPSequence TCPSequence, - [property: JsonPropertyName("TCPTSSequence")] TCPTSSequence TCPTSSequence, - [property: JsonPropertyName("Trace")] Trace Trace, - [property: JsonPropertyName("Uptime")] Uptime Uptime - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(Host))] - private partial class HostSourceGenerationContext : JsonSerializerContext - { - } - - private record HostAddress( - [property: JsonPropertyName("Address")] string Address, - [property: JsonPropertyName("AddressType")] string AddressType, - [property: JsonPropertyName("Vendor")] string Vendor - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(HostAddress))] - private partial class HostAddressSourceGenerationContext : JsonSerializerContext - { - } - - private record HostName( - [property: JsonPropertyName("Name")] string Name, - [property: JsonPropertyName("Type")] string Type - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(HostName))] - private partial class HostNameSourceGenerationContext : JsonSerializerContext - { - } - - private record HostNames( - [property: JsonPropertyName("HostName")] IReadOnlyList HostName - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(HostNames))] - private partial class HostNamesSourceGenerationContext : JsonSerializerContext - { - } - - private record Hosts( - [property: JsonPropertyName("Down")] int Down, - [property: JsonPropertyName("Total")] int Total, - [property: JsonPropertyName("Up")] int Up - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(Hosts))] - private partial class HostsSourceGenerationContext : JsonSerializerContext - { - } - - private record IPIDSequence( - [property: JsonPropertyName("Class")] string Class, - [property: JsonPropertyName("Values")] string Values - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(IPIDSequence))] - private partial class IPIDSequenceSourceGenerationContext : JsonSerializerContext - { - } - - private record OS( - [property: JsonPropertyName("OSClass")] object OSClass, - [property: JsonPropertyName("OSMatch")] IReadOnlyList OSMatches, - [property: JsonPropertyName("OSPortUsed")] IReadOnlyList OSPortsUsed - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(OS))] - private partial class OSSourceGenerationContext : JsonSerializerContext - { - } - - private record OSMatch( - [property: JsonPropertyName("Accuracy")] string Accuracy, - [property: JsonPropertyName("Line")] string Line, - [property: JsonPropertyName("Name")] string Name - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(OSMatch))] - private partial class OSMatchSourceGenerationContext : JsonSerializerContext - { - } - - private record OSPortUsed( - [property: JsonPropertyName("PortID")] int PortID, - [property: JsonPropertyName("Protocol")] string Protocol, - [property: JsonPropertyName("State")] string State - ); - - [JsonSourceGenerationOptions(WriteIndented = true, DefaultIgnoreCondition = JsonIgnoreCondition.WhenWritingNull)] - [JsonSerializable(typeof(OSPortUsed))] - private partial class OSPortUsedSourceGenerationContext : JsonSerializerContext - { - } - - private record Port( - [property: JsonPropertyName("PortID")] int PortID, - [property: JsonPropertyName("Protocol")] string Protocol, - [property: JsonPropertyName("Script")] IReadOnlyList