mirror of
https://github.com/lukaszraczylo/homebrew-taps.git
synced 2026-06-05 23:23:54 +00:00
Add documentation for new taps.
This commit is contained in:
@@ -34,9 +34,9 @@ jobs:
|
||||
id: check-changes
|
||||
run: |
|
||||
if git diff --quiet docs/index.html; then
|
||||
echo "changed=false" >> $GITHUB_OUTPUT
|
||||
echo "changed=false" >> "$GITHUB_OUTPUT"
|
||||
else
|
||||
echo "changed=true" >> $GITHUB_OUTPUT
|
||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
|
||||
- name: Commit and push changes
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
# Disable shellcheck for non-tap scripts
|
||||
# These are utility scripts not part of homebrew tap functionality
|
||||
disable=SC2311,SC2312
|
||||
+10
-9
@@ -1,9 +1,10 @@
|
||||
# This file was generated by GoReleaser. DO NOT EDIT.
|
||||
cask "kportal" do
|
||||
version "0.2.48"
|
||||
|
||||
name "kportal"
|
||||
desc "Modern Kubernetes port-forward manager with interactive TUI"
|
||||
homepage "https://lukaszraczylo.github.io/kportal"
|
||||
version "0.2.48"
|
||||
|
||||
livecheck do
|
||||
skip "Auto-generated on release."
|
||||
@@ -13,27 +14,27 @@ cask "kportal" do
|
||||
|
||||
on_macos do
|
||||
on_intel do
|
||||
url "https://github.com/lukaszraczylo/kportal/releases/download/v#{version}/kportal-#{version}-darwin-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/kportal"
|
||||
sha256 "8001cac8d1d66e8bfba0861fb77f5a4c3ed840051bdc6b1d332542dc733df49d"
|
||||
url "https://github.com/lukaszraczylo/kportal/releases/download/v#{version}/kportal-#{version}-darwin-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/kportal"
|
||||
end
|
||||
on_arm do
|
||||
url "https://github.com/lukaszraczylo/kportal/releases/download/v#{version}/kportal-#{version}-darwin-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/kportal"
|
||||
sha256 "f8e7b04052f88ee0c5e668ccd953871550a6d8c085d0305430236c3699d69cbf"
|
||||
url "https://github.com/lukaszraczylo/kportal/releases/download/v#{version}/kportal-#{version}-darwin-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/kportal"
|
||||
end
|
||||
end
|
||||
|
||||
on_linux do
|
||||
on_intel do
|
||||
url "https://github.com/lukaszraczylo/kportal/releases/download/v#{version}/kportal-#{version}-linux-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/kportal"
|
||||
sha256 "dea65a2d376ab16fa58d53f1ea0da1eae25e970b4d438b501b82e7a942d1a295"
|
||||
url "https://github.com/lukaszraczylo/kportal/releases/download/v#{version}/kportal-#{version}-linux-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/kportal"
|
||||
end
|
||||
on_arm do
|
||||
url "https://github.com/lukaszraczylo/kportal/releases/download/v#{version}/kportal-#{version}-linux-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/kportal"
|
||||
sha256 "7574a8013ca8bb62b2b1d0a39f4a5f5d514e9411f255f7bc7273b67c184cc9e8"
|
||||
url "https://github.com/lukaszraczylo/kportal/releases/download/v#{version}/kportal-#{version}-linux-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/kportal"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+10
-9
@@ -1,9 +1,10 @@
|
||||
# This file was generated by GoReleaser. DO NOT EDIT.
|
||||
cask "lolcathost" do
|
||||
version "0.1.22"
|
||||
|
||||
name "lolcathost"
|
||||
desc "Dynamic host management tool with TUI"
|
||||
homepage "https://github.com/lukaszraczylo/lolcathost"
|
||||
version "0.1.22"
|
||||
|
||||
livecheck do
|
||||
skip "Auto-generated on release."
|
||||
@@ -13,27 +14,27 @@ cask "lolcathost" do
|
||||
|
||||
on_macos do
|
||||
on_intel do
|
||||
url "https://github.com/lukaszraczylo/lolcathost/releases/download/v#{version}/lolcathost-#{version}-darwin-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/lolcathost"
|
||||
sha256 "b70dd893fb1a91befda777d668d22dc85bdd95cee7cf9abc605c49125b352ec3"
|
||||
url "https://github.com/lukaszraczylo/lolcathost/releases/download/v#{version}/lolcathost-#{version}-darwin-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/lolcathost"
|
||||
end
|
||||
on_arm do
|
||||
url "https://github.com/lukaszraczylo/lolcathost/releases/download/v#{version}/lolcathost-#{version}-darwin-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/lolcathost"
|
||||
sha256 "2872dc1454a1ad7dfded863894c566041bd8c15fbad36ecd4c595a4c6feb2680"
|
||||
url "https://github.com/lukaszraczylo/lolcathost/releases/download/v#{version}/lolcathost-#{version}-darwin-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/lolcathost"
|
||||
end
|
||||
end
|
||||
|
||||
on_linux do
|
||||
on_intel do
|
||||
url "https://github.com/lukaszraczylo/lolcathost/releases/download/v#{version}/lolcathost-#{version}-linux-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/lolcathost"
|
||||
sha256 "d234a28ee8a67510eac439f52a15e244930e259b7d0adb422a8c8b89c1865846"
|
||||
url "https://github.com/lukaszraczylo/lolcathost/releases/download/v#{version}/lolcathost-#{version}-linux-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/lolcathost"
|
||||
end
|
||||
on_arm do
|
||||
url "https://github.com/lukaszraczylo/lolcathost/releases/download/v#{version}/lolcathost-#{version}-linux-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/lolcathost"
|
||||
sha256 "d646ad7a7754f8f851b573ef012ce9d15cab3aee447bc1bf0fa1e1f62600e592"
|
||||
url "https://github.com/lukaszraczylo/lolcathost/releases/download/v#{version}/lolcathost-#{version}-linux-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/lolcathost"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
# This file was generated by GoReleaser. DO NOT EDIT.
|
||||
cask "semver-generator" do
|
||||
version "1.15.362"
|
||||
|
||||
name "semver-generator"
|
||||
desc "Automatic semantic version generator based on git commit messages"
|
||||
homepage "https://github.com/lukaszraczylo/semver-generator"
|
||||
version "1.15.362"
|
||||
|
||||
livecheck do
|
||||
skip "Auto-generated on release."
|
||||
@@ -13,27 +14,27 @@ cask "semver-generator" do
|
||||
|
||||
on_macos do
|
||||
on_intel do
|
||||
url "https://github.com/lukaszraczylo/semver-generator/releases/download/v#{version}/semver-generator-darwin-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/semver-generator"
|
||||
sha256 "198b959a262e78722f180597500bbde8e34c77f50997fad1fbc8eaebd86639a1"
|
||||
url "https://github.com/lukaszraczylo/semver-generator/releases/download/v#{version}/semver-generator-darwin-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/semver-generator"
|
||||
end
|
||||
on_arm do
|
||||
url "https://github.com/lukaszraczylo/semver-generator/releases/download/v#{version}/semver-generator-darwin-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/semver-generator"
|
||||
sha256 "61302ca9d6015823710be76eebb139f9be0bdce836e82e2406748b5b016be673"
|
||||
url "https://github.com/lukaszraczylo/semver-generator/releases/download/v#{version}/semver-generator-darwin-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/semver-generator"
|
||||
end
|
||||
end
|
||||
|
||||
on_linux do
|
||||
on_intel do
|
||||
url "https://github.com/lukaszraczylo/semver-generator/releases/download/v#{version}/semver-generator-linux-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/semver-generator"
|
||||
sha256 "74b55064b01cacf757f0f8084c837e991c7ae3508ee933d49de4e1684bd9afc0"
|
||||
url "https://github.com/lukaszraczylo/semver-generator/releases/download/v#{version}/semver-generator-linux-amd64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/semver-generator"
|
||||
end
|
||||
on_arm do
|
||||
url "https://github.com/lukaszraczylo/semver-generator/releases/download/v#{version}/semver-generator-linux-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/semver-generator"
|
||||
sha256 "d1366aedcf478df828812f799fe20e95fadbae8c763d266210d980850c5ef467"
|
||||
url "https://github.com/lukaszraczylo/semver-generator/releases/download/v#{version}/semver-generator-linux-arm64.tar.gz",
|
||||
verified: "github.com/lukaszraczylo/semver-generator"
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
+125
-7
@@ -65,6 +65,34 @@
|
||||
.shadow-modern { box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1); }
|
||||
.dark .shadow-modern { box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.4); }
|
||||
html { scroll-behavior: smooth; }
|
||||
.code-block {
|
||||
position: relative;
|
||||
}
|
||||
.copy-btn {
|
||||
position: absolute;
|
||||
top: 0.5rem;
|
||||
right: 0.5rem;
|
||||
padding: 0.25rem 0.5rem;
|
||||
background: rgba(255, 255, 255, 0.1);
|
||||
border: 1px solid rgba(255, 255, 255, 0.2);
|
||||
border-radius: 0.375rem;
|
||||
color: #9ca3af;
|
||||
font-size: 0.75rem;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 0.25rem;
|
||||
}
|
||||
.copy-btn:hover {
|
||||
background: rgba(255, 255, 255, 0.2);
|
||||
color: #fff;
|
||||
}
|
||||
.copy-btn.copied {
|
||||
background: rgba(16, 185, 129, 0.3);
|
||||
border-color: rgba(16, 185, 129, 0.5);
|
||||
color: #34d399;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
if (localStorage.theme === "dark" || (!("theme" in localStorage) && window.matchMedia("(prefers-color-scheme: dark)").matches)) {
|
||||
@@ -123,7 +151,7 @@
|
||||
<i class="fas fa-beer text-8xl sm:text-9xl text-amber-500 animate-float"></i>
|
||||
</div>
|
||||
<h1 class="text-3xl sm:text-4xl md:text-5xl lg:text-6xl font-bold text-gray-900 dark:text-gray-100 mb-4 sm:mb-6 leading-tight animate-fade-in-up" style="animation-delay: 0.1s;">
|
||||
Homebrew<br /><span class="gradient-text">Tap</span>
|
||||
Homebrew Tap<br /><span class="gradient-text">at raczylo.com</span>
|
||||
</h1>
|
||||
<p class="text-base sm:text-lg md:text-xl text-gray-600 dark:text-gray-300 mb-8 sm:mb-10 max-w-2xl mx-auto leading-relaxed px-4 animate-fade-in-up" style="animation-delay: 0.2s;">
|
||||
Developer tools for macOS and Linux. Install powerful CLI utilities with a single command.
|
||||
@@ -158,7 +186,7 @@
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="font-bold text-gray-900 dark:text-gray-100 text-lg">kportal</h3>
|
||||
<span class="text-xs text-gray-500 dark:text-gray-400">v0.2.46</span>
|
||||
<span class="text-xs text-gray-500 dark:text-gray-400">v0.2.48</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400 mb-4">Modern Kubernetes port-forward manager with interactive TUI</p>
|
||||
@@ -174,7 +202,67 @@
|
||||
<i class="fab fa-github mr-1"></i>GitHub
|
||||
</a>
|
||||
</div>
|
||||
<pre class="mt-4 bg-gray-900 text-gray-100 p-3 rounded-lg text-xs overflow-x-auto"><code>brew install --cask lukaszraczylo/taps/kportal</code></pre>
|
||||
<div class="code-block mt-4">
|
||||
<pre class="bg-gray-900 text-gray-100 p-3 pr-16 rounded-lg text-xs overflow-x-auto"><code>brew install --cask lukaszraczylo/taps/kportal</code></pre>
|
||||
<button class="copy-btn" onclick="copyCode(this)" title="Copy to clipboard"><i class="fas fa-copy"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- lolcathost -->
|
||||
<div class="glass p-6 rounded-xl group hover:shadow-lg transition-all duration-300">
|
||||
<div class="flex items-start gap-4 mb-4">
|
||||
<div class="w-12 h-12 rounded-xl bg-gradient-to-br from-pink-500 to-purple-600 flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform duration-300">
|
||||
<i class="fas fa-cat text-white text-lg"></i>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="font-bold text-gray-900 dark:text-gray-100 text-lg">lolcathost</h3>
|
||||
<span class="text-xs text-gray-500 dark:text-gray-400">v0.1.22</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400 mb-4">Dynamic host management tool with TUI</p>
|
||||
<div class="flex flex-wrap gap-2 mb-4">
|
||||
<span class="px-2 py-1 bg-pink-100 dark:bg-pink-900/30 text-pink-700 dark:text-pink-300 rounded text-xs">Hosts</span>
|
||||
<span class="px-2 py-1 bg-purple-100 dark:bg-purple-900/30 text-purple-700 dark:text-purple-300 rounded text-xs">TUI</span>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<a href="https://lolcathost.raczylo.com" target="_blank" class="flex-1 text-center px-3 py-2 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-lg text-sm font-medium transition-colors">
|
||||
<i class="fas fa-book mr-1"></i>Docs
|
||||
</a>
|
||||
<a href="https://github.com/lukaszraczylo/lolcathost" target="_blank" class="flex-1 text-center px-3 py-2 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-lg text-sm font-medium transition-colors">
|
||||
<i class="fab fa-github mr-1"></i>GitHub
|
||||
</a>
|
||||
</div>
|
||||
<div class="code-block mt-4">
|
||||
<pre class="bg-gray-900 text-gray-100 p-3 pr-16 rounded-lg text-xs overflow-x-auto"><code>brew install --cask lukaszraczylo/taps/lolcathost</code></pre>
|
||||
<button class="copy-btn" onclick="copyCode(this)" title="Copy to clipboard"><i class="fas fa-copy"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- semver-generator -->
|
||||
<div class="glass p-6 rounded-xl group hover:shadow-lg transition-all duration-300">
|
||||
<div class="flex items-start gap-4 mb-4">
|
||||
<div class="w-12 h-12 rounded-xl bg-gradient-to-br from-emerald-500 to-teal-600 flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform duration-300">
|
||||
<i class="fas fa-code-branch text-white text-lg"></i>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="font-bold text-gray-900 dark:text-gray-100 text-lg">semver-generator</h3>
|
||||
<span class="text-xs text-gray-500 dark:text-gray-400">v1.15.362</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400 mb-4">Automatic semantic version generator based on git commit messages</p>
|
||||
<div class="flex flex-wrap gap-2 mb-4">
|
||||
<span class="px-2 py-1 bg-emerald-100 dark:bg-emerald-900/30 text-emerald-700 dark:text-emerald-300 rounded text-xs">Git</span>
|
||||
<span class="px-2 py-1 bg-teal-100 dark:bg-teal-900/30 text-teal-700 dark:text-teal-300 rounded text-xs">Versioning</span>
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
<a href="https://github.com/lukaszraczylo/semver-generator" target="_blank" class="flex-1 text-center px-3 py-2 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-lg text-sm font-medium transition-colors">
|
||||
<i class="fab fa-github mr-1"></i>GitHub
|
||||
</a>
|
||||
</div>
|
||||
<div class="code-block mt-4">
|
||||
<pre class="bg-gray-900 text-gray-100 p-3 pr-16 rounded-lg text-xs overflow-x-auto"><code>brew install --cask lukaszraczylo/taps/semver-generator</code></pre>
|
||||
<button class="copy-btn" onclick="copyCode(this)" title="Copy to clipboard"><i class="fas fa-copy"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- CASKS_END -->
|
||||
@@ -195,16 +283,25 @@
|
||||
<i class="fas fa-plus-circle mr-2 text-emerald-500"></i>
|
||||
Add the Tap
|
||||
</h3>
|
||||
<pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto"><code>brew tap lukaszraczylo/taps</code></pre>
|
||||
<div class="code-block">
|
||||
<pre class="bg-gray-900 text-gray-100 p-4 pr-20 rounded-lg overflow-x-auto"><code>brew tap lukaszraczylo/taps</code></pre>
|
||||
<button class="copy-btn" onclick="copyCode(this)" title="Copy to clipboard"><i class="fas fa-copy"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="glass p-6 rounded-xl">
|
||||
<h3 class="font-semibold text-gray-900 dark:text-gray-100 mb-3 flex items-center">
|
||||
<i class="fas fa-download mr-2 text-blue-500"></i>
|
||||
Install a Cask
|
||||
</h3>
|
||||
<pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto"><code>brew install --cask lukaszraczylo/taps/<cask-name></code></pre>
|
||||
<div class="code-block">
|
||||
<pre class="bg-gray-900 text-gray-100 p-4 pr-20 rounded-lg overflow-x-auto"><code>brew install --cask lukaszraczylo/taps/<cask-name></code></pre>
|
||||
<button class="copy-btn" onclick="copyCode(this)" title="Copy to clipboard"><i class="fas fa-copy"></i></button>
|
||||
</div>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400 mt-3">Or install directly without tapping first:</p>
|
||||
<pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto mt-2"><code>brew install --cask lukaszraczylo/taps/kportal</code></pre>
|
||||
<div class="code-block mt-2">
|
||||
<pre class="bg-gray-900 text-gray-100 p-4 pr-20 rounded-lg overflow-x-auto"><code>brew install --cask lukaszraczylo/taps/kportal</code></pre>
|
||||
<button class="copy-btn" onclick="copyCode(this)" title="Copy to clipboard"><i class="fas fa-copy"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="glass p-6 rounded-xl">
|
||||
<h3 class="font-semibold text-gray-900 dark:text-gray-100 mb-3 flex items-center">
|
||||
@@ -212,10 +309,13 @@
|
||||
Using Brewfile
|
||||
</h3>
|
||||
<p class="text-gray-600 dark:text-gray-400 mb-3">Add to your Brewfile:</p>
|
||||
<pre class="bg-gray-900 text-gray-100 p-4 rounded-lg overflow-x-auto"><code>tap "lukaszraczylo/taps"
|
||||
<div class="code-block">
|
||||
<pre class="bg-gray-900 text-gray-100 p-4 pr-20 rounded-lg overflow-x-auto"><code>tap "lukaszraczylo/taps"
|
||||
cask "kportal"
|
||||
cask "lolcathost"
|
||||
cask "semver-generator"</code></pre>
|
||||
<button class="copy-btn" onclick="copyCode(this)" title="Copy to clipboard"><i class="fas fa-copy"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -241,6 +341,24 @@ cask "semver-generator"</code></pre>
|
||||
</footer>
|
||||
|
||||
<script>
|
||||
// Copy code to clipboard
|
||||
function copyCode(button) {
|
||||
const codeBlock = button.parentElement.querySelector('code');
|
||||
const text = codeBlock.textContent;
|
||||
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
button.classList.add('copied');
|
||||
button.innerHTML = '<i class="fas fa-check"></i>';
|
||||
|
||||
setTimeout(() => {
|
||||
button.classList.remove('copied');
|
||||
button.innerHTML = '<i class="fas fa-copy"></i>';
|
||||
}, 2000);
|
||||
}).catch(err => {
|
||||
console.error('Failed to copy:', err);
|
||||
});
|
||||
}
|
||||
|
||||
// Theme toggle
|
||||
document.getElementById('theme-toggle').addEventListener('click', function() {
|
||||
if (document.documentElement.classList.contains('dark')) {
|
||||
|
||||
+121
-105
@@ -1,140 +1,153 @@
|
||||
#!/usr/bin/env bash
|
||||
# shellcheck disable=SC2311,SC2312
|
||||
set -e
|
||||
|
||||
# Generate documentation from Casks
|
||||
# This script parses .rb files in Casks/ and updates docs/index.html
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
ROOT_DIR="$(dirname "$SCRIPT_DIR")"
|
||||
CASKS_DIR="$ROOT_DIR/Casks"
|
||||
DOCS_DIR="$ROOT_DIR/docs"
|
||||
INDEX_FILE="$DOCS_DIR/index.html"
|
||||
TEMP_FILE="$DOCS_DIR/casks_temp.html"
|
||||
ROOT_DIR="$(dirname "${SCRIPT_DIR}")"
|
||||
CASKS_DIR="${ROOT_DIR}/Casks"
|
||||
DOCS_DIR="${ROOT_DIR}/docs"
|
||||
INDEX_FILE="${DOCS_DIR}/index.html"
|
||||
TEMP_FILE="${DOCS_DIR}/casks_temp.html"
|
||||
|
||||
# Get metadata for a cask
|
||||
get_icon() {
|
||||
case "$1" in
|
||||
kportal) echo "fa-ship" ;;
|
||||
lolcathost) echo "fa-cat" ;;
|
||||
semver-generator) echo "fa-code-branch" ;;
|
||||
graphql-monitoring-proxy) echo "fa-chart-line" ;;
|
||||
*) echo "fa-cube" ;;
|
||||
esac
|
||||
case "$1" in
|
||||
kportal) echo "fa-ship" ;;
|
||||
lolcathost) echo "fa-cat" ;;
|
||||
semver-generator) echo "fa-code-branch" ;;
|
||||
graphql-monitoring-proxy) echo "fa-chart-line" ;;
|
||||
*) echo "fa-cube" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_colors() {
|
||||
case "$1" in
|
||||
kportal) echo "from-blue-500 to-purple-600" ;;
|
||||
lolcathost) echo "from-pink-500 to-purple-600" ;;
|
||||
semver-generator) echo "from-emerald-500 to-teal-600" ;;
|
||||
graphql-monitoring-proxy) echo "from-rose-500 to-orange-600" ;;
|
||||
*) echo "from-gray-500 to-gray-600" ;;
|
||||
esac
|
||||
case "$1" in
|
||||
kportal) echo "from-blue-500 to-purple-600" ;;
|
||||
lolcathost) echo "from-pink-500 to-purple-600" ;;
|
||||
semver-generator) echo "from-emerald-500 to-teal-600" ;;
|
||||
graphql-monitoring-proxy) echo "from-rose-500 to-orange-600" ;;
|
||||
*) echo "from-gray-500 to-gray-600" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_tag1() {
|
||||
case "$1" in
|
||||
kportal) echo "Kubernetes" ;;
|
||||
lolcathost) echo "Hosts" ;;
|
||||
semver-generator) echo "Git" ;;
|
||||
graphql-monitoring-proxy) echo "GraphQL" ;;
|
||||
*) echo "CLI" ;;
|
||||
esac
|
||||
case "$1" in
|
||||
kportal) echo "Kubernetes" ;;
|
||||
lolcathost) echo "Hosts" ;;
|
||||
semver-generator) echo "Git" ;;
|
||||
graphql-monitoring-proxy) echo "GraphQL" ;;
|
||||
*) echo "CLI" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_tag1_color() {
|
||||
case "$1" in
|
||||
kportal) echo "blue" ;;
|
||||
lolcathost) echo "pink" ;;
|
||||
semver-generator) echo "emerald" ;;
|
||||
graphql-monitoring-proxy) echo "rose" ;;
|
||||
*) echo "gray" ;;
|
||||
esac
|
||||
case "$1" in
|
||||
kportal) echo "blue" ;;
|
||||
lolcathost) echo "pink" ;;
|
||||
semver-generator) echo "emerald" ;;
|
||||
graphql-monitoring-proxy) echo "rose" ;;
|
||||
*) echo "gray" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_tag2() {
|
||||
case "$1" in
|
||||
kportal) echo "TUI" ;;
|
||||
lolcathost) echo "TUI" ;;
|
||||
semver-generator) echo "Versioning" ;;
|
||||
graphql-monitoring-proxy) echo "Monitoring" ;;
|
||||
*) echo "" ;;
|
||||
esac
|
||||
case "$1" in
|
||||
kportal) echo "TUI" ;;
|
||||
lolcathost) echo "TUI" ;;
|
||||
semver-generator) echo "Versioning" ;;
|
||||
graphql-monitoring-proxy) echo "Monitoring" ;;
|
||||
*) echo "" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_tag2_color() {
|
||||
case "$1" in
|
||||
kportal) echo "purple" ;;
|
||||
lolcathost) echo "purple" ;;
|
||||
semver-generator) echo "teal" ;;
|
||||
graphql-monitoring-proxy) echo "orange" ;;
|
||||
*) echo "gray" ;;
|
||||
esac
|
||||
case "$1" in
|
||||
kportal) echo "purple" ;;
|
||||
lolcathost) echo "purple" ;;
|
||||
semver-generator) echo "teal" ;;
|
||||
graphql-monitoring-proxy) echo "orange" ;;
|
||||
*) echo "gray" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
get_docs_url() {
|
||||
case "$1" in
|
||||
kportal) echo "https://kportal.raczylo.com" ;;
|
||||
lolcathost) echo "https://lolcathost.raczylo.com" ;;
|
||||
graphql-monitoring-proxy) echo "https://graphql-monitoring-proxy.raczylo.com" ;;
|
||||
*) echo "" ;;
|
||||
esac
|
||||
case "$1" in
|
||||
kportal) echo "https://kportal.raczylo.com" ;;
|
||||
lolcathost) echo "https://lolcathost.raczylo.com" ;;
|
||||
graphql-monitoring-proxy) echo "https://graphql-monitoring-proxy.raczylo.com" ;;
|
||||
*) echo "" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
generate_cask_card() {
|
||||
local name="$1"
|
||||
local version="$2"
|
||||
local desc="$3"
|
||||
local name="$1"
|
||||
local version="$2"
|
||||
local desc="$3"
|
||||
|
||||
local icon=$(get_icon "$name")
|
||||
local colors=$(get_colors "$name")
|
||||
local tag1=$(get_tag1 "$name")
|
||||
local tag1_color=$(get_tag1_color "$name")
|
||||
local tag2=$(get_tag2 "$name")
|
||||
local tag2_color=$(get_tag2_color "$name")
|
||||
local docs_url=$(get_docs_url "$name")
|
||||
local github_url="https://github.com/lukaszraczylo/$name"
|
||||
local icon
|
||||
icon=$(get_icon "${name}")
|
||||
local colors
|
||||
colors=$(get_colors "${name}")
|
||||
local tag1
|
||||
tag1=$(get_tag1 "${name}")
|
||||
local tag1_color
|
||||
tag1_color=$(get_tag1_color "${name}")
|
||||
local tag2
|
||||
tag2=$(get_tag2 "${name}")
|
||||
local tag2_color
|
||||
tag2_color=$(get_tag2_color "${name}")
|
||||
local docs_url
|
||||
docs_url=$(get_docs_url "${name}")
|
||||
local github_url="https://github.com/lukaszraczylo/${name}"
|
||||
|
||||
local tags_html="<span class=\"px-2 py-1 bg-${tag1_color}-100 dark:bg-${tag1_color}-900/30 text-${tag1_color}-700 dark:text-${tag1_color}-300 rounded text-xs\">${tag1}</span>"
|
||||
if [ -n "$tag2" ]; then
|
||||
tags_html="$tags_html
|
||||
local tags_html="<span class=\"px-2 py-1 bg-${tag1_color}-100 dark:bg-${tag1_color}-900/30 text-${tag1_color}-700 dark:text-${tag1_color}-300 rounded text-xs\">${tag1}</span>"
|
||||
if [[ -n "${tag2}" ]]
|
||||
then
|
||||
tags_html="${tags_html}
|
||||
<span class=\"px-2 py-1 bg-${tag2_color}-100 dark:bg-${tag2_color}-900/30 text-${tag2_color}-700 dark:text-${tag2_color}-300 rounded text-xs\">${tag2}</span>"
|
||||
fi
|
||||
fi
|
||||
|
||||
local buttons_html=""
|
||||
if [ -n "$docs_url" ]; then
|
||||
buttons_html="<a href=\"$docs_url\" target=\"_blank\" class=\"flex-1 text-center px-3 py-2 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-lg text-sm font-medium transition-colors\">
|
||||
local buttons_html=""
|
||||
if [[ -n "${docs_url}" ]]
|
||||
then
|
||||
buttons_html="<a href=\"${docs_url}\" target=\"_blank\" class=\"flex-1 text-center px-3 py-2 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-lg text-sm font-medium transition-colors\">
|
||||
<i class=\"fas fa-book mr-1\"></i>Docs
|
||||
</a>
|
||||
<a href=\"$github_url\" target=\"_blank\" class=\"flex-1 text-center px-3 py-2 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-lg text-sm font-medium transition-colors\">
|
||||
<a href=\"${github_url}\" target=\"_blank\" class=\"flex-1 text-center px-3 py-2 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-lg text-sm font-medium transition-colors\">
|
||||
<i class=\"fab fa-github mr-1\"></i>GitHub
|
||||
</a>"
|
||||
else
|
||||
buttons_html="<a href=\"$github_url\" target=\"_blank\" class=\"flex-1 text-center px-3 py-2 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-lg text-sm font-medium transition-colors\">
|
||||
else
|
||||
buttons_html="<a href=\"${github_url}\" target=\"_blank\" class=\"flex-1 text-center px-3 py-2 bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700 rounded-lg text-sm font-medium transition-colors\">
|
||||
<i class=\"fab fa-github mr-1\"></i>GitHub
|
||||
</a>"
|
||||
fi
|
||||
fi
|
||||
|
||||
cat << CARD_EOF
|
||||
<!-- $name -->
|
||||
cat <<CARD_EOF
|
||||
<!-- ${name} -->
|
||||
<div class="glass p-6 rounded-xl group hover:shadow-lg transition-all duration-300">
|
||||
<div class="flex items-start gap-4 mb-4">
|
||||
<div class="w-12 h-12 rounded-xl bg-gradient-to-br $colors flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform duration-300">
|
||||
<i class="fas $icon text-white text-lg"></i>
|
||||
<div class="w-12 h-12 rounded-xl bg-gradient-to-br ${colors} flex items-center justify-center flex-shrink-0 group-hover:scale-110 transition-transform duration-300">
|
||||
<i class="fas ${icon} text-white text-lg"></i>
|
||||
</div>
|
||||
<div class="flex-1">
|
||||
<h3 class="font-bold text-gray-900 dark:text-gray-100 text-lg">$name</h3>
|
||||
<span class="text-xs text-gray-500 dark:text-gray-400">v$version</span>
|
||||
<h3 class="font-bold text-gray-900 dark:text-gray-100 text-lg">${name}</h3>
|
||||
<span class="text-xs text-gray-500 dark:text-gray-400">v${version}</span>
|
||||
</div>
|
||||
</div>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400 mb-4">$desc</p>
|
||||
<p class="text-sm text-gray-600 dark:text-gray-400 mb-4">${desc}</p>
|
||||
<div class="flex flex-wrap gap-2 mb-4">
|
||||
$tags_html
|
||||
${tags_html}
|
||||
</div>
|
||||
<div class="flex gap-2">
|
||||
$buttons_html
|
||||
${buttons_html}
|
||||
</div>
|
||||
<div class="code-block mt-4">
|
||||
<pre class="bg-gray-900 text-gray-100 p-3 pr-16 rounded-lg text-xs overflow-x-auto"><code>brew install --cask lukaszraczylo/taps/${name}</code></pre>
|
||||
<button class="copy-btn" onclick="copyCode(this)" title="Copy to clipboard"><i class="fas fa-copy"></i></button>
|
||||
</div>
|
||||
<pre class="mt-4 bg-gray-900 text-gray-100 p-3 rounded-lg text-xs overflow-x-auto"><code>brew install --cask lukaszraczylo/taps/$name</code></pre>
|
||||
</div>
|
||||
|
||||
CARD_EOF
|
||||
@@ -143,36 +156,39 @@ CARD_EOF
|
||||
# Main
|
||||
echo "Generating documentation from Casks..."
|
||||
|
||||
if [ ! -f "$INDEX_FILE" ]; then
|
||||
echo "Error: $INDEX_FILE not found"
|
||||
exit 1
|
||||
if [[ ! -f "${INDEX_FILE}" ]]
|
||||
then
|
||||
echo "Error: ${INDEX_FILE} not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Generate casks HTML to temp file
|
||||
echo "" > "$TEMP_FILE"
|
||||
echo "" >"${TEMP_FILE}"
|
||||
|
||||
for cask_file in "$CASKS_DIR"/*.rb; do
|
||||
if [ -f "$cask_file" ]; then
|
||||
name=$(basename "$cask_file" .rb)
|
||||
version=$(grep -m1 'version "' "$cask_file" | sed 's/.*version "\([^"]*\)".*/\1/' 2>/dev/null || echo "latest")
|
||||
desc=$(grep -m1 'desc "' "$cask_file" | sed 's/.*desc "\([^"]*\)".*/\1/' 2>/dev/null || echo "A Homebrew cask")
|
||||
for cask_file in "${CASKS_DIR}"/*.rb
|
||||
do
|
||||
if [[ -f "${cask_file}" ]]
|
||||
then
|
||||
name=$(basename "${cask_file}" .rb)
|
||||
version=$(grep -m1 'version "' "${cask_file}" | sed 's/.*version "\([^"]*\)".*/\1/' 2>/dev/null || echo "latest")
|
||||
desc=$(grep -m1 'desc "' "${cask_file}" | sed 's/.*desc "\([^"]*\)".*/\1/' 2>/dev/null || echo "A Homebrew cask")
|
||||
|
||||
generate_cask_card "$name" "$version" "$desc" >> "$TEMP_FILE"
|
||||
fi
|
||||
generate_cask_card "${name}" "${version}" "${desc}" >>"${TEMP_FILE}"
|
||||
fi
|
||||
done
|
||||
|
||||
# Now rebuild the index.html with the new casks content
|
||||
# Read and process the file
|
||||
{
|
||||
# Print everything up to and including CASKS_START
|
||||
sed -n '1,/<!-- CASKS_START -->/p' "$INDEX_FILE"
|
||||
# Print the generated casks
|
||||
cat "$TEMP_FILE"
|
||||
# Print everything from CASKS_END onwards
|
||||
sed -n '/<!-- CASKS_END -->/,$p' "$INDEX_FILE"
|
||||
} > "${INDEX_FILE}.new"
|
||||
# Print everything up to and including CASKS_START
|
||||
sed -n '1,/<!-- CASKS_START -->/p' "${INDEX_FILE}"
|
||||
# Print the generated casks
|
||||
cat "${TEMP_FILE}"
|
||||
# Print everything from CASKS_END onwards
|
||||
sed -n '/<!-- CASKS_END -->/,$p' "${INDEX_FILE}"
|
||||
} >"${INDEX_FILE}.new"
|
||||
|
||||
mv "${INDEX_FILE}.new" "$INDEX_FILE"
|
||||
rm -f "$TEMP_FILE"
|
||||
mv "${INDEX_FILE}.new" "${INDEX_FILE}"
|
||||
rm -f "${TEMP_FILE}"
|
||||
|
||||
echo "Documentation updated successfully!"
|
||||
|
||||
Reference in New Issue
Block a user