Last active
May 14, 2024 19:42
-
-
Save dewomser/30e047fdf44094fc9ec713614d570e8f to your computer and use it in GitHub Desktop.
Makes a screenshot in a Website, copies the URL , add own Text and put it on Mastodon toot !
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# enable for X | |
# import "$HOME"/bin/kdialog/toot.png | |
# enable or Wayland | |
spectacle -b -r -o "$HOME"/bin/kdialog/toot.png | |
wait | |
a=$(kdialog --textinputbox "Dialog-Tooter" "$1") | |
if [[ $? = 0 ]]; then | |
echo "$a" | |
toot post "$a" -m "$HOME/bin/kdialog/toot.png" | |
exit | |
fi | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/bash | |
#Titel und descripzion müssen in Kdialog noch bereinigt werdem | |
#Anwendung aus der Kommandozeile toot_sreenshot_url_title_desc.sh <URL> | |
#Ich benutze das Skript zusammen mit der Firefox Extension "Open-with": | |
# bash -i /home/foo/bin/toot_screenshot_url_title_desc.sh %s | |
cd "$HOME"/bin/ | |
url="$1" | |
echo $url | |
title="$(curl $url | grep '<title')" | |
descr="$(curl $url | grep '<meta name="description')" | |
#title="a" | |
#descr="b" | |
spectacle -b -r -o "$HOME"/bin/toot.png | |
wait | |
a="$(/usr/bin/kdialog --textinputbox "Dialog-Tooter" "$title $descr $url" )" | |
if [[ $? = 0 ]]; then | |
echo "$a" | |
"$HOME"/.local/bin/toot post "$a" -m "$HOME/bin/toot.png" | |
exit | |
fi |
Now for Wayland ans X
Erweiterte Version mit Iinformation aus der Webseite
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Programme die benötigt werden:
Firefox, FF-Plugin Open With, Bash, Kdialog, ImageMagick® (import)
open-with : /home/foo/bin/kdialog/toot-kdialog.sh %s ## Link to this Script
https://twitter.com/dewomser/status/1257534352898101249