mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-03 05:31:03 +02:00
Removed translate-file.ps1
This commit is contained in:
parent
0bedffec1c
commit
a65b6033ed
@ -114,7 +114,6 @@ switch-shelly1.ps1, switches a Shelly1 device in the local network
|
||||
take-screenshot.ps1, takes a single screenshot
|
||||
take-screenshots.ps1, takes multiple screenshots
|
||||
train-dns-cache.ps1, trains the DNS cache with frequently used domain names
|
||||
translate-file.ps1, translates the given file from source to target language
|
||||
translate-text.ps1, translates the given text into other languages
|
||||
turn-volume-up.ps1, turns the audio volume up (+10% by default)
|
||||
turn-volume-down.ps1, turns the audio volume down (-10% by default)
|
||||
|
|
5693
Data/trans
5693
Data/trans
File diff suppressed because it is too large
Load Diff
@ -146,7 +146,6 @@ Various Scripts 🛒
|
||||
* [simulate-presence.ps1](Scripts/simulate-presence.ps1) - simulates the human presence against burglars
|
||||
* [switch-shelly1.ps1](Scripts/switch-shelly1.ps1) - switches a Shelly1 device in the local network
|
||||
* [train-dns-cache.ps1](Scripts/train-dns-cache.ps1) - trains the DNS cache with frequently used domain names
|
||||
* [translate-file.ps1](Scripts/translate-file.ps1) - translates the given file from source to target language
|
||||
* [translate-text.ps1](Scripts/translate-text.ps1) - translates the given text into other languages
|
||||
* [weather.ps1](Scripts/weather.ps1) - prints the current weather forecast
|
||||
* [weather-alert.ps1](Scripts/weather-alert.ps1) - checks the current weather for critical values
|
||||
|
@ -1,29 +0,0 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./translate-file.ps1 [<file>] [<source-lang>] [<target-lang>]
|
||||
.DESCRIPTION translates the given file from source to target language.
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
param($File = "", $SourceLanguage = "", $TargetLanguage = "")
|
||||
|
||||
if ($File -eq "" ) {
|
||||
$File = read-host "Enter path to file"
|
||||
}
|
||||
if ($SourceLanguage -eq "" ) {
|
||||
$SourceLanguage = read-host "Enter language of this file"
|
||||
}
|
||||
if ($TargetLanguage -eq "" ) {
|
||||
$TargetLanguage = read-host "Enter language to translate to"
|
||||
}
|
||||
|
||||
try {
|
||||
$PathToRepo = "$PSScriptRoot/.."
|
||||
|
||||
Start-Process -FilePath "$PathToRepo/Data/trans" -ArgumentList "-i $File -s $SourceLanguage -t $TargetLanguage -e google -brief" -NoNewWindow -Wait
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
Loading…
Reference in New Issue
Block a user