diff --git a/ReadmeTemplate.md b/ReadmeTemplate.md index a6ecd3d..d8ac8b4 100644 --- a/ReadmeTemplate.md +++ b/ReadmeTemplate.md @@ -7,7 +7,7 @@ TamperMonkey scripts for å gjøre websider bedre. (Fuglane, Innsida osv.) # How to use 1. Install the TamperMonkey extension for your browser -2. Click on the script you want to install (in the list above) +2. Click on the ![](https://img.shields.io/badge/Install-Link-blue.svg) for the script you want to install (in the list above) 3. TamperMonkey should open and ask you to install the script # Contribute diff --git a/generate-readme.ps1 b/generate-readme.ps1 index d8ab03a..866cfb2 100644 --- a/generate-readme.ps1 +++ b/generate-readme.ps1 @@ -6,15 +6,8 @@ $userJsFiles = Get-ChildItem -Path $UserScripts -Filter "*.user.js" | Sort-Objec $regEx = [regex]'\/\/\s+@(\w+)\s+(.+)' - $scriptList = @() -# Initialize an array to hold the table rows -$tableRows = @() - -$tableRows = "`n| Filename | Name | Description | Auto Update |`n" -$tableRows += "| --- | --- | --- | :-: |`n" - # Loop through each file foreach ($file in $userJsFiles) { # Read the file content @@ -67,19 +60,14 @@ foreach ($file in $userJsFiles) { $autoUpdateText = "" } - $scriptList += " ## $name`n`n" - $scriptList += "`n" - $scriptList += " `n" + $scriptList += " ### $name`n`n" + $scriptList += " - **Install:** " + $scriptList += New-MDImage -Subject "$($file.Name)" -Status "$version" -Color blue -Link "https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/$($file.Name)" if ($author) { - $scriptList += " `n" + $scriptList += "`n - **Author:** $author`n" } - $scriptList += "`n" - $scriptList += "`n" - $scriptList += "
Version$version
Author$author
Match$match
Description$description
`n`n" - - - # Add the row to the table - $tableRows += "| [$($file.Name)](https://git.ntnu.no/M365-Drift/MonkeyMagic/raw/main/$($file.Name)) | $name | $description | $autoUpdateText |`n" + $scriptList += " - **Match:** ``$match```n" + $scriptList += " - **Description:** $description`n" } #$tableRows | ForEach-Object { Write-Output $_ }