Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dewomser/30e047fdf44094fc9ec713614d570e8f to your computer and use it in GitHub Desktop.
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 !
#!/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
##
#!/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
@dewomser
Copy link
Author

dewomser commented May 5, 2020

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

@dewomser
Copy link
Author

dewomser commented Nov 1, 2023

Now for Wayland ans X

@dewomser
Copy link
Author

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