This commit is contained in:
aRkker 2022-05-06 12:59:50 +03:00
commit 0e86ab00e0
16 changed files with 346 additions and 0 deletions

37
.github/workflows/downloadcounts.yaml vendored Normal file
View File

@ -0,0 +1,37 @@
name: Update download counts
on:
schedule:
# * is a special character in YAML so you have to quote this string
- cron: '0 1 * * *'
workflow_dispatch:
jobs:
update-counts:
if: github.repository == 'goatcorp/DalamudPlugins'
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@v1
- name: Update download counts
run: |
wget -O downloadcounts.json https://us-central1-xl-functions.cloudfunctions.net/get-dlcount
- name: Commit files
continue-on-error: true
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .
git commit -m "Update download counts"
- name: Push changes
continue-on-error: true
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}

38
.github/workflows/regenerate.yaml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Regenerate PluginMaster
on:
push:
branches:
- api4
page_build:
workflow_run:
workflows: ["Update download counts"]
types:
- completed
workflow_dispatch:
concurrency: regenerate
jobs:
generate:
name: Regenerate PluginMaster
if: github.repository == 'goatcorp/DalamudPlugins'
runs-on: windows-2019
steps:
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- uses: actions/checkout@v1
- name: Run generator
run: .\Make-PluginMaster.ps1
- name: Commit files
continue-on-error: true
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -m "Regenerate PluginMaster" -a
- name: Push changes
continue-on-error: true
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ steps.extract_branch.outputs.branch }}

24
LICENSE Normal file
View File

@ -0,0 +1,24 @@
MIT License
Copyright (c) 2021 Goat Systems Interactive
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
All binaries listed in this repository are licensed with the license either packaged
or found in their respective source code repositories.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

145
Make-PluginMaster.ps1 Normal file
View File

