mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-05-08 09:34:34 +02:00
Renamed to translate-text.ps1
This commit is contained in:
parent
dd14dba22d
commit
a600b6dd18
@ -38,7 +38,7 @@ The following PowerShell scripts can be found in the `Scripts/` subfolder:
|
|||||||
* [take-screenshots.ps1](Scripts/take-screenshots.ps1) - takes multiple screenshots
|
* [take-screenshots.ps1](Scripts/take-screenshots.ps1) - takes multiple screenshots
|
||||||
* [test.ps1](Scripts/test.ps1) - simple test script
|
* [test.ps1](Scripts/test.ps1) - simple test script
|
||||||
* [train-dns-cache.ps1](Scripts/train-dns-cache.ps1) - trains the DNS cache with frequently used domain names
|
* [train-dns-cache.ps1](Scripts/train-dns-cache.ps1) - trains the DNS cache with frequently used domain names
|
||||||
* [translate.ps1](Scripts/translate.ps1) - translates the given text
|
* [translate-text.ps1](Scripts/translate-text.ps1) - translates the given text into other languages
|
||||||
* [txt2wav.ps1](Scripts/txt2wav.ps1) - converts text into a audio .WAV file
|
* [txt2wav.ps1](Scripts/txt2wav.ps1) - converts text into a audio .WAV file
|
||||||
* [validate-xml.ps1](Scripts/validate-xml.ps1) - validates the given XML file
|
* [validate-xml.ps1](Scripts/validate-xml.ps1) - validates the given XML file
|
||||||
* [weather.ps1](Scripts/weather.ps1) - prints the current weather forecast
|
* [weather.ps1](Scripts/weather.ps1) - prints the current weather forecast
|
||||||
|
6
Scripts/clone-repos.ps1
Normal file → Executable file
6
Scripts/clone-repos.ps1
Normal file → Executable file
@ -1,17 +1,17 @@
|
|||||||
#!/snap/bin/powershell
|
#!/snap/bin/powershell
|
||||||
|
|
||||||
# Syntax: ./clone-repos.ps1
|
# Syntax: ./clone-repos.ps1
|
||||||
# Description: clones well-known Git repositories
|
# Description: clones well-known Git repositories into the current directory.
|
||||||
# Author: Markus Fleschutz
|
# Author: Markus Fleschutz
|
||||||
# Source: github.com/fleschutz/PowerShell
|
# Source: github.com/fleschutz/PowerShell
|
||||||
# License: CC0
|
# License: CC0
|
||||||
|
|
||||||
$Repos = "https://github.com/fleschutz/PowerShell","https://github.com/fleschutz/CWTS"
|
$Repos = "https://github.com/commonmark/cmark", "https://github.com/opencv/opencv", "https://github.com/openzfs/zfs", "https://github.com/synesthesiam/voice2json", "https://github.com/fleschutz/CWTS", "https://github.com/fleschutz/cubesum", "https://github.com/fleschutz/PowerShell","https://github.com/fleschutz/CWTS", "https://github.com/fleschutz/eventdriven"
|
||||||
|
|
||||||
foreach ($Repo in $Repos) {
|
foreach ($Repo in $Repos) {
|
||||||
$Answer = read-host "Do you want to clone $Repo (y/n)"
|
$Answer = read-host "Do you want to clone $Repo (y/n)"
|
||||||
if ($Answer -eq "y") {
|
if ($Answer -eq "y") {
|
||||||
git clone $Repos
|
git clone $Repo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,12 +1,15 @@
|
|||||||
#!/snap/bin/powershell
|
#!/snap/bin/powershell
|
||||||
|
|
||||||
# Syntax: ./translate.ps1
|
# Syntax: ./translate-text.ps1 [<text>]
|
||||||
# Description: translates the given text
|
# Description: translates the given text into other languages
|
||||||
# Author: Markus Fleschutz
|
# Author: Markus Fleschutz
|
||||||
# Source: github.com/fleschutz/PowerShell
|
# Source: github.com/fleschutz/PowerShell
|
||||||
# License: CC0
|
# License: CC0
|
||||||
|
|
||||||
$SourceText = "Hello World!"
|
param([string]$SourceText)
|
||||||
|
if ($SourceText -eq "" ) {
|
||||||
|
$SourceText = "Hello World!"
|
||||||
|
}
|
||||||
$SourceLang = "en"
|
$SourceLang = "en"
|
||||||
$TargetLanguages = "af","da","de","el","es","hr","it","ja","ko","pl","pt","nl","ru","tr","uk","vi"
|
$TargetLanguages = "af","da","de","el","es","hr","it","ja","ko","pl","pt","nl","ru","tr","uk","vi"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user