From 17d523d8f8188bf5b40adf5d1f000c48b9b27b84 Mon Sep 17 00:00:00 2001 From: Chris Titus Date: Wed, 14 Aug 2024 10:23:26 -0500 Subject: [PATCH] change file structure --- CONTRIBUTING.md => .github/CONTRIBUTING.md | 0 LICENSE => .github/LICENSE | 0 SECURITY.md => .github/SECURITY.md | 0 mkdocs.yml => .github/mkdocs.yml | 0 requirements.txt => .github/requirements.txt | 0 .github/workflows/github-pages.yaml | 6 ++-- autounattend.xml => config/autounattend.xml | 0 gpedit-home.ps1 | 4 --- .../devdocs-generator.ps1 | 28 +++++++++---------- 9 files changed, 17 insertions(+), 21 deletions(-) rename CONTRIBUTING.md => .github/CONTRIBUTING.md (100%) rename LICENSE => .github/LICENSE (100%) rename SECURITY.md => .github/SECURITY.md (100%) rename mkdocs.yml => .github/mkdocs.yml (100%) rename requirements.txt => .github/requirements.txt (100%) rename autounattend.xml => config/autounattend.xml (100%) delete mode 100644 gpedit-home.ps1 rename devdocs-generator.ps1 => tools/devdocs-generator.ps1 (95%) diff --git a/CONTRIBUTING.md b/.github/CONTRIBUTING.md similarity index 100% rename from CONTRIBUTING.md rename to .github/CONTRIBUTING.md diff --git a/LICENSE b/.github/LICENSE similarity index 100% rename from LICENSE rename to .github/LICENSE diff --git a/SECURITY.md b/.github/SECURITY.md similarity index 100% rename from SECURITY.md rename to .github/SECURITY.md diff --git a/mkdocs.yml b/.github/mkdocs.yml similarity index 100% rename from mkdocs.yml rename to .github/mkdocs.yml diff --git a/requirements.txt b/.github/requirements.txt similarity index 100% rename from requirements.txt rename to .github/requirements.txt diff --git a/.github/workflows/github-pages.yaml b/.github/workflows/github-pages.yaml index f7d90060..b51697b8 100644 --- a/.github/workflows/github-pages.yaml +++ b/.github/workflows/github-pages.yaml @@ -24,8 +24,8 @@ jobs: python-version: 3.x # Install latest Stable release of Python 3 cache: 'pip' # caching pip dependencies - - name: Install Necessary Dependencies using 'pip install -r requirements.txt' - run: pip install -r requirements.txt + - name: Install Necessary Dependencies using 'pip install -r .github/requirements.txt' + run: pip install -r .github/requirements.txt - name: Build & Deploy using 'mkdocs' - run: mkdocs gh-deploy --force + run: mkdocs gh-deploy --force -f .github/mkdocs.yml \ No newline at end of file diff --git a/autounattend.xml b/config/autounattend.xml similarity index 100% rename from autounattend.xml rename to config/autounattend.xml diff --git a/gpedit-home.ps1 b/gpedit-home.ps1 deleted file mode 100644 index 43c552a3..00000000 --- a/gpedit-home.ps1 +++ /dev/null @@ -1,4 +0,0 @@ -Get-ChildItem @( - "$env:SystemRoot\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientTools-Package*.mum", - "$env:SystemRoot\servicing\Packages\Microsoft-Windows-GroupPolicy-ClientExtensions-Package*.mum" -) | ForEach-Object { dism.exe /online /norestart /add-package:"$_" } diff --git a/devdocs-generator.ps1 b/tools/devdocs-generator.ps1 similarity index 95% rename from devdocs-generator.ps1 rename to tools/devdocs-generator.ps1 index 8f5f4081..792f6581 100644 --- a/devdocs-generator.ps1 +++ b/tools/devdocs-generator.ps1 @@ -563,17 +563,17 @@ function Add-LinkAttributeToJson { } Update-Progress "Loading JSON files" 10 -$tweaks = Get-Content -Path "config/tweaks.json" | ConvertFrom-Json -$features = Get-Content -Path "config/feature.json" | ConvertFrom-Json +$tweaks = Get-Content -Path "../config/tweaks.json" | ConvertFrom-Json +$features = Get-Content -Path "../config/feature.json" | ConvertFrom-Json Update-Progress "Getting last modified dates of the JSON files" 20 -$tweaksLastModified = (Get-Item "config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd") -$featuresLastModified = (Get-Item "config/feature.json").LastWriteTime.ToString("yyyy-MM-dd") +$tweaksLastModified = (Get-Item "../config/tweaks.json").LastWriteTime.ToString("yyyy-MM-dd") +$featuresLastModified = (Get-Item "../config/feature.json").LastWriteTime.ToString("yyyy-MM-dd") -$tweaksOutputDir = "docs/dev/tweaks" -$featuresOutputDir = "docs/dev/features" -$privateFunctionsDir = "functions/private" -$publicFunctionsDir = "functions/public" +$tweaksOutputDir = "../docs/dev/tweaks" +$featuresOutputDir = "../docs/dev/features" +$privateFunctionsDir = "../functions/private" +$publicFunctionsDir = "../functions/public" $functions = @{} $itemnametocut = "WPF(WinUtil|Toggle|Features?|Tweaks?|Panel|Fix(es)?)?" @@ -592,7 +592,7 @@ Load-Functions -dir $publicFunctionsDir Update-Progress "Adding documentation links to JSON files" 50 # Define the JSON file paths -$jsonPaths = @(".\config\feature.json", ".\config\tweaks.json") +$jsonPaths = @("../config/feature.json", "../config/tweaks.json") # Loop through each JSON file path foreach ($jsonPath in $jsonPaths) { @@ -612,12 +612,12 @@ foreach ($jsonPath in $jsonPaths) { Set-Content -Path $jsonPath -Value $jsonString } -Add-LinkAttributeToJson -jsonFilePath "config/tweaks.json" -outputDir "dev/tweaks" -Add-LinkAttributeToJson -jsonFilePath "config/feature.json" -outputDir "dev/features" +Add-LinkAttributeToJson -jsonFilePath "../config/tweaks.json" -outputDir "dev/tweaks" +Add-LinkAttributeToJson -jsonFilePath "../config/feature.json" -outputDir "dev/features" Update-Progress "Generating content for documentation" 60 -$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60 -$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70 +$tweakResult = Generate-MarkdownFiles -data $tweaks -outputDir $tweaksOutputDir -jsonFilePath "../config/tweaks.json" -lastModified $tweaksLastModified -type "tweak" -initialProgress 60 +$featureResult = Generate-MarkdownFiles -data $features -outputDir $featuresOutputDir -jsonFilePath "../config/feature.json" -lastModified $featuresLastModified -type "feature" -initialProgress 70 Update-Progress "Generating table of contents" 80 $allTocEntries = $tweakResult.TocEntries + $featureResult.TocEntries @@ -639,6 +639,6 @@ $indexContent += Process-MultilineStrings @" \\ "@ $indexContent += $(Generate-TypeSectionContent $featureEntries) + "`r`n" -Set-Content -Path "docs/devdocs.md" -Value $indexContent -Encoding utf8 +Set-Content -Path "../docs/devdocs.md" -Value $indexContent -Encoding utf8 Update-Progress "Process Completed" 100