@ -0,0 +1,145 @@
$ErrorActionPreference = 'SilentlyContinue'
$output = New-Object Collections.Generic.List[object]
$notInclude = @();
$counts = Get-Content "downloadcounts.json" | ConvertFrom-Json
$categoryFallbacksMap = Get-Content "categoryfallbacks.json" | ConvertFrom-Json
$dlTemplateInstall = "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/plugins/{0}/latest.zip"
$dlTemplateUpdate = "https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/{0}/{1}/latest.zip"
$apiLevel = 4
$thisPath = Get-Location
$table = ""
Get-ChildItem -Path plugins -File -Recurse -Include *.json |
Foreach-Object {
$content = Get-Content $_.FullName | ConvertFrom-Json
if ($notInclude.Contains($content.InternalName)) {
$content | add-member -Force -Name "IsHide" -value "True" -MemberType NoteProperty
}
else
{
$content | add-member -Force -Name "IsHide" -value "False" -MemberType NoteProperty
$newDesc = $content.Description -replace "\n", "<br>"
$newDesc = $newDesc -replace "\|", "I"
if ($content.DalamudApiLevel -eq $apiLevel) {
if ($content.RepoUrl) {
$table = $table + "| " + $content.Author + " | [" + $content.Name + "](" + $content.RepoUrl + ") | " + $newDesc + " |`n"
}
else {
$table = $table + "| " + $content.Author + " | " + $content.Name + " | " + $newDesc + " |`n"
}
}
}
$testingPath = Join-Path $thisPath -ChildPath "testing" | Join-Path -ChildPath $content.InternalName | Join-Path -ChildPath $_.Name
if ($testingPath | Test-Path)
{
$testingContent = Get-Content $testingPath | ConvertFrom-Json
$content | add-member -Name "TestingAssemblyVersion" -value $testingContent.AssemblyVersion -MemberType NoteProperty
}
$content | add-member -Force -Name "IsTestingExclusive" -value "False" -MemberType NoteProperty
$dlCount = $counts | Select-Object -ExpandProperty $content.InternalName | Select-Object -ExpandProperty "count"
if ($dlCount -eq $null){
$dlCount = 0;
}
$content | add-member -Force -Name "DownloadCount" $dlCount -MemberType NoteProperty
if ($content.CategoryTags -eq $null) {
$content | Select-Object -Property * -ExcludeProperty CategoryTags
$fallbackCategoryTags = $categoryFallbacksMap | Select-Object -ExpandProperty $content.InternalName
if ($fallbackCategoryTags -ne $null) {
$content | add-member -Force -Name "CategoryTags" -value @() -MemberType NoteProperty
$content.CategoryTags += $fallbackCategoryTags
}
}
$internalName = $content.InternalName
$updateDate = git log -1 --pretty="format:%ct" plugins/$internalName/latest.zip
if ($updateDate -eq $null){
$updateDate = 0;
}
$content | add-member -Force -Name "LastUpdate" $updateDate -MemberType NoteProperty
$installLink = $dlTemplateInstall -f $internalName, "False"
$content | add-member -Force -Name "DownloadLinkInstall" $installLink -MemberType NoteProperty
$installLink = $dlTemplateInstall -f $internalName, "True"
$content | add-member -Force -Name "DownloadLinkTesting" $installLink -MemberType NoteProperty
$updateLink = $dlTemplateUpdate -f "plugins", $internalName
$content | add-member -Force -Name "DownloadLinkUpdate" $updateLink -MemberType NoteProperty
$output.Add($content)
}
Get-ChildItem -Path testing -File -Recurse -Include *.json |
Foreach-Object {
$content = Get-Content $_.FullName | ConvertFrom-Json
if ($notInclude.Contains($content.InternalName)) {
$content | add-member -Force -Name "IsHide" -value "True" -MemberType NoteProperty
}
else
{
$content | add-member -Force -Name "IsHide" -value "False" -MemberType NoteProperty
# $table = $table + "| " + $content.Author + " | " + $content.Name + " | " + $content.Description + " |`n"
}
$dlCount = 0;
$content | add-member -Force -Name "DownloadCount" $dlCount -MemberType NoteProperty
if (($output | Where-Object {$_.InternalName -eq $content.InternalName}).Count -eq 0)
{
$content | add-member -Force -Name "TestingAssemblyVersion" -value $content.AssemblyVersion -MemberType NoteProperty
$content | add-member -Force -Name "IsTestingExclusive" -value "True" -MemberType NoteProperty
if ($content.CategoryTags -eq $null) {
$content | Select-Object -Property * -ExcludeProperty CategoryTags
$fallbackCategoryTags = $categoryFallbacksMap | Select-Object -ExpandProperty $content.InternalName
if ($fallbackCategoryTags -ne $null) {
$content | add-member -Force -Name "CategoryTags" -value @() -MemberType NoteProperty
$content.CategoryTags += $fallbackCategoryTags
}
}
$internalName = $content.InternalName
$updateDate = git log -1 --pretty="format:%ct" testing/$internalName/latest.zip
if ($updateDate -eq $null){
$updateDate = 0;
}
$content | add-member -Force -Name "LastUpdate" $updateDate -MemberType NoteProperty
$installLink = $dlTemplateInstall -f $internalName, "True"
$content | add-member -Force -Name "DownloadLinkInstall" $installLink -MemberType NoteProperty
$installLink = $dlTemplateInstall -f $internalName, "True"
$content | add-member -Force -Name "DownloadLinkTesting" $installLink -MemberType NoteProperty
$updateLink = $dlTemplateUpdate -f "plugins", $internalName
$content | add-member -Force -Name "DownloadLinkUpdate" $updateLink -MemberType NoteProperty
$output.Add($content)
}
}
$outputStr = $output | ConvertTo-Json
Write-Output $outputStr
Out-File -FilePath .\pluginmaster.json -InputObject $outputStr
$template = Get-Content -Path mdtemplate.txt
$template = $template + $table
Out-File -FilePath .\plugins.md -InputObject $template

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# aRkker's Dalamud Plugin Repository
Simply add the link
https://raw.githubusercontent.com/aRkker/DalamudPlugins/master/pluginmaster.json
to Dalamud's experimental Custom Plugin Repositories to use my plugins.

