Merge branch 'master' of github.com:fleschutz/PowerShell

This commit is contained in:
Markus Fleschutz 2022-08-04 15:46:04 +02:00
commit cb6a5dde20
3 changed files with 35 additions and 37 deletions

View File

@ -1,27 +1,27 @@
Category,FolderName, Branch, Full, URL
Dev, base256unicode, main, no, "git@github.com:fleschutz/base256unicode.git"
Dev, bazel, master, no, "https://github.com/bazelbuild/bazel"
Dev, cmake, master, no, "https://github.com/Kitware/CMake"
Fun, cmatrix, master, no, "https://github.com/abishekvashok/cmatrix"
Tool, cmark, master, no, "https://github.com/commonmark/cmark"
Dev, CWTS, master, no, "git@github.com:fleschutz/CWTS.git"
Tool, elasticsearch, master, no, "https://github.com/elastic/elasticsearch"
Tool, go-ipfs, master, no, "https://github.com/ipfs/go-ipfs"
Tool, grafana, main, no, "https://github.com/grafana/grafana"
Tool, leon, master, no, "https://github.com/leon-ai/leon"
Dev, llvm, master, no, "https://github.com/llvm/llvm-project"
Math, LSS, master, no, "git@github.com:fleschutz/LSS.git"
Dev, ninja, master, no, "git@github.com:ninja-build/ninja.git"
Libs, opencv, master, no, "https://github.com/opencv/opencv"
Tool, operating-systems, main, no, "git@github.com:fleschutz/operating-systems.git"
Shell, PowerShell, master, no, "git@github.com:fleschutz/PowerShell.git"
Shell, pwsh, master, no, "https://github.com/PowerShell/PowerShell"
Dev, base256unicode, main, no, "git@github.com:fleschutz/base256unicode"
Dev, bazel, master, no, "git@github.com:bazelbuild/bazel"
Dev, cmake, master, no, "git@github.com:Kitware/CMake"
Fun, cmatrix, master, no, "git@github.com:abishekvashok/cmatrix"
Tool, cmark, master, no, "git@github.com:commonmark/cmark"
Dev, CWTS, master, no, "git@github.com:fleschutz/CWTS"
Tool, elasticsearch, main, no, "git@github.com:elastic/elasticsearch"
Tool, go-ipfs, master, no, "git@github.com:ipfs/go-ipfs"
Tool, grafana, main, no, "git@github.com:grafana/grafana"
Tool, leon, master, no, "git@github.com:leon-ai/leon"
Dev, llvm, master, no, "git@github.com:llvm/llvm-project"
Math, LSS, master, no, "git@github.com:fleschutz/LSS"
Dev, ninja, master, no, "git@github.com:ninja-build/ninja"
Libs, opencv, master, no, "git@github.com:opencv/opencv"
Tool, operating-systems, main, no, "git@github.com:fleschutz/operating-systems"
Shell, PowerShell, master, no, "git@github.com:fleschutz/PowerShell"
Shell, pwsh, master, no, "git@github.com:PowerShell/PowerShell"
Dev, protobuf, main, no, "git@github.com:protocolbuffers/protobuf"
Dev, rust, master, no, "https://github.com/rust-lang/rust"
Tool, smartmontools, master, no, "https://github.com/smartmontools/smartmontools"
Dev, rust, master, no, "git@github.com:rust-lang/rust"
Tool, smartmontools, master, no, "git@github.com:smartmontools/smartmontools"
Tool, talk2windows, main, no, "git@github.com:fleschutz/talk2windows.git"
Tool, tensorflow, master, no, "https://github.com/tensorflow/tensorflow"
Tool, terminal, main, no, "https://github.com/microsoft/terminal"
Dev, tinycc, mob, no, "https://github.com/TinyCC/tinycc"
Tool, voice2json, master, no, "https://github.com/synesthesiam/voice2json"
Tool, zfs, master, no, "https://github.com/openzfs/zfs"
Tool, tensorflow, master, no, "git@github.com:tensorflow/tensorflow"
Tool, terminal, main, no, "git@github.com:microsoft/terminal"
Dev, tinycc, mob, no, "git@github.com:TinyCC/tinycc"
Tool, voice2json, master, no, "git@github.com:synesthesiam/voice2json"
Tool, zfs, master, no, "git@github.com:openzfs/zfs"
Can't render this file because it has a wrong number of fields in line 2.

View File

@ -27,7 +27,7 @@ try {
$Table = import-csv "$PSScriptRoot/../Data/git-repos.csv"
$NumEntries = $Table.count
"Found $NumEntries entries in database table Data/git-repos.csv."
"Found $NumEntries entries in Data/git-repos.csv."
[int]$Step = 0
[int]$Cloned = 0
@ -40,16 +40,16 @@ try {
$Step++
if (test-path "$FolderPath/$FolderName" -pathType container) {
"⏳ Step $Step/$($NumEntries): Skipping 📂$($FolderName) (exists already)..."
"⏳ Step $Step/$($NumEntries) - Skipping 📂$($FolderName) (exists already)..."
$Skipped++
continue
}
if ($Full -eq "yes") {
"⏳ Step $Step/$($NumEntries): Cloning 📂$($FolderName) ($Branch branch with full history)..."
"⏳ Step $Step/$($NumEntries) - Cloning into 📂$($FolderName) ($Branch branch with full history)..."
& git clone --branch "$Branch" --recurse-submodules "$URL" "$FolderPath/$FolderName"
if ($lastExitCode -ne "0") { throw "'git clone --branch $Branch $URL' failed with exit code $lastExitCode" }
} else {
"⏳ Step $Step/$($NumEntries): Cloning 📂$FolderName ($Branch branch only)..."
"⏳ Step $Step/$($NumEntries) - Cloning into 📂$FolderName ($Branch branch only)..."
& git clone --branch "$Branch" --single-branch --recurse-submodules "$URL" "$FolderPath/$FolderName"
if ($lastExitCode -ne "0") { throw "'git clone --branch $Branch $URL' failed with exit code $lastExitCode" }
}
@ -65,4 +65,4 @@ try {
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}
}

View File

@ -6,27 +6,25 @@
.PARAMETER RSS_URL
Specifies the URL to the RSS feed
.PARAMETER MaxCount
Specifies the number of news to list
Specifies the number of lines to list (20 by default)
.EXAMPLE
PS> ./list-news
.LINK
https://github.com/fleschutz/PowerShell
.NOTES
Author: Markus Fleschutz / License: CC0
Author: Markus Fleschutz | License: CC0
#>
param([string]$RSS_URL = "https://yahoo.com/news/rss/world", [int]$MaxCount = 20)
try {
[xml]$Content = (invoke-webRequest -uri $RSS_URL -useBasicParsing).Content
"`n🌍 $($Content.rss.channel.title) 🌏"
[int]$Count = 0
[xml]$Content = (Invoke-WebRequest -URI $RSS_URL -useBasicParsing).Content
[int]$Count = 1
foreach ($item in $Content.rss.channel.item) {
"$($item.title)"
$Count++
if ($Count -eq $MaxCount) { break }
if ($Count++ -eq $MaxCount) { break }
}
" Source: 🌍 $($Content.rss.channel.title) 🌍"
exit 0 # success
} catch {
"⚠️ Error in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"