|
|
|
@ -41,14 +41,15 @@ if ((Get-Item $tmpPath).Length -eq 0) {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
magick $tmpPath $webpPath
|
|
|
|
|
Remove-Item $tmpPath
|
|
|
|
|
|
|
|
|
|
if ((Get-Item $webpPath).Length -eq 0) {
|
|
|
|
|
Remove-Item $webpPath
|
|
|
|
|
throw ('WebP file "{0}" is empty' -f $webpPath)
|
|
|
|
|
} else {
|
|
|
|
|
Remove-Item $tmpPath
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$webpName = (Split-Path -Leaf $webpPath)
|
|
|
|
|
$nextcloudPath = $config.Path + '/' + $webpName
|
|
|
|
|
|
|
|
|
@ -87,7 +88,7 @@ try {
|
|
|
|
|
throw $_
|
|
|
|
|
Remove-Item $webpPath
|
|
|
|
|
}
|
|
|
|
|
$share.ocs.data.url | wl-copy --trim-newline
|
|
|
|
|
$share.ocs.data.url + '/preview' | wl-copy --trim-newline
|
|
|
|
|
notify-send 'Screenshot URL in clipboard' --expire-time=1000
|
|
|
|
|
|
|
|
|
|
Remove-Item $webpPath
|
|
|
|
|