1
_config.yml Normal file
View File

@ -0,0 +1 @@
theme: jekyll-theme-cayman

60
_layouts/default.html Normal file
View File

@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="{{ site.lang | default: "en-US" }}">
<head>
{% if site.google_analytics %}
<script async src="https://www.googletagmanager.com/gtag/js?id={{ site.google_analytics }}"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', '{{ site.google_analytics }}');
</script>
{% endif %}
<meta charset="UTF-8">
{% seo %}
<link rel="preconnect" href="https://fonts.gstatic.com">
<link rel="preload" href="https://fonts.googleapis.com/css?family=Open+Sans:400,700&display=swap" as="style" type="text/css" crossorigin>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#157878">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="stylesheet" href="{{ '/assets/css/style.css?v=' | append: site.github.build_revision | relative_url }}">
<style>
.page-header {
background-image: linear-gradient(120deg, #132f46, #378dff) !important;
background-color: #378dff !important;
}
.main-content h1, .main-content h2, .main-content h3, .main-content h4, .main-content h5, .main-content h6 {
color: #2f89d6 !important;
}
</style>
</head>
<body>
<header class="page-header" role="banner">
<h1 class="project-name"><a href="https://goatcorp.github.io" style="text-decoration: none;color: #fff;">Plugin Listings</a></h1>
<h2 class="project-tagline">{{ page.description | default: site.description | default: site.github.project_tagline }}</h2>
{% if site.github.is_project_page %}
<a href="https://goatcorp.github.io/" class="btn">Main Page</a>
<a href="https://github.com/goatcorp/FFXIVQuickLauncher/releases/latest" class="btn">Download XIVLauncher</a>
<a href="https://goatcorp.github.io/faq" class="btn">All FAQs</a>
{% endif %}
{% if site.show_downloads %}
<a href="{{ site.github.zip_url }}" class="btn">Download .zip</a>
<a href="{{ site.github.tar_url }}" class="btn">Download .tar.gz</a>
{% endif %}
</header>
<main id="content" class="main-content" role="main">
{{ content }}
<footer class="site-footer">
{% if site.github.is_project_page %}
<span><a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>. If you see any mistakes, feel free to create an issue/PR!</span>
{% endif %}
</footer>
</main>
</body>
</html>

6
categoryfallbacks.json Normal file
View File

@ -0,0 +1,6 @@
{
"WorldMapEnhancer": [
"utility",
"other"
]
}

BIN
docs/instructions1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 KiB

BIN
docs/instructions2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

1
downloadcounts.json Normal file
View File

@ -0,0 +1 @@
{}

9
mdtemplate.txt Normal file
View File

@ -0,0 +1,9 @@
# Neat Plugins
These are community-made plugins that you can install by using /xlplugins in-game when the in-game addon is enabled.
<br>
They are made by third-party developers, not associated with XIVLauncher. You can read more about each of them by clicking their name.
| Author | Name | Description |
|---------------|---------------|-----------------|

BIN
pluginmaster.json Normal file

Binary file not shown.

BIN
plugins.md Normal file

Binary file not shown.

View File

@ -0,0 +1,18 @@
{
"Author": "aRkker",
"Name": "World Map Enhancer",
"InternalName": "WorldMapEnhancer",
"AssemblyVersion": "1.0.0.0",
"Description": "Simply zoom out by right clicking the world map, like God intended it",
"ApplicableVersion": "any",
"Tags": [
"world",
"map",
"enhance",
"rightclick",
"zoom"
],
"DalamudApiLevel": 6,
"LoadPriority": 0,
"Punchline": "Right click to zoom out the big map"
}

Binary file not shown.