30 lines
897 B
PowerShell
30 lines
897 B
PowerShell
param(
|
|
[string]$OutDocs = "reports\\llamacpp_docs.md",
|
|
[string]$OutFlags = "reports\\llamacpp_flags.txt"
|
|
)
|
|
|
|
$urls = @(
|
|
"https://raw.githubusercontent.com/ggerganov/llama.cpp/master/examples/server/README.md",
|
|
"https://raw.githubusercontent.com/ggerganov/llama.cpp/master/examples/server/README-llama-server.md",
|
|
"https://raw.githubusercontent.com/ggerganov/llama.cpp/master/README.md"
|
|
)
|
|
|
|
$out = @()
|
|
foreach ($u in $urls) {
|
|
try {
|
|
$content = Invoke-WebRequest -Uri $u -UseBasicParsing -TimeoutSec 30
|
|
$out += "# Source: $u"
|
|
$out += $content.Content
|
|
} catch {
|
|
$out += "# Source: $u"
|
|
$out += "(failed to fetch)"
|
|
}
|
|
}
|
|
|
|
$out | Set-Content -Encoding UTF8 $OutDocs
|
|
|
|
$docs = Get-Content $OutDocs -Raw
|
|
$flags = [regex]::Matches($docs, "--[a-zA-Z0-9\\-]+") | ForEach-Object { $_.Value }
|
|
$flags = $flags | Sort-Object -Unique
|
|
$flags | Set-Content -Encoding UTF8 $OutFlags